Hello R-helpers,
I have a list of 999 dataframes and I would like to sort the list by the
mean value of one of the columns in the data frames.
Here is a small, self-contained example:
#begin example
iterations<-999
d<-list() #resampled data
f<-list() #fitted values
r<-list() #residuals
l<-
Hello,
I am plotting glms with logged predictors. I would like to define the
logged variables "on the fly" rather than hard coding them into my
dataframe.
This code (with hard-coded logged variables) works just fine:
xx<-seq(-2,.5,by=0.1); lines(xx,predict(power,list(LogArKm00=xx),type=
"respons
Thanks David. ?biplot is not exactly verbose on the issue, but in hindsight
I can see how I might have figured that out on my own. In any case, I
appreciate the time you took to show me how to do that.
Best wishes, Mark Na
On Mon, Feb 11, 2013 at 2:56 PM, David L Carlson wrote:
> ?biplot
>
> s
Dear R-helpers,
The vectors in my biplot are completely obscured by the ~1400 labels R is
printing on my biplot. I don't really care about the labels. How can I make
the biplot without the annoying labels?
See attached, if that helps you see my problem.
Many thanks,
Mark Na
Thanks Jim, William and Patrick for your ideas. I appreciate your help.
Avoiding a circle of the R Inferno sounds good, so I'm going to use
Patrick's 2nd suggestion for now but I learned something from the others
too.
Cheers, Mark
On Sun, Feb 3, 2013 at 12:33 PM, Patrick Burns wrote:
> My at
Hello R-helpers,
I have a vector
x<-c(1,2,3)
and a list that contains vectors
datalist<-list(c(1,2,3),c(2,3,4),c(3,4,5),c(4,5,6))
and I would like to identify those list elements that are identical to x.
I tried
> datalist %in% x
[1] FALSE FALSE FALSE FALSE
but I am obviously using %in% inc
Hi Tsjerk, many thanks...that worked perfectly!
Mark Na
On Mon, Jan 21, 2013 at 9:36 AM, Tsjerk Wassenaar wrote:
> Oh, I'm jetlagged. ^ is a control character for 'start of string'. In the
> context of a character set it means negation: [^a-z].
>
> Ciao,
>
> Tsjerk
>
>
> On Mon, Jan 21, 2013
Hello R-helpers,
I am trying to search for string that includes the caret symbol, using the
following code:
grepl("latitude^2",temp)
And R doesn't like that. It gives me:
> temp<-c("latitude^2","latitude and latitude^2","longitude^2","longitude
and longitude^2")
> temp
[1] "latitude^2"
Hi Sarah, that works perfectly, thank you!
Mark Na
On Fri, Jan 18, 2013 at 5:23 PM, Sarah Goslee wrote:
> Hi,
>
> You need to assign the result of the function to an object:
>
> dd1 <- dredgeit(lm1)
>
> On Fri, Jan 18, 2013 at 6:17 PM, wrote:
> > Dear R-helpers,
> >
> > I have run the code be
Dear R-helpers,
I have run the code below which I expected to make an object called dd1,
but that object does not exist.
So, in summary, my problem is that my function is meant to make an object
(dd1), and it does indeed make that object (I know that the last line of
the function prints it out) b
Many thanks to everyone who chimed in on this one. I really appreciate the
time you took to help me. Especially Dave W. who made me question what
exactly I was after.
Dan N.'s solution does exactly what I want, and it helped me learn about
the eval() and parse() functions too.
Thanks again, and a
Hi David,
I would like to have two objects, one containing the values in a column and
the other containing the column's name.
Of course, that's easy to do manually, but I don't want to have to type out
the name of the column more than once (thus, below, I have typed it once in
quotes, and I am tr
Hello R-helpers,
I have run the following lines of code:
x<-"cars$dist"
y<-noquote(x)
Now y is a string containing the characters "cars$dist"
My questionis there an R function (or combination of functions) that I
can apply to y that will cause y to contain the numbers in cars$dist? Even
be
Hi everyone, and thanks for your replies.
Let me make this a little simpler. Please forget the plotting, that's not
the issue.
I have run the following line of code:
x<-dat.col
Now, is there a function (or combination of functions) that will let me
assign the character string "dat.col" to a new
Hi Liu - I have been trying with assign() but it's not working. I don't
think that's what I'm looking forany other ideas? Many thanks, Mark
On Thu, Jan 17, 2013 at 1:11 PM, Wensui Liu wrote:
> are you looking for assign()?
> On Jan 17, 2013 1:56 PM, wrote:
>
>> Hello R-helpers,
>>
>> I
Hello R-helpers,
I have run the following line of code:
x<-dat$col
and now I would like to assign names(x) to be "dat$col" (e.g., a character
string equal to the column name that I assigned to x).
What I am trying to do is to assign columns in my dataframe to new objects
called x and y. Then I
Hello,
We would like to perform a cross validation on a linear mixed model (lme)
and wonder if anyone has found something analogous to cv.glm for such
models?
Thanks, Mark
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing li
We are attempting to use nlme to fit a linear mixed model to explain bird
abundance as a function of habitat:
lme(abundance~habitat-1,data=data,method="ML",random=~1|sampleunit)
The data consist of repeated counts of birds in sample units across multiple
years, and we have two questions:
1)
Hello R-helpers,
I would like to calculate least square means after having built a GLM with
quasipoisson errors.
In my model the dependent variable is continuous, I have one continuous
independent variable and one categorical independent variable (that is the
variable for which I would like to ca
Hi R-helpers,
I have a dataframe (called data) with 100 columns, the columns of which are
named with integers ranging from 1900 to 1999.
I wish to extract those columns which names are >=1950 and <=1970.
I tried:
data2<-subset(data,select=(names(data)>=1950 & names(data)<=1970))
but that doesn
20 matches
Mail list logo