Displaying 20 results from an estimated 7000 matches similar to: "Adding legends to a plot"
2009 Jul 21
4
how to transform m/d/yyyy to yyyymmdd?
Hello,
I have a set of data that has a Date column looks like this:
12/9/2007
12/16/2007
1/1/2008
1/3/2008
1/12/2008
etc.
I'd like the date to look something like the follow (so that I could sort by
date easily).
20071209
20071216
20080101
20080103
20080112
How to do it? Thank you very much
Julia
--
View this message in context:
2006 Aug 29
2
lattice and several groups
Dear R-list,
I would like to use the lattice library to show several groups on
the same graph. Here's my example :
## the data
f1 <- factor(c("mod1","mod2","mod3"),levels=c("mod1","mod2","mod3"))
f1 <- rep(f1,3)
f2 <-
2008 Oct 10
4
how to store lme/lmer fit result
Dear R users,
I am building a hierarchical model on a large data set. It can take quite
some time to finish one fit, I was just wondering whether it is possible to
store the fit object (the result) to a file for later (offline) analysis.
thanks
Julia
--
View this message in context: http://www.nabble.com/how-to-store-lme-lmer-fit-result-tp19910951p19910951.html
Sent from the R help mailing
2009 Jun 17
3
how to read in only some columns of a data file
Hello,
I have a data file (.csv) that has a size of about 2.6 GB. I am not able to
read in the whole data set because of the memory limit. I actually only need
some columns (3 columns) of the data set, is there a way to read in
specified columns?
I am using windows.
Thanks,
Julia
--
View this message in context:
2008 Sep 11
3
Calculate mean/var by ID
Hello,
I have a data set that looks like this.
ID value
111 5
111 6
111 2
178 7
178 3
138 3
138 8
138 7
138 6
.
.
.
I'd like to calculate the mean and var for each object identified by the ID.
I can in theory just loop through the whole thing..., but is there a easier
way/command which let me calculate the mean/var by ID?
Thanks,
Julia
--
View this
2009 Feb 11
3
two scatter plots in one
Dear R users,
I need to compare two scatter plots,
plot(x1, y1)
plot(x2, y2)
and would like to plot them in the same figure. How do I do it?
Thank you.
--
View this message in context: http://www.nabble.com/two-scatter-plots-in-one-tp21963375p21963375.html
Sent from the R help mailing list archive at Nabble.com.
2009 Jun 01
2
how to checking whether elements of a vector changed or not.
Hello,
I have a vector:
x <- c("A", "A", "A", "B", "A", "A", "C")
I'd like to compare each of elements of vector x from its previous element
(except for the 1st element which does not have previous element). So I'd
like to get a vector y (of same length) that looks something like
(0, 0, 0, 1, 1, 0, 1) or
(F, F, F,
2009 Dec 29
2
pass functions and arguments to function
Hi,
I wonder how to pass several functions and their arguments as arguments to
a function. For example, the main function is
f = function(X ) {
process1(X)
...
process2(X)
}
I have a few functions that operate on X, e.g. g1(X, par1), g2(X, par2),
g3(X, par3). par1, par2 and par3 are parameters and of different types. I
would like to pass g1, g2, g3 and their arguments to f and g1,
2009 Jul 15
1
Help with averaging
Hi
I am using the following script to average a set of data 0f 62 columns into 31 colums. The data consists of values of ln(0.01) or -4.60517 instead of NA's. These need to be averaged for each row (i.e 2 values being averaged). What I would I need to change for me to meet the conditions:
1. If each run of the sample has a value, the average is
given
2. If only one run of the sample has a
2013 Jan 24
1
Pairwise Comparrisons
Dear all,
I''m trying to write a function, that will take as an argument, some aligned genome sequences, and using a sliding window, do pairwise comparisons of sequence similarity. Coding the sliding window I think I can manage but what I''m trying to get to grips with is getting it so as every pairwise comparison is made, no matter how many genomes are added, from 3 to N.
So if
2008 Apr 05
2
How to improve the "OPTIM" results
Dear R users,
I used to "OPTIM" to minimize the obj. function below. Even though I used
the true parameter values as initial values, the results are not very good.
How could I improve my results? Any suggestion will be greatly appreciated.
Regards,
Kathryn Lord
#------------------------------------------------------------------------------------------
x = c(0.35938587,
2008 Apr 05
2
How to improve the "OPTIM" results
Dear R users,
I used to "OPTIM" to minimize the obj. function below. Even though I used
the true parameter values as initial values, the results are not very good.
How could I improve my results? Any suggestion will be greatly appreciated.
Regards,
Kathryn Lord
#------------------------------------------------------------------------------------------
x = c(0.35938587,
2012 Jun 04
1
simulation of modified bartlett's test
Hi, I run this code to get the power of the test for modified bartlett's
test..but I'm not really sure that my coding is right..
#normal distribution unequal variance
asim<-5000
pv<-rep(NA,asim)
for(i in 1:asim)
{print(i)
set.seed(i)
n1<-20
n2<-20
n3<-20
mu<-0
sd1<-sqrt(25)
sd2<-sqrt(50)
sd3<-sqrt(100)
g1<-rnorm(n1,mu,sd1)
g2<-rnorm(n2,mu,sd2)
2006 Feb 24
3
Sorting alphanumerically
I'm trying to sort a DATAFRAME by a column "ID" that contains
alphanumeric data. Specifically,"ID" contains integers all preceeded
by the character "g" as in:
g1, g6, g3, g19, g100, g2, g39
I am using the following code:
DATAFRAME=DATAFRAME[order(DATAFRAME1$ID),]
and was hoping it would sort the dataframe by ID in the following manner
g1, g2, g3, g6, g19,
2011 Jul 18
1
question about linear mixed model
Hi all:
I have a question about linear mixed model.
my linear mixed model with randomized slope and intercept with interaction
of time and group(g1,g2,g3):
model<- glmmPQL(log10(CD4) ~ time + factor(group)+ time:factor(group),
random = ~time|id)
What I get is only the main and interaction of time and group.My question
is:
1. How can I get the g1,g2,g3's slope respectively?In other
2007 Jun 19
3
Controlling text and strip arrangement in xyplot
I've searched the archives and read the xyplot help but can't figure
out the 2 lattice questions below?
Consider:
library(lattice)
DF <- data.frame(x=rnorm(20), y=rnorm(20), g1=rep(letters[1:2], 10),
g2=rep(LETTERS[1:2], each=10),
g3=rep(rep(letters[3:4],each=5),2))
xyplot(y ~ x | g1 + g2, groups=g3, data=DF)
1) Is there a way to get one strip per row and column
2005 Mar 29
5
pairewise plots
Dear R users,
I have a data generated as the following,
dat <- data.frame(matrix(sample(24), nrow=4))
dimnames(dat) <-list(rownames=c('g1','g2','g3','g4'), colnames=c("A_CH1","A_CH2","B_CH1","B_CH2","C_CH3","C_CH3"))
ยป dat
A_CH1 A_CH2 B_CH1 B_CH2 C_CH3 C_CH3
g1 16 24 7 9 14
2009 Jul 02
1
Getting identify() to work with lattice::cloud()
I don't seem to be able to put any syntax into identify() that gets
it to work with "lattice" cloud() graph:
layout(1)
require('lattice')
cloud(g3 ~ g1 + g2, data=gapp, col = "blue",
xlab='G1 Score', ylab='G2 Score',
zlab='G3 Score', main='3D Plot for Applicants')
identify(gapp[,2:4], labels=gapp$ID)
Here g1 is gapp[,2], g2
2014 Aug 18
2
Automatically add group
Dear All.
I have a file server. I installed the samba on it to store the document.
See below for the security :
- group :
+ g1 : user1, user2,user3
+ g2 : user4, user5,user6
+ g3 : user1,user5
- folder :
+ folder A : set permission chmod 775 and group chown root:g3
The problem is when the user1 modified a file in folder A then that file
add the group g1 automatically. So
2011 Oct 30
1
Normality tests on groups of rows in a data frame, grouped based on content in other columns
Dear R users,
I have a data frame in the form below, on which I would like to make normality tests on the values in the ExpressionLevel column.
> head(df)
ID Plant Tissue Gene ExpressionLevel
1 1 p1 t1 g1 366.53
2 2 p1 t1 g2 0.57
3 3 p1 t1 g3 11.81
4 4 p1 t2 g1 498.43
5 5 p1 t2 g2 2.14
6 6 p1 t2 g3 7.85
I