Re: [R] tcltk lost after update r-base 2.11.1-2hardy0 to 2.11.1-5hardy0

2010-09-06 Thread Peter Dalgaard
On 09/06/2010 07:38 AM, Christian Lederer wrote: Dear R-Users, after the last upgrade from r-base 2.11.1-2hardy0 to 2.11.1-5hardy0 i lost the tlctk package. I this a general problem under Ubuntu Hardy or should i search for a configuration error on my system? Assuming that you didn't

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] 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

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 the

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

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 with NA.

[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

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,

[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 = structure(c(12660,

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, after

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 list (a

[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

[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),

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 pbu...@pburns.seanet.com 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

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

[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 ... Can

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

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 is...@live.com wrote: Hi Friends, I am new to R. On R utility class pages,

[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 34 8 $ : chr [1:4] IRTS 15 42 1 $ : chr [1:4] LLL 15

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. The

[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

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). In

[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

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] 1ab 2.34 [[2]] [1] 2

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)[1,]) HTH,

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 are

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

Re: [R] Correct coefficients from treatment contrasts?

2010-09-06 Thread David Winsemius
On Sep 6, 2010, at 4:03 AM, B W wrote: Snipped out formatting detritus and added back many missing speces. -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

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

[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

[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.

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

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 the columns that have similar

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

Re: [R] Aggregating the matrices

2010-09-06 Thread Gabor Grothendieck
On Mon, Sep 6, 2010 at 9:56 AM, Sergey Goriatchev serg...@gmail.com 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,

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, ST))) d - cbind(a, b) I

[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

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 dwinsem...@comcast.net 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,

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

[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,]13

[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:

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 wrote:

Re: [R] Aggregate certain rows in a matrix

2010-09-06 Thread Barry Rowlingson
On Mon, Sep 6, 2010 at 3:29 PM, Kennedy henrik.aldb...@gmail.com 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

[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

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.

Re: [R] Time Series

2010-09-06 Thread Gabor Grothendieck
On Mon, Sep 6, 2010 at 10:24 AM, trb1 thomasrbol...@yahoo.co.uk 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

[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

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

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

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)

[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

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 thierry.onkel...@inbo.bewrote: 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

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*`, ri,

[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

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,

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,

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

[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

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

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

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 Cabrera

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 default

[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 $`row:3` [1] 494

[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

[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] 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:

Re: [R] poisson distribution

2010-09-06 Thread tamas barjak
Successful! Thank you! 2010/9/6 David Winsemius dwinsem...@comcast.net 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) ---

[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

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

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

Re: [R] Time Series

2010-09-06 Thread Gabor Grothendieck
On Mon, Sep 6, 2010 at 11:56 AM, trb1 thomasrbol...@yahoo.co.uk 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

[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 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 dimitri.shvo...@gmail.com 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

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

2010-09-06 Thread Joshua Wiley
On Mon, Sep 6, 2010 at 11:07 AM, tooblue kai...@berkeley.edu 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

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=, xlab = XXX)

[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)

[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

[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 ones i

Re: [R] two questions

2010-09-06 Thread David Winsemius
The usual least-squares methods are fairly robust to departures from normality. Furthermore, it is the residuals that are assumed to be normally distributed (not the marginal distributions that you are probably looking at) , so it does not sound as though you have yet examined the data

[R] PostScript/PDF graphics with another font

2010-09-06 Thread Peter
I am using the standard phonetic font Doulos SIL in a graph (http://scripts.sil.org/cms/scripts/page.php?site_id=nrsiid=DoulosSILfont) This is an example: windowsFonts(IPA=TT Doulos SIL) barplot(c(1,2,3,4,5),names=c(\u{0251},\u{0252},\u{0253},\u{0254},\u{0255}),family=IPA) However, I am unable

Re: [R] dataframe row names from list

2010-09-06 Thread Jim Lemon
On 09/06/2010 09:41 PM, raje...@cse.iitm.ac.in wrote: 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

Re: [R] limit on read.socket?

2010-09-06 Thread Thomas Lumley
On Sat, 4 Sep 2010, raje...@cse.iitm.ac.in wrote: Hi, I have the following piece of code, repeat{ ss-read.socket(sockfd); if(ss==) break output-paste(output,ss) } but somehow, output is not receiving all the data that is coming through the socket.My suspicion is on the if statement. what

Re: [R] Help with unexpected symbol errors

2010-09-06 Thread jim holtman
We would need to at least see 10 lines either side of the error to understand its context. Also take a look with you editor (hex editor would be handy) to see if there is some unprintable character around it. Can you isolate just that portion of the code? Try putting it inside a function to see

Re: [R] combining collumns for data.frames

2010-09-06 Thread jim holtman
Try this (after making sure that Col_1 in data2 matches your column names in data1 data1 - read.table(textConnection(Taxon stage1 stage2 stage3 stage4 + T1 0 0 1 1 + T2 0 1 1 0 + T3 0 0 0

Re: [R] nlme Output

2010-09-06 Thread Edward Patzelt
The design is a repeated measures with 3 instances. There are 3 groups: Controls, Heavy Cocaine Users, Light Cocaine Users. I reshaped the data so that there was one variable for the 3 instances called AvgTrials. Time is the indicator of each instance. Here is the model call: mod5 -

[R] Way OT: Does PSA testing reduce prostate cancer mortality?

2010-09-06 Thread Bert Gunter
Hi Folks: I found the following paper to be an interesting example of how even well designed and conducted studies -- randomized trials, even -- can be rendered problematic by systematic effects beyond the control of the investigators:

  1   2   >