Re: [R] How to use lm() output for systemfit() 'Seemingly unrelated regression'

2010-09-06 Thread zbynek.jano...@gmail.com
Thanks, it works fine now. -- View this message in context: http://r.789695.n4.nabble.com/How-to-use-lm-output-for-systemfit-Seemingly-unrelated-regression-tp2525418p2527946.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-pro

[R] representing NULL values in a vector

2010-09-06 Thread raje...@cse.iitm.ac.in
Hi, I have a vector who contents should look like this, "c" "d" NULL "e" "f" etc or 4 5 6 NULL 7 8 9 how can I represent the null value? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/l

[R] max limit of list size and vector size?

2010-09-06 Thread raje...@cse.iitm.ac.in
Hi, Is it possible for me to store a list of vectors of 1 million entries? like, cc<-list(c(1,2,1million),c(1,2,1million)) also what is the length of the longest string in R? I keep getting info from a socket and keep pasting on a string...when will this start becoming a pr

[R] Correct coefficients from treatment contrasts?

2010-09-06 Thread B W
Hello,Iam trying to take the information from the summary of my best fit logisticregression model for the occurrence of a high elevation plant spp. and createthe appropriate equation that will calculate probability of occurrence, given thedata. My predictors include both continuous variables (s

Re: [R] colorRamp of image to span larger range than dataset

2010-09-06 Thread Barry Rowlingson
On Mon, Sep 6, 2010 at 2:21 AM, wrote: > colorRampPalette returns a function, not a list of colours.  You might want > to try something like: > > ascols <- >    colorRampPalette(c("gray", "yellow", "darkgoldenrod1", "orange", "red"), > interpolate="spline") > x <- 10*(1:nrow(volcano)) > y <- 10

Re: [R] representing NULL values in a vector

2010-09-06 Thread Patrick Burns
Perhaps you mean NA rather than NULL. If NA is not what you want, then I think you'll need to explain your application. On 06/09/2010 06:00, raje...@cse.iitm.ac.in wrote: Hi, I have a vector who contents should look like this, "c" "d" NULL "e" "f" etc or 4 5 6 NULL 7 8 9 how can I represent

Re: [R] how do I transform this to a for loop

2010-09-06 Thread Karl Brand
Hi Bill, I didn't make the original post, but its pretty similar to some thing i would have queried the list about. But, as an R dilatante i find more curious your question- "...but why would you want to do so?" Is this because you'd typically use the given nine lines of explicit code to ca

Re: [R] representing NULL values in a vector

2010-09-06 Thread Jim Lemon
On 09/06/2010 03:00 PM, raje...@cse.iitm.ac.in wrote: Hi, I have a vector who contents should look like this, "c" "d" NULL "e" "f" etc or 4 5 6 NULL 7 8 9 how can I represent the null value? Hi rajesh, For character vectors, "" will probably suffice, but for numbers, you are probably stuck

[R] replacing functions

2010-09-06 Thread Karen Sargsyan
Dear All, Is it possible to replace function with my own? I want to apply pca clustering, but to use some strange correlation function. I'm asking about replacing, say, mean() with new content of mean() and use standard other functions, which might use mean() as part. karsar __

Re: [R] how do I transform this to a for loop

2010-09-06 Thread Paul Hiemstra
Hi Karl, The "why do it like this" is probably direct towards creating 9 new objects for the arima results (Is this right Bill?). A better option would be to create a list with nine entries. This is much easier for any subsequent analyses. An example that uses lapply (an efficient syntax for

Re: [R] replacing functions

2010-09-06 Thread Paul Hiemstra
Hi Karsar, To replace mean you can make a new function with the same name: l = runif(10) mean(l) mean = function(x) return(1) mean(l) But there must be a better way... cheers, Paul On 09/06/2010 11:52 AM, Karen Sargsyan wrote: Dear All, Is it possible to replace function with my own? I wan

Re: [R] how do I transform this to a for loop

2010-09-06 Thread Ivan Calandra
Hi Karl, I think the question here is why would you want to create different objects in the loop using assign(). Usually, using lists is better (more efficient?), although I sometimes use assign() too in this context. I do it when I want to export the object as separate files (xls, Rbin, svg,

[R] Finding the two most recent dates

2010-09-06 Thread Newbie19_02
Dear R help, I have the following data frame: structure(list(prochi = c("ind_1", "ind_1", "ind_1", "ind_1", "ind_1", "ind_1", "ind_1", "ind_1", "ind_1", "ind_1"), date_1st_event = structure(c(14784, 14784, 14784, 14784, 14784, 14784, 14784, 14784, 14784, 14784 ), class = "Date"), bp_date = st

Re: [R] R time series analysis

2010-09-06 Thread matteodefelice
lord12 wrote: > > I have a data file with a given time series of price data and I would like > to split the time series into a test set and training set. I would then > like to build an ARIMA model on the training set and apply this model on > test set. > I had recently the same problem and, a

Re: [R] representing NULL values in a vector

2010-09-06 Thread Duncan Murdoch
On 06/09/2010 1:00 AM, raje...@cse.iitm.ac.in wrote: Hi, I have a vector who contents should look like this, "c" "d" NULL "e" "f" etc or 4 5 6 NULL 7 8 9 how can I represent the null value? As others have said, you probably want NA rather than NULL. If you really want NULL, then use a li

[R] size limit of string/parse a string and convert to vector

2010-09-06 Thread raje...@cse.iitm.ac.in
Hi, I have a loop as follows, dataStr <- character(0) repeat{ fstr<-read.socket(sockfd) if(fstr=="") break dataStr<-paste(dataStr,fstr) } at what point does dataStr stop accepting(gets full)? I'm sending millions of records over the socket and need to know if all of it can go into dat

[R] Strange behavior of interval values in optimize()

2010-09-06 Thread Michael Bernsteiner
Hi all, I'm using optimize() to find the minimum of the following function f, and minimize it (without f<-function(delta,P,U){ minimiz<-P+delta*U x<-minimiz[1] y<-minimiz[2] z<-100*(y-x^2)^2+(1-x)^2 return(z) } result<-optimize(f, interval=c(-1, 1), P=c(0.99,1.01), U=c

Re: [R] representing NULL values in a vector

2010-09-06 Thread raje...@cse.iitm.ac.in
NA is good.thanks - Original Message - From: Patrick Burns To: r-help@r-project.org, raje...@cse.iitm.ac.in Sent: Mon, 06 Sep 2010 13:55:34 +0530 (IST) Subject: Re: [R] representing NULL values in a vector Perhaps you mean NA rather than NULL. If NA is not what you want, then I think yo

Re: [R] Installing rJava fails on Gentoo (amd64) with Sun JDK - checking JNI data types... error

2010-09-06 Thread Helgi Tomasson
Try the following: as super-user java-config -L java-config -S (put a number pointing to sun-jdk-1.6) R CMD javareconf export JAVA_HOME=/usr/lib/jvm/sun-jdk-1.6/jre export R_JAVA_LD_LIBRARY_PATH=${JAVA_HOME}/lib/amd64/server: ${JAVA_HOME}/lib/amd64: ${JAVA_HOME}/../lib/amd64::/usr/java/packa

Re: [R] how to cluster vectors of factors

2010-09-06 Thread Rafael Björk
If I understand you correctly and each factor consists of binary data, you may want to check out monothethic analysis, available in the package 'cluster'. For a simple example and short description of the method to get you started, just type in: require(cluster) ?mona As far as i know there's no

[R] Creating named.list from two matrix columns

2010-09-06 Thread Viki S
Hi Friends, I am new to R. On R utility class pages, creating "named.list" is described with this command : new("named.list",a=1,b=2) For large matrix having two columns, such as : "row1" 2334 "row2" 347 "row3" 379 ... I want to create a named.list like : $row1 [1] 2334 $row2 [1] 347

Re: [R] Finding the two most recent dates

2010-09-06 Thread Paul Hiemstra
Hi Natalie, By far the easiest thing to do is to convert the date to a special date class. See as.POSIXct for example. I'm not sure that 14784 means, nor what the data says in the bp_date column. Probably the two combine into a specific date? Once you've converted the columns into a POSIXct

[R] Two images functions

2010-09-06 Thread Alaios
Hello everyone. I would like to ask you what happens when two functions with the same name exist. I discovered this today when I wrote ?images (I was trying to understand how it works) ?images gave me the following output: Help on topic 'image' was found in the following packages: Image (in pa

Re: [R] Two images functions

2010-09-06 Thread Duncan Murdoch
On 06/09/2010 8:14 AM, Alaios wrote: Hello everyone. I would like to ask you what happens when two functions with the same name exist. I discovered this today when I wrote ?images (I was trying to understand how it works) ?images gave me the following output: Help on topic 'image' was found

Re: [R] Finding the two most recent dates

2010-09-06 Thread Dieter Menne
Nathalie, your method of sending sample data is fine. dt = structure(list(prochi = c("ind_1", "ind_1", "ind_1", "ind_1", "ind_1", "ind_1", "ind_1", "ind_1", "ind_1", "ind_1"), date_1st_event = structure(c(14784, 14784, 14784, 14784, 14784, 14784, 14784, 14784, 14784, 14784 ), class = "Date"), b

Re: [R] Finding the two most recent dates

2010-09-06 Thread jim holtman
Here is one way of doing it: > x prochi date_1st_eventbp_date SBP DBP 108 ind_1 2010-06-24 2004-08-30 135 85 109 ind_1 2010-06-24 2009-11-23 160 80 110 ind_1 2010-06-24 2006-09-01 135 NA 111 ind_1 2010-06-24 2005-10-24 153 79 112 ind_1 2010-06-24 2002-11-21 150

Re: [R] anova of glm output

2010-09-06 Thread Dieter Menne
francogrex wrote: > > out <- glm(response~Var1+Var2+Var3..,family=binomial,data=mydata) > summary(out) > stepAIC(out) > anova(out, test='Chisq') > I understand that stepAIC is used to select the model with the lowest AIC > (the best model) but can someone explain what is the purpose of doing the

Re: [R] Creating named.list from two matrix columns

2010-09-06 Thread jim holtman
Is this what you want: > x V1 V2 1 row1 2334 2 row2 347 3 row3 379 > x.list <- as.list(x$V2) > names(x.list) <- x$V1 > x.list $row1 [1] 2334 $row2 [1] 347 $row3 [1] 379 On Mon, Sep 6, 2010 at 7:55 AM, Viki S wrote: > > Hi Friends, > I am new to R. > > On R utility class pages, creati

[R] dataframe row names from list

2010-09-06 Thread raje...@cse.iitm.ac.in
Hi, I have a list which looks like this... > str(y) List of 10 $ : chr [1:4] "ABCD" "5" "0" "1" $ : chr [1:4] "DEF" "15" "1" "16" $ : chr [1:4] "AAA" "2" "17" "8" $ : chr [1:4] "SSS" "15" "25" "1" $ : chr [1:4] "III" "15" "26" "4" $ : chr [1:4] "OPQ" "7" "30" "4" $ : chr [1:4] "TYR" "14" "3

Re: [R] replacing functions

2010-09-06 Thread Dieter Menne
Karen Sargsyan wrote: > > Is it possible to replace function with my own? I want to apply pca > clustering, but to use some strange correlation function. I'm asking about > replacing, say, mean() with new content of mean() and use standard other > functions, which might use mean() as part. >

[R] inserting a vector as a row in a data.frame

2010-09-06 Thread raje...@cse.iitm.ac.in
Hi, is it possible to insert a vector as a row in a data.frame? [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/pos

Re: [R] Strange behavior of interval values in optimize()

2010-09-06 Thread Dieter Menne
Michael Bernsteiner wrote: > > > I'm using optimize() to find the minimum of the following function f, and > minimize it (without > . > But, when I choose a larger Interval in the optimization method: > > The result gets worse (even though the old interval is included in the new > one

[R] anova of glm output

2010-09-06 Thread francogrex
Hi, this is more related to understanding some statistics while using R; I've see such output in a paper: out <- glm(response~Var1+Var2+Var3..,family=binomial,data=mydata) summary(out) stepAIC(out) anova(out, test='Chisq') I understand that stepAIC is used to select the model with the lowest AIC (

[R] How to get "mypkg-manual.pdf"

2010-09-06 Thread Juliet Ndukum
I am building a package say mypkg. Five months ago, when I built the package I got the mypkg manual in pdf format. Today, after making updates, I build the same package, same name, and steps; unfortunately I do not get the manual in pdf format. Rather I get the following message: cd: can't cd

Re: [R] size limit of string/parse a string and convert to vector

2010-09-06 Thread jim holtman
try this: > x <- "|1,ab,2.34|2,cd,3.44|" > # split by the "|" and remove vectors of zero characters > x.sp <- strsplit(x, '|', fixed = TRUE)[[1]] > x.sp <- x.sp[nchar(x.sp) > 0] > # now split by comma > x.comma <- strsplit(x.sp, ',') > # you can now access you data > x.comma [[1]] [1] "1""ab"

Re: [R] dataframe row names from list

2010-09-06 Thread Ivan Calandra
Hi! I'm sure there's an easier way, but that works for me: test_list <- list(c("ABC","5","0"), c("DEF","10","1")) ##just a part of your example, think about using dput() to create a copy/pastable example test_df <- t(as.data.frame(test_list)[-1,]) rownames(test_df) <- t(as.data.frame(test_list

Re: [R] max limit of list size and vector size?

2010-09-06 Thread jim holtman
It is easy to store a list of that size: > x <- list(1:1e6, 1:1e6, 1:1e6) > object.size(x) 12000112 bytes > str(x) List of 3 $ : int [1:100] 1 2 3 4 5 6 7 8 9 10 ... $ : int [1:100] 1 2 3 4 5 6 7 8 9 10 ... $ : int [1:100] 1 2 3 4 5 6 7 8 9 10 ... Now it really depends on how you a

Re: [R] inserting a vector as a row in a data.frame

2010-09-06 Thread Ivan Calandra
Hi again, see ?rbind Ivan Le 9/6/2010 14:11, raje...@cse.iitm.ac.in a écrit : > Hi, > > is it possible to insert a vector as a row in a data.frame? > [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list > https://stat

Re: [R] Correct coefficients from treatment contrasts?

2010-09-06 Thread David Winsemius
On Sep 6, 2010, at 4:03 AM, B W wrote: ->Hello,I am trying to take the information from the summary of my best fit logisticregression model for the occurrence of a high elevation plant spp. and create the appropriate equation that will calculate probability of occurrence, given the data.

Re: [R] extracting x,y coordinates from a contour plot

2010-09-06 Thread Charles Annis, P.E.
Thank you, David: I obviously didn't look hard enough. This is exactly what I need. Charles Annis, P.E. charles.an...@statisticalengineering.com 561-352-9699 http://www.StatisticalEngineering.com -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org

[R] nlme Output

2010-09-06 Thread Edward Patzelt
Everyone - What do the NaN's mean here? Is this analysis a problem? Linear mixed-effects model fit by maximum likelihood Data: tmp.dat AIC BIClogLik 1611.251 1638.363 -797.6253 Random effects: Formula: ~1 | group_id (Intercept) Residual StdDev: 0.0003077668 9.23671

[R] Help on write.xlsx library(xlsx)

2010-09-06 Thread Ravi S. Shankar
Hi Adrian, dat=data.frame(matrix(0,3,3)) write.xlsx(dat,"z:/dat.xlsx",sheetName="sheet1",append=F) write.xlsx(dat,"z:/dat.xlsx",sheetName="sheet2",append=F) The above code works and creates new worksheets. But if I want to append to an existing worksheet I seem to get an error. wri

Re: [R] how do I transform this to a for loop

2010-09-06 Thread Karl Brand
Hi Paul, Ivan, Hartstikke bedankt and thanks alot for sharing these thoughts. I can see 'listing up' multiple symmetrical data sets makes a lot of sense. As does using lapply() on them which i understand to be more efficient/faster than for(). Goodo- with your concensus (and helpful examples

Re: [R] nlme Output

2010-09-06 Thread ONKELINX, Thierry
Dear Edward, You have no degrees of freedom left to estimate those p-values. Your design does not allows for the model your implemented. We need a brief summary of your design in order to help you further. HTH, Thierry ---

[R] Aggregating the matrices

2010-09-06 Thread Sergey Goriatchev
Hello everyone. Say we have the following: a <- matrix(c(-75, 3, 5, 9, 2, 3, 5), nrow=1, dim=list("06092010", c("ES", "PT", "Z ", "CF", "GX", "ST", "EO"))) b <- matrix(c(-5, 2, 4, 12, 5), nrow=1, dim=list("06092010", c("PT", "CF", "AT", "EM", "ST"))) d <- cbind(a, b) I want to calculate sums of

Re: [R] Finding the two most recent dates

2010-09-06 Thread Newbie19_02
Dear all, Thanks very much for the replies and for the help. This whole data set consists of about 7000 individuals who have had multiple blood pressure measures taken over time so I just used one individual as an example. I'm sorry if it looked like homework...it isn't. Jim your solution wo

Re: [R] Aggregating the matrices

2010-09-06 Thread Gabor Grothendieck
On Mon, Sep 6, 2010 at 9:56 AM, Sergey Goriatchev wrote: > Hello everyone. > > Say we have the following: > > a <- matrix(c(-75, 3, 5, 9, 2, 3, 5), nrow=1, dim=list("06092010", > c("ES", "PT", "Z ", "CF", "GX", "ST", "EO"))) > b <- matrix(c(-5, 2, 4, 12, 5), nrow=1, dim=list("06092010", c("PT", >

Re: [R] Aggregating the matrices

2010-09-06 Thread David Winsemius
On Sep 6, 2010, at 9:56 AM, Sergey Goriatchev wrote: Hello everyone. Say we have the following: a <- matrix(c(-75, 3, 5, 9, 2, 3, 5), nrow=1, dim=list("06092010", c("ES", "PT", "Z ", "CF", "GX", "ST", "EO"))) b <- matrix(c(-5, 2, 4, 12, 5), nrow=1, dim=list("06092010", c("PT", "CF", "AT", "EM

[R] Time Series

2010-09-06 Thread trb1
Hi How would I analyse time series with - different lengths (i.e. one has 9 entries and the other has 14 entries) - different frequency (i.e. dates are random - no repeated length) - multiple values for the same time entry (e.g. 2009-10-23 below) i.e. my data takes the form: 1st time series 2

Re: [R] Aggregating the matrices

2010-09-06 Thread Sergey Goriatchev
Gabor, David, thank you. David, your last suggestion is what I need. Regards, Sergey On Mon, Sep 6, 2010 at 16:12, David Winsemius wrote: > > On Sep 6, 2010, at 9:56 AM, Sergey Goriatchev wrote: > >> Hello everyone. >> >> Say we have the following: >> >> a <- matrix(c(-75, 3, 5, 9, 2, 3, 5), nr

Re: [R] mac: lib/gtk.pkg

2010-09-06 Thread David Winsemius
On Sep 5, 2010, at 10:32 AM, Daniele Sluijters wrote: Hello, I'm sorry to just pop-up on the mailing list like this and ask a relatively non-R related question but I had no idea whom else to contact on this matter. I'm working on a completely different port of an application to OS X whic

[R] Aggregate certain rows in a matrix

2010-09-06 Thread Kennedy
Hi, I have a matrix that looks like this a <- c(1,1,1,1,2,2,3,3,3,3) b <- c(2,2,2,3,4,4,4,5,5,6) c <- c(1,2,3,4,5,6,7,8,9,10) M <- matrix(nr=10,nc=3) M[,1] <- a M[,2] <- b M[,3] <- c > M [,1] [,2] [,3] [1,]121 [2,]122 [3,]123 [4,]

[R] calculating area between plot lines

2010-09-06 Thread A. Marcia BARBOSA
Hi everyone. I have these data: probClass<-seq(0,0.9,0.1) prob1<-c(0.0070,0.0911,0.1973,0.2949,0.3936,0.5030,0.5985,0.6869,0.7820,0.8822) prob2<-c(0.0066,0.0791,0.2358,0.3478,0.3714,0.3860,0.6667,0.6400,0.7000,1.) # which I'm plotting as follows: plot(probClass,prob1,xlim=c(0,1),ylim=c(0,1),

Re: [R] Aggregate certain rows in a matrix

2010-09-06 Thread Dimitris Rizopoulos
one way is the following: M <- cbind(c(1,1,1,1,2,2,3,3,3,3), c(2,2,2,3,4,4,4,5,5,6), c(1,2,3,4,5,6,7,8,9,10)) ind <- do.call(paste, c(as.data.frame(M[, 1:2], sep = "\r"))) M[, 3] <- ave(M[, 3], ind, FUN = "sum") unique(M) I hope it helps. Best, Dimitris On 9/6/2010 4:29 PM, Kennedy wrot

Re: [R] Aggregate certain rows in a matrix

2010-09-06 Thread Barry Rowlingson
On Mon, Sep 6, 2010 at 3:29 PM, Kennedy wrote: > I want to reduce the matrix according to the following: If the values of the > two first columns are the same in two or more rows the values in the third > column of the corresponding rows should be added and only one of the rows > should be keept.

[R] How R converts data between objects

2010-09-06 Thread Alaios
Hello everyone. I would kindly request your help concerning how R converts data between different structrures. In the following example please keep attention on the following two 1) I create f <- GaussRF(x=x, y=y, model=model, grid=TRUE,param=c(mean, variance, nugget, scale, alpha)) with ima

Re: [R] How to get "mypkg-manual.pdf"

2010-09-06 Thread Duncan Murdoch
On 06/09/2010 9:19 AM, Juliet Ndukum wrote: I am building a package say mypkg. Five months ago, when I built the package I got the mypkg manual in pdf format. Today, after making updates, I build the same package, same name, and steps; unfortunately I do not get the manual in pdf format. Rath

Re: [R] Time Series

2010-09-06 Thread Gabor Grothendieck
On Mon, Sep 6, 2010 at 10:24 AM, trb1 wrote: > > Hi > > How would I analyse time series with > - different lengths (i.e. one has 9 entries and the other has 14 entries) > - different frequency (i.e. dates are random - no repeated length) > - multiple values for the same time entry (e.g. 2009-10-23

[R] rbind() overwriting data.frame()

2010-09-06 Thread rajesh j
Hi, first off, I wanna ask how do I declare a data.frame of 0 rows and n columns? Coming to my problem, I have a data.frame of 22 columns by dynamic rows which I insert using rbind. The total number of rows could go upto 2,00,000. The problem is that after about 800 or 900 get inserted rbind sta

Re: [R] rbind() overwriting data.frame()

2010-09-06 Thread Ivan Calandra
Hi again! I'm trying to follow your general goal from your questions today but it's not easy. First, declaring a data.frame of 0 rows is a bad idea. It is much faster to define the length and number of rows from the beginning and to fill it then. Second, I don't know how to do it! What I kn

Re: [R] Aggregate certain rows in a matrix

2010-09-06 Thread David Winsemius
On Sep 6, 2010, at 10:47 AM, Dimitris Rizopoulos wrote: one way is the following: M <- cbind(c(1,1,1,1,2,2,3,3,3,3), c(2,2,2,3,4,4,4,5,5,6), c(1,2,3,4,5,6,7,8,9,10)) ind <- do.call(paste, c(as.data.frame(M[, 1:2], sep = "\r"))) M[, 3] <- ave(M[, 3], ind, FUN = "sum") unique(M) I had been

Re: [R] rbind() overwriting data.frame()

2010-09-06 Thread ONKELINX, Thierry
This will give a matrix with 0 rows. data.frame(matrix(nrow = 0, ncol = 22, dimnames = list(NULL, LETTERS[1:22]))) But you should avoid growing dataframes is the final dataframe is going to be large. You are very likely to get memory problems. It is much to better to create a large enough datafr

Re: [R] Strange behavior of interval values in optimize()

2010-09-06 Thread Michael Bernsteiner
that was my first idea as well, but as the result shows, the minimized function value of the wider interval is greater. In addidtion, the problem also exists, if the minimized parameter in the case of the larger interval also already lies within the smaller interval: f<-function(delta,P,U){

[R] path analysis

2010-09-06 Thread Guy rotem
Hi. which package i need to install to be able to run "Path analysis" using r? many thanks, Guy -- Guy Rotem Department of Life Sciences The Spatial Ecology Lab Ben Gurion University of the Negev P.O.B. 653 Beer-Sheva 84105 ISRAEL +972-52-3354485 (mobile) +972-8-6461350 (lab) [[alte

[R] boxplot knowing Q1, Q3, median, upper and lower whisker value

2010-09-06 Thread David A.
Dear list, I am using a external program that outputs Q1, Q3, median, upper and lower whisker values for various datasets simultaneously in a tab delimited format. After importing this text file into R, I would like to plot a boxplot using these given values and not the original series of data

Re: [R] rbind() overwriting data.frame()

2010-09-06 Thread rajesh j
But If I do that how will I resize later? On Mon, Sep 6, 2010 at 8:54 PM, ONKELINX, Thierry wrote: > This will give a matrix with 0 rows. > > data.frame(matrix(nrow = 0, ncol = 22, dimnames = list(NULL, > LETTERS[1:22]))) > > But you should avoid growing dataframes is the final dataframe is goin

Re: [R] Time Series

2010-09-06 Thread trb1
Thank you very much for your post. Your answer has been very helpful. Is it possible to merge >2 time series? -- View this message in context: http://r.789695.n4.nabble.com/Time-Series-tp2528444p2528584.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] rbind() overwriting data.frame()

2010-09-06 Thread rajesh j
Also, when I create the data.frame with matrix and try to rbind, I get warnings.. Warning messages: 1: In `[<-.factor`(`*tmp*`, ri, value = "4") : invalid factor level, NAs generated 2: In `[<-.factor`(`*tmp*`, ri, value = "5") : invalid factor level, NAs generated 3: In `[<-.factor`(`*tmp*`, r

[R] WriteXLS problem

2010-09-06 Thread Kenneth Roy Cabrera Torres
Hi R users: I don't know if you have had the following problem trying to export to an "xls" format file in a non windows platform. I try to use the following packages: 1. dataframes2xls (version 0.4.4) (with phyton 2.7 and 3.1) 2. WriteXLS (version 1.9.0) (with perl and testPerl working) Even "x

Re: [R] WriteXLS problem

2010-09-06 Thread Ivan Calandra
Hi, Are you sure you used the correct syntax and object names? It might just be because of that...(reading the error messages) There is another function, xlsReadWrite::write.xls(), that I like a lot: it is really easy to use and does not require Perl or Python. HTH, Ivan Le 9/6/2010 18:03, K

Re: [R] path analysis

2010-09-06 Thread Sarah Goslee
There are lots of options for path analysis in R. If you go to http://www.rseek.org and type path analysis into the search box, you will get lots of information on functions/packages, and more general info as well. Beyond that, we'd need more specifics about your task. Sarah On Mon, Sep 6, 2010

Re: [R] boxplot knowing Q1, Q3, median, upper and lower whisker value

2010-09-06 Thread Joshua Wiley
Hi Dave, You can look at the function ?bxp it might work for you. Alternately, create a meaningless boxplot object, and then just edit that data, in which case I know it will work with bxp(). # Create a boxplot, the data does not matter x <- boxplot(1:10) x # view the data for the boxplot x$sta

[R] How to run R on Emacs+ESS

2010-09-06 Thread Stephen Liu
Hi folks, Debian 504 64-bit I found following document; http://www.biostat.wisc.edu/~kbroman/Rintro/ Whether it is the right document for installing Emacs+ESS and R so that R can run on Emacs? TIA B.R. Stephen L __ R-help@r-project.org mailing l

Re: [R] WriteXLS problem

2010-09-06 Thread Kenneth Roy Cabrera Torres
Thank you Ivan for you answer: El lun, 06-09-2010 a las 18:11 +0200, Ivan Calandra escribió: > Hi, > > Are you sure you used the correct syntax and object names? It might just > be because of that...(reading the error messages) Im sure, because it works with write.csv or write.table. > There is a

Re: [R] How to run R on Emacs+ESS

2010-09-06 Thread Dirk Eddelbuettel
On 6 September 2010 at 09:18, Stephen Liu wrote: | Hi folks, | | Debian 504 64-bit Good. All you need is sudo apt-get install ess | I found following document; | http://www.biostat.wisc.edu/~kbroman/Rintro/ | | Whether it is the right document for installing Emacs+ESS and R so that R can

Re: [R] WriteXLS problem

2010-09-06 Thread David Winsemius
On Sep 6, 2010, at 12:25 PM, Kenneth Roy Cabrera Torres wrote: Thank you Ivan for you answer: El lun, 06-09-2010 a las 18:11 +0200, Ivan Calandra escribió: Hi, Are you sure you used the correct syntax and object names? It might just be because of that...(reading the error messages) Im sur

Re: [R] WriteXLS problem

2010-09-06 Thread Kenneth Roy Cabrera Torres
I use the following sintaxis for the packages: For WriteXLS I use: writeXLS(todo2009,"todo2009.xls") And for dataframes2xls I use: dataframe2xls::write.xls(todo2009,"todo2009.xls") El lun, 06-09-2010 a las 12:34 -0400, David Winsemius escribió: > On Sep 6, 2010, at 12:25 PM, Kenneth Roy Cabre

Re: [R] How can I fixe convergence=1 in optim

2010-09-06 Thread Ben Bolker
[forwarding back to r-help for archiving/further discussion] On 10-09-05 08:48 PM, Sally Luo wrote: > Prof. Bolker, > > Thanks for your reply and the helpful info. > > I still have a few questions. > > 1. I also tried to use different methods other than "BFGS" without > changing their def

[R] poisson distribution

2010-09-06 Thread tamas barjak
Hello! I need some help. How I know it to draw the formula of the poisson distribution? expr<-expression(P(xi == k) == frac(lambda^k, factorial(k))*e^-lambda) ---> not good on the screen the " k! " not the Poisson Formula, but "factorial(k)" Thanx! [[alternative HTML version deleted]]

[R] Failure to aggregate

2010-09-06 Thread Dimitri Shvorob
I have a (very big - 1.5 rows) dataframe with a (POSIXt" "POSIXlt") column h (hour). Surprisingly, I cannot calculate a simple aggregate over the dataframe. > n.h1 = sqldf("select distinct h, count(*) from x group by h") Error in sqliteExecStatement(con, statement, bind.data) : RS-DBI driver:

[R] sample a matrix with one element to be 1 from wishart distribution

2010-09-06 Thread mou sonia
Hi, I am not sure if this make sense at all. I'd like to sample a matrix, which follows a wishart / inverted wishart distribution. However, the (1,1) element of this matrix should always be equal to 1. How can I handle it in R? Any suggestion is greatly appreciated. Thanks a lot. Sonia [

Re: [R] Creating named.list from two matrix columns

2010-09-06 Thread Viki S
Hi Jim, Thanks, That´s right. But the problem is that it introduces unnecessary quotes, perhaps due to the format of first column data in this case : x<-cbind(c("row:1", "row:2", "row:3"), c("4889", "9987", "494")) x1<-as.list(x[,2]) names(x1)<-x[,1] > x1 $`row:1` [1] "4889" $`row:2` [1] "9987"

[R] c++ equivalent switch statement?

2010-09-06 Thread rajesh j
Is there a c++ equivalent switch statement in R? -- Rajesh.J [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posti

[R] Over lay 2 scale in same plot

2010-09-06 Thread mamunbabu2001
Hi Everyone, I have two different data set in 2 different scale. I want to plot these two data in the same plot in their respective scale. So the plot will have 2 different scale. I have added an image below to show how it should look. does any bode has any idea how this can be done. 2 differen

[R] sample a matrix with one element to be 1 from wishart distribution

2010-09-06 Thread mou sonia
Hi, I am not sure if this make sense at all. I'd like to sample a matrix, which follows a wishart / inverted wishart distribution. However, the (1,1) element of this matrix should always be equal to 1. How can I handle it in R? Any suggestion is greatly appreciated. Thanks a lot. Sonia [

Re: [R] c++ equivalent switch statement?

2010-09-06 Thread romain
Le 06/09/10 19:17, rajesh j a écrit : > Is there a c++ equivalent switch statement in R? yes, with the same name. See the "R Language definition" : http://cran.r-project.org/doc/manuals/R-lang.html#switch If this is not what you want, maybe you could at least share some C++ code snippet of what

Re: [R] poisson distribution

2010-09-06 Thread David Winsemius
On Sep 6, 2010, at 1:13 PM, tamas barjak wrote: Hello! I need some help. How I know it to draw the formula of the poisson distribution? expr<-expression(P(xi == k) == frac(lambda^k, factorial(k))*e^- lambda) ---> not good ?plotmath (Do not see factorial as a plotmath "function" Try: ex

Re: [R] poisson distribution

2010-09-06 Thread tamas barjak
Successful! Thank you! 2010/9/6 David Winsemius > > On Sep 6, 2010, at 1:13 PM, tamas barjak wrote: > > Hello! >> >> I need some help. >> How I know it to draw the formula of the poisson distribution? >> >> expr<-expression(P(xi == k) == frac(lambda^k, factorial(k))*e^-lambda) >> ---> >> not

[R] ERCIM'10: Submission of abstracts

2010-09-06 Thread Uwe Ligges
Dear useRs, the deadline for submission of abstracts is approaching for ERCIM'10. Please upload your abstract until 2010-09-08 if you would like to give a presentation at our track on "Statistical Algorithms and Software" at the 3rd International Conference of the ERCIM WG on COMPUTING & STA

Re: [R] Failure to aggregate

2010-09-06 Thread David Winsemius
On Sep 6, 2010, at 12:15 PM, Dimitri Shvorob wrote: I have a (very big - 1.5 rows) dataframe with a (POSIXt" "POSIXlt") column h (hour). Surprisingly, I cannot calculate a simple aggregate over the dataframe. n.h1 = sqldf("select distinct h, count(*) from x group by h") Error in sqliteE

Re: [R] Over lay 2 scale in same plot

2010-09-06 Thread Joshua Wiley
Hi, Looking at the picture, I think you are just talking about plotting two datasets. Here is an example I made up, that looks sort of like your picture: # make a barplot barplot(-50:50) # add points into the existing plot at the coordinates set by x and y # and use a line to connect them points

Re: [R] Time Series

2010-09-06 Thread Gabor Grothendieck
On Mon, Sep 6, 2010 at 11:56 AM, trb1 wrote: > > Thank you very much for your post. > Your answer has been very helpful. > Is it possible to merge >2 time series? > zz is my posted code was formed by merging two univariate and one multivariate series. -- Statistics & Software Consulting GKX Gro

[R] combining collumns for data.frames

2010-09-06 Thread Martin Hughes
Hi This question is far less simple than the title suggests, please read carefully, thanks. I have 2 sets of data, both read into R >data1<-read.table ("1.txt", header=T, sep="\t") >data2<-read.table ("2.txt", header=T, sep="\t") >data1 Taxon stage1 stage2 stage3 stage4 T1 0

[R] how to change the xlab name?

2010-09-06 Thread tooblue
I simply put, plot(density(), main="", + xlab = "XXX"), it says that I have an unexpected "=" in it. -- View this message in context: http://r.789695.n4.nabble.com/how-to-change-the-xlab-name-tp2528733p2528733.html Sent from the R help mailing list archive at Nabble.com. __

Re: [R] Failure to aggregate

2010-09-06 Thread Gabor Grothendieck
On Mon, Sep 6, 2010 at 12:15 PM, Dimitri Shvorob wrote: > > I have a (very big - 1.5 rows) dataframe with a (POSIXt"  "POSIXlt") column h > (hour). Surprisingly, I cannot calculate a simple aggregate over the > dataframe. > >> n.h1 = sqldf("select distinct h, count(*) from x group by h") > Error i

Re: [R] how to change the xlab name?

2010-09-06 Thread Joshua Wiley
On Mon, Sep 6, 2010 at 11:07 AM, tooblue wrote: > > I simply put,  plot(density(), main="", + xlab = "XXX"), it says that > I have an unexpected "=" in it. You just have an extra ' + ' before the xlab argument: plot(density(rnorm(100)), main = "", xlab = "XXX") ought to do it. Chee

Re: [R] how to change the xlab name?

2010-09-06 Thread David Winsemius
On Sep 6, 2010, at 2:07 PM, tooblue wrote: I simply put, plot(density(), main="", + xlab = "XXX"), it says that I have an unexpected "=" in it. It may be a case of a confused parser. You have an extraneous "+" in there: > = rnorm(100) > plot(density(), main="",

[R] likelyhood maximization problem with polr

2010-09-06 Thread blackscorpio
Dear community, I am currently trying to fit an ordinal logistic regression model with the polr function. I often get the same error message : "attempt to find suitable starting values failed", for example with : require(MASS) data(iris) polr(Species~Sepal.Length+Sepal.Width+Petal.Length+Peta

[R] two questions

2010-09-06 Thread Iasonas Lamprianou
Dear friends, two questions (1) does anyone know if there are any non-parametric equivalents of the two-way ANOVA in R? I have an ordinal non-normally distributed dependent variable and two factors (gender and city of birth). Normally, one would try a two-way anova, but if R has any non-parame

[R] Help with unexpected symbol errors

2010-09-06 Thread Amit Patel
Hi I have got a long script which will not run for me as i keep getting errors : > source("clusterfixV1_4.r") Error in source("clusterfixV1_4.r") : clusterfixV1_4.r: unexpected symbol at 158: eck[k,2] <- as.numeric(1) 159: #ClusterInfo[k,2] <- "Clustered I have sorted all the

  1   2   >