similar to: convert a data frame with NULL to a list of integer

Displaying 20 results from an estimated 5000 matches similar to: "convert a data frame with NULL to a list of integer"

2009 Oct 13
2
multiple groups with different colors in boxplot
Can anybody help me on how to boxplot multiple groups with different color? Say, I have 3 groups of data, each group with 2 boxes, and I'd like to have the following layout in the boxplot: red, red, green, green, blue, blue thanks in advance. -- View this message in context: http://www.nabble.com/multiple-groups-with-different-colors-in-boxplot-tp25867267p25867267.html Sent from the R help
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
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,
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,
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
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 Dec 29
1
Genotypes are not all the same
I have been merrily using the genetics package and more specifically have been using the makeGenotypes and genotypes function. I check my accomplishments by going > class(g2) [1] "genotype" "factor" and likewise > class(g1) [1] "genotype" "factor" Yet when I execute a command such as allele count I get this > allele.count(g1) D I [1,]
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
2008 Sep 30
1
Adding legends to a plot
Hello, I have a time series plot drawn using 3 different colored lines, each line corresponds to different category group. I'd like to put legends on the plot. I am using "legend" to do this, however, I can either specify lty or col in legend. Will I be able to do the following in the legend box: a solid black line then g1, a solid red line then g2, a solid blue line then g3?
2010 Jan 05
2
High l-avg with centos 4.8 on G2 only
Hi We deployed centos 4.8 on HP DL380 G2, G3 and G4 servers (same number of cpus). The same software is running on all servers. Only on G2 servers we see a low cpu utilization combined with high load-average. For example, during the same time of day and same workload, on a G2 I see a l-avg of 11.31 and on a G4 I see 2.68. The server response time seems unchanged and we don't have any problem
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
2007 Sep 13
1
Subset Quirk?
Hello All, I am trying to subset a matrix using subset() and it works fine when I use matrix notation, but doesn't work when I use established column names. Sample code is below: library(mvtnorm) library(sm) library(ltm) library(irtoys) k<- 100 set.seed(271828) t <- rmvnorm(n=k,mean=c(-1,0,1),sigma=matrix(c(1,.8,.5,.8,1,.8,.5,.8,1),3,3)) colMeans(t) var(t) pairs(t) #tview
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 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
2013 Jan 23
1
Arguments passing through dot-dot-dot lose ability to check for missing()?
Hi R-devel. Is the following behavior in g1() and h1() expected? It seems to make "..." arguments work slightly differently from named arguments. #missing() has the property that it looks "up the chain" #for example, "z" can be missing in f3 even if #that argument did have a name ("y") in f2 f1 <- function(x, ...) { cat("In f1, missing(x) is
2007 Nov 22
3
anova planned comparisons/contrasts
Hi, I'm trying to figure out how anova works in R by translating the examples in Sokal And Rohlf's (1995 3rd edition) Biometry. I've hit a snag with planned comparisons, their box 9.4 and section 9.6. It's a basic anova design: treatment <- factor(rep(c("control", "glucose", "fructose", "gluc+fruct",
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
2011 Jan 11
1
how to sort new data frame based on the original data frame
I have a really simple question I have a data frame of 8 variables (the first column is the subjects' id): SubID G1 G2 G3 G4 W1 W2 W3 W4 1 6 5 6 2 6 2 2 4 2 6 4 7 2 6 6 2 3 3 5 5 5 5 5 5 4 5
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