Hi
Apologies if this has already been asked and answered or if I've labelled
the subject incorrectly but I can't find a solution using the search
function for this group; the vignette documentation for quantmod or general
google searches.
I'm attempting to use quantmod to download foreign currenc
Hi Jackson,
I'll take a wild guess at "What is wrong?". You only got one end of
the color vector, probably the purple end. As my recollection of
principal components analysis is of a data reduction method, you
probably have a lot fewer than 500 points on your plot. If you only
have, say, 50 values
Hi Jackson,
One way to assign colors to values is:
library(plotrix)
ages<-seq(1, 5, by = 100)
agecol<-color.scale(ages,extremes=c("purple","red"))
Then just use "agecol" for your point colors.
Jim
On Tue, May 24, 2016 at 11:57 AM, Jackson Rodrigues
wrote:
> Hi everybody,
>
> I have a big
Hi everybody,
I have a big matrix spread over a long time period.
I would like to make a ordination plot (PCA, CA, DCA etc) of this matrix
and look for patterns on time by exploring a color scheme (I have heat
color in mind).
The idea is to use a progressive color scheme ranging from red (the olde
In the stats package
?medpolish
On Mon, May 23, 2016 at 5:37 PM, Taylor, Z Todd wrote:
> Is there a package somewhere that replicates the SPlus twoway() function?
> That function models a 2-d data matrix, which may contain NAs, as
>
> x[i,j] = grand.effect + row.effect[i] + col.effect[j] + res
Is there a package somewhere that replicates the SPlus twoway() function? That
function models a 2-d data matrix, which may contain NAs, as
x[i,j] = grand.effect + row.effect[i] + col.effect[j] + resid[i,j]
I'm sort of resurrecting some ancient S code and it would be handy if a
twoway() functi
Dear All,
I'd like to change the options("contrasts") within a function, such that
"identity" contrasts
are created for unordered factors. I'm following the idea shown below,
which works fine.
However, when I include these functions in a package (with `contr` being
exported, but
`contr_identity`
Thanks for your advise.
Just wondering, since I have to analyse my data with "Mixed model analysis
in R"
and I'm not familiar at all with this software, just try to use it within a
week and need to write my analysis result as soon as I can, could you
please advise me of what does mixed model analys
> On 23 May 2016, at 23:51 , Jeff Newmiller wrote:
>
> This is almost certainly a message from a contributed package, not from R
> itself. Please figure out which package you are using and read the
> documentation for that package.
Nope, it comes from OSX. AFAIR, it is something about suppo
This is almost certainly a message from a contributed package, not from R
itself. Please figure out which package you are using and read the
documentation for that package.
--
Sent from my phone. Please excuse my brevity.
On May 23, 2016 1:37:22 PM PDT, Fabian Schalle
wrote:
>Hello,
>I’ve n
Hello,
I’ve noticed a Warning, while working with both the R console and a document
window in R:
2016-05-23 22:16:17.507 R[2985:466607] *** WARNING: Method
convertPointFromBase: in class NSView is deprecated on 10.7 and later. It
should not be used in new applications.
I have Version R 3.3.0 G
If you really want to return all the objects in a function, I think it
is better to return as.list(environment()), perhaps adding the
all.names=TRUE argument to capture names starting with a dot.
I only have done this while debugging a function and then I
find it is more convenient to return just e
Thanks David,
I figured out a way to get the data I want without RSelenium.
Apreciate the help, though.
Best,
On Thu, May 19, 2016 at 8:51 PM, David Winsemius
wrote:
>
> > On May 19, 2016, at 7:49 AM, Marcelo Perlin
> wrote:
> >
> > Hi Guys,
> >
> > First time posting here.
> >
> > I have
Dear Jan,
This will return a list with all objects from within the function.
test <- function(){
a <- 10
b <- 3 * a + 1
x <- -1
output <- paste(objects(), objects(), sep = "=")
output <- paste(output, collapse = ",")
output <- paste("list(", output, ")")
return(eval(parse(text = out
On 23/05/2016 3:26 PM, Jan Kacaba wrote:
Hello dear R-help
I would like to use some short and simple names multiple times inside
one script without collisions. I need to wrap the variables inside
some object. I know I can use class function or environment. For
example as follows:
exmp1<-functio
George,
You are very close. Try this ...
# make Debitor a character variable in the data frame
ds_example$Debitor <- as.character(ds_example$Debitor)
duplicates <- duplicated(ds_example$Debitor)
duplicated_debitors <- unique(ds_example$Debitor[duplicates])
ds_duplicates <- ds_example[ds_example
Hello dear R-help
I would like to use some short and simple names multiple times inside
one script without collisions. I need to wrap the variables inside
some object. I know I can use class function or environment. For
example as follows:
exmp1<-function(){
# knowns
pa=0.35
pb=0.35
pc=
You have by now seen some other responses on the list. Keeping the list
included will insure you continue to get mulitple eyes looking at the
problem and will benefit others trying to use the answers.
Two comments:
1) Your first format includes a specification for seconds. If that is
nonzero
Hi Rui;
Thanks so much for this. It works perfectly.
Regards,Oslo
On Sunday, May 22, 2016 7:35 AM, "ruipbarra...@sapo.pt"
wrote:
Hello,
First of all, it's better to post data using ?dput. Below, I give an example of
that in the lines structure(...).
dat <-
structure(list(rs = c(" r
Hi,
Take a look at the package "ic.infer" by Ulrike Gromping.
https://www.jstatsoft.org/article/view/v033i10
Best,
Ravi
Ravi Varadhan, Ph.D. (Biostatistics), Ph.D. (Environmental Engg)
Associate Professor, Department of Oncology
Division of Biostatistics & Bionformatics
Sidney Kimmel Comprehen
Use 'replicate.'
> replicate(n1, mean(rnorm(n2, mean, sd)))
Will compute return a column vector of length n1, each entry of which is
the mean of n2 random normal variables with mean and sd specified by the
arguments of rnorm.
On Mon, May 23, 2016 at 10:25 AM Nicoletta Sabov
wrote:
> Hi ther
On May 23, 2016, at 10:59 AM, jlu...@ria.buffalo.edu wrote:
>
> R users:
>
> Suppose I have a function that takes three numeric arguments x, y, and z,
> any of which may be scalars or vectors.
> Suppose further that the user takes one of the arguments, say y, as a
> vector with the other two
Scalar values in R are just vectors of length 1. The "promotion" you are
thinking of is "recycling" that automatically occurs when vectors of different
lengths are supplied to certain operations.
One shortcut might be to put them all into a data frame using the data.frame()
function. Otherwis
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of
> Suppose I have a function that takes three numeric arguments x, y, and z, any
> of which may be scalars or vectors.
> Suppose further that the user takes one of the arguments, say y, as a vector
> with
R users:
Suppose I have a function that takes three numeric arguments x, y, and z,
any of which may be scalars or vectors.
Suppose further that the user takes one of the arguments, say y, as a
vector with the other two as scalars.
Is there an existing R function that will promote the other two
You are probably using the wrong forum for this question and would save time by
posting elsewhere rather than waiting for a reply here.
The stock answer to this type of request on R-help is 'Please read the Posting
Guide (https://www.r-project.org/posting-guide.html) with special attention to
"B
> On 23 May 2016, at 13:43 , Ivan Calandra wrote:
>
> Hi John,
>
> This is indeed documented, but you'll have to look at the function formula():
> ?formula
>
> Regarding the dot (.), here is the explanation from the help of formula():
> "There are two special interpretations of . in a formula.
Hi Nicoletta,
You need to read more introductory material.
One of the problems with your code is that you actually don't create any
value, let alone any vector; you just display it with cat().
Then you try to create each value of your vector with an explicit for
loop, but you don't need to; rep
I have trained two models using the caret library for R and would like to
combine the two multi-class trained models into one ensemble.
My first thought was to use caretEnsemble, but it does not yet support
multi-class predictions. See
https://github.com/zachmayer/caretEnsemble/issues/8
Is there
Hello R-Programming Experts,
I needed a help here in
completing this *"Programming Assignment 1: Quiz on Air Pollution" (under
Week 2: Programming with R / Course 2: R Programming)* that i am stuck on.
I tried all possible variations in debugging my funct
Hi Dave, Roy and R-users,
Many thanks for your suggestions - in later correspondence Dave suggested that
I ask the data provider to run a md5 checksum on the problem files, and compare
their results against a md5 checksum on my copies of the files. Having done
this, I found that the results did
Hi there,
I need a function, that calculates the mean of a desired amount of normally
distributed numbers and repeats this process for a desired number of
repetitions. The function should return only a single vector consisting solely
of the calculated means. Also the user of this function must
Perhaps
ds_example <- ds_example[ with( ds_example, 1 < ave( Debitor, Debitor,
FUN=length ) ), ]
--
Sent from my phone. Please excuse my brevity.
On May 23, 2016 6:57:04 AM PDT, g.maub...@weinwolf.de wrote:
>Hi All,
>
>the solution for my question is as follows
>
>## Filter duplicates and corr
Hi All,
the solution for my question is as follows
## Filter duplicates and correpsonding non-duplicates
### To filter duplicates and their corresponding non-duplicates use the
### following code snippet:
Debitor <- c("968691", "968691", "968691",
"A04046", "A04046",
"L0
Q1: It looks like the model is not fully identifiably given the data and
as a result igcCAT.ideo has been set to zero - there is no sensible test
to conduct with such a term, hence the NAs in the test stat an p-value
fields.
Q2: A separate (centred) smooth is estimated for each level of igc. I
# Hi All,
#
# I have the following data frame (example):
Debitor <- c("968691", "968691", "968691",
"A04046", "A04046",
"L0006", "L0006", "L0006",
"L0023", "L0023",
"L0056", "L0056",
"L0094", "L0094", "L0094",
"L0124",
It's about formula syntax, so ?formula documents it.
Bert
On Monday, May 23, 2016, John Sorkin wrote:
>
> The syntax
> mydat <- data.frame( y,x )
> fit1 <- lm( y~., data=mydat )
> appears to perform a multivariable regression of y on every non-y variable
> in the data frame mydat. I can not fin
John Sorkin grecc.umaryland.edu> writes:
> The syntax
> mydat <- data.frame( y,x )
> fit1 <- lm( y~., data=mydat )
> appears to perform a multivariable regression of y on
every non-y variable in the data frame mydat. I can not
> find this syntax (y~.) in R documentation. Is y~.
a supported featu
On 23/05/2016 7:26 AM, John Sorkin wrote:
The syntax
mydat <- data.frame( y,x )
fit1 <- lm( y~., data=mydat )
appears to perform a multivariable regression of y on every non-y variable in
the data frame mydat. I can not find this syntax (y~.) in R documentation. Is
y~. a supported feature of t
Hi John,
This is indeed documented, but you'll have to look at the function
formula():
?formula
Regarding the dot (.), here is the explanation from the help of formula():
"There are two special interpretations of . in a formula. The usual one
is in the context of a data argument of model fitt
The syntax
mydat <- data.frame( y,x )
fit1 <- lm( y~., data=mydat )
appears to perform a multivariable regression of y on every non-y variable in
the data frame mydat. I can not find this syntax (y~.) in R documentation. Is
y~. a supported feature of the R language? Where can I find it document
> jim holtman
> on Sun, 22 May 2016 16:47:06 -0400 writes:
> if you want to use 'ifelse', here is a way:
hmm, why should he want that ?
The OP did mention that it's about somewhat large objects, so
efficiency is one of the considerations :
ifelse() is often convenient and nicely
> On 23 May 2016, at 07:44 , Peter Langfelder
> wrote:
>
> or
>
> t(apply(v, 1, `+`, b))
Or, as you're messing with transposes anyways, use the fact that the
column-wise counterpart is automagically handled by recycling:
t(t(v)+b)
Or, look Ma, no transposes
v + rep(b, each=nrow(v))
(_al
Hi all,
I hope you are doing well?
I'm currently using lm() to estimate a linear multi-factor (5 factors without
intercept) model as follows ...
factor.lm <- lm(y~x1+x2+x3+x4+x5-1, data = data.frame.rbind)
Using nnls(A,b) I estimated the same model, extended by a non-negativity
constraint on
44 matches
Mail list logo