Re: [R] divergent colors around zero in levelplot()

2013-11-23 Thread Achim Zeileis
On Fri, 22 Nov 2013, Don McKenzie wrote: I would like to produce a levelplot with divergent colors such that increasingly negative values of Z get darker in the first color and increasingly positive values get darker in the second color. this is common in cartography. I have tried tinkering

[R] [R-pkgs] Hmisc package 3.13-0

2013-11-23 Thread Frank Harrell
A significant update to the Hmisc package is now available on CRAN for all platforms. Hmisc source is now on github at https://github.com/harrelfe/Hmisc and the full change log may be found at https://github.com/harrelfe/Hmisc/commits/master The most important updates are additions of new

[R] how to melt variable to one variable

2013-11-23 Thread maggy yan
I want to make a stacked bar plot with one bar for two variables from my data chir, the two variables have about 100 values like no, yes and na. I want to show how many no, yes and na they both have together with the stacked bar. I tried to melt these to variables first like this:

Re: [R] Combine columns having same column name from multiple data frames

2013-11-23 Thread arun
Hi, You may try: lapply(seq_len(ncol(data1)),function(i) {x1 - do.call(cbind,lapply(lapply(as.list(paste0(data,1:3)),get),`[`,i)); write.csv(x1,paste0(new,i,.csv),quote=FALSE) }) A.K. Dear All, I am trying to combine columns having same name from 3 different data frames and create new data

[R] Randomize two categories testing a specific condition R version 3.0.2 windows 32 bit

2013-11-23 Thread Manos Spanakis
Hello everyone I am new to R. At this time I am trying to create a vector so i can randomize two categories a,b under the following conditions : Take a random x from random uniform(0,1) if x0.5 then the vector takes value a else takes b . This continues until the number of a's-the number of b's 2

[R] Question about compatibility

2013-11-23 Thread Juan Manuel Reyes S
Dear R- project I am beginning to work in R. When I was trying to read data for external files with command read.table in R, R was reporting me: example=read.table(file=example.text, header=TRUE,sep=,) Error in file(file, rt) : It is not posible to open connection Además: Mensajes de aviso

Re: [R] Question about compatibility

2013-11-23 Thread Patrick Burns
If you are anything like me, then the main thing that you could do to win the game is to type the name of the file correctly. Given that is a near impossibility for me, when I'm on Windows I use 'file.choose' to get the correct name. Your command would look like:

[R] Problems dealing with matrices

2013-11-23 Thread halim10-fes
Dear R-friends, Hope you doing well. I've been trying to deal with the following problem for the couple of days but couldn't come up with a solution. It would be great if any of you could give some insight into it. I have three matrices like:

Re: [R] how to melt variable to one variable

2013-11-23 Thread arun
Hi, I am not getting any errors. data_chir - read.table(text=N1_re N2_re N3_re yes no no no yes no na yes yes no na no,sep=,header=TRUE,stringsAsFactors=FALSE,na.strings=na) library(reshape2) melt(data_chir, measure.vars=c(N1_re, N2_re), var=zpd)   N3_re   zpd value 1    no N1_re   yes 2    no

Re: [R] Randomize two categories testing a specific condition R version 3.0.2 windows 32 bit

2013-11-23 Thread Daniel Nordlund
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Manos Spanakis Sent: Saturday, November 23, 2013 1:48 AM To: R-help@r-project.org Subject: [R] Randomize two categories testing a specific condition R version 3.0.2 windows 32

[R] Label point with (x,hat(y))

2013-11-23 Thread David Arnold
Hi, I'd like to do this: text(1,3,(x,yhat),pos=3) But using (x,hat(y)). Any suggestions? D. -- View this message in context: http://r.789695.n4.nabble.com/Label-point-with-x-hat-y-tp4681049.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Label point with (x,hat(y))

2013-11-23 Thread Jorge I Velez
Try R plot(1:10) R text(1,3, expression((x, *hat(y)*)), pos=3) Best, Jorge.- On Sun, Nov 24, 2013 at 10:51 AM, David Arnold dwarnol...@suddenlink.netwrote: Hi, I'd like to do this: text(1,3,(x,yhat),pos=3) But using (x,hat(y)). Any suggestions? D. -- View this message in

[R] Speeding up code

2013-11-23 Thread Amie Hunter
Hello R experts, I'm new to R and I'm wanting to know what is the best way to speed up my code. I've read that you can vectorize the code but I'm unsure on how to implement this into my code. df - data.frame(31790,31790) for (i in 1:31790) {   for (j in i:31790)   {    

[R] filehash error in the colbycol method for as.data.frame from a large object

2013-11-23 Thread andrewH
Dear Folks-- I have a 14 gig .csv file with 731 columns. I have read it into a colbycol object (which took overnight – about 16 hours) using the code below, which produced no warnings or error messages. The object, CPS62_12, is 49 gig. After the reading, summary() produced the output below and

Re: [R] Problems dealing with matrices

2013-11-23 Thread halim10-fes
Hi Arun, Thank you very much for your response. Sorry, if I couldn't explain clearly. I think, I should restate the problem to get exactly what I want. Here it goes: I have 2 matrices and 1 vector, namely, dcmat-matrix(c(0.13,0.61,0.25,0.00,0.00,0.00,0.52,0.37,0.09,0.00,0.00,0.00,

[R] How should I specify partially crossed random effects in lme?

2013-11-23 Thread Pradeep Babu S.
Dear all, I am new to R and would like your help with lme formula for partially crossed random effect in a random-intercept, random-slope model. In the longitudinal data I have, each subject (barring some dropouts) was tested at 5 different occasions. The standardized tests were administered by 3

Re: [R] Problems dealing with matrices

2013-11-23 Thread halim10-fes
Please apologize me! Earlier I've sent a message erroneously. Following is the original problem for which I'm seeking help. Extremely sorry... Hi Arun, Thank you very much for your response. Sorry, if I couldn't explain clearly. I think, I should restate the problem to get exactly what I

Re: [R] Speeding up code

2013-11-23 Thread Jeff Newmiller
What is cldm? We (and therefore you, to verify that we can) should be able to copy the example from the email and paste it into a newly-started instance of R. Not having some example data similar to yours to work with puts us at a major disadvantage. It would also be helpful to know what you