[R] Problem of lmer under FreeBSD

2007-12-27 Thread ronggui
I encounter such problem with lmer under FreeBSD, but not under Windows. Anyone knows why? Thanks. example(lmer) lmer (fm1 - lmer(Reaction ~ Days + (Days|Subject), sleepstudy)) Error in UseMethod(as.logical) : no applicable method for as.logical traceback() 9: as.logical(EMverbose) 8:

[R] Error: cannot allocate vector of size ... Bcc: Add Cc | Add Bcc

2007-12-27 Thread Maura E Monville
I read the subject message in a number of R archived emails. Since I am experiencing the same problem: upfmla A ~ T + cosP + cos2P + cos4P + cos5P + sin3P + sin5P + cosP2 + sinP3 + P2 glmod - gls(upfmla,correlation=corAR1(),method=ML) Error: cannot allocate vector of size 491.3 Mb dim(xx)

[R] (package e1071) SVM tune for best parameters: why they are different everytime i run?

2007-12-27 Thread Maggie Wang
Hi, I run the following tuning function for svm. It's very strange that every time i run this function, the best.parameters give different values. [A] svm.tune - tune(svm, train.x, train.y, validation.x=train.x, validation.y=train.y, ranges = list(gamma =

Re: [R] nlme package

2007-12-27 Thread Uwe Ligges
AGAIN, please do not crosspost! Vallejo, Roger wrote: In using the NLME package (R 2.6.1 for Windows), Which version of nlme? nlme is a contributed package that can be updated independently of R releases. I am having a problem in running an R script that used to run with no problems

Re: [R] data.frame - how to calculate the number of rows

2007-12-27 Thread Henrique Dallazuanna
Try this: summaryBy(B+C~ A+D, data=daten,FUN=c(mean, var, length)) On 26/12/2007, Agrarimmobilien [EMAIL PROTECTED] wrote: this works now, cbind(summaryBy(B+C~ A, data=df, FUN=c(mean, var)), 'numrows'=as.numeric(table(df$A))) but now, I cannot add another column D beside A, as I do

Re: [R] how to remove paths from where library() looks for packages

2007-12-27 Thread Henrique Dallazuanna
Perhaps this: .libPaths(unique(installed.packages()[,2])) On 25/12/2007, Lynd Bacon [EMAIL PROTECTED] wrote: Greetings. My current installation of R 2.6.1 on Unbuntu 7.10 (Gutsy) is looking for packages in a directory that doesn't contain any: library() Warning message: In library() :

Re: [R] (package e1071) SVM tune for best parameters: why they are different everytime i run?

2007-12-27 Thread Uwe Ligges
Maggie Wang wrote: Hi, I run the following tuning function for svm. It's very strange that every time i run this function, the best.parameters give different values. [A] svm.tune - tune(svm, train.x, train.y, validation.x=train.x, validation.y=train.y,

Re: [R] (package e1071) SVM tune for best parameters: why they are different everytime i run?

2007-12-27 Thread Maggie Wang
Thank you so much! I will have a try!! ~ maggie On Dec 27, 2007 6:43 PM, Uwe Ligges [EMAIL PROTECTED] wrote: Maggie Wang wrote: Hi, Uwe, Thanks for the reply!! I have 87 observations in total. If this amount causes the different best.parameters, is there a better way than cross

Re: [R] Affy Package

2007-12-27 Thread Uwe Ligges
Damn, this was a cross-post (and I replied to all), apologies for my re-cross-posting. To Roger, the original poster: PLEASE do read the posting guide of R-help before posting and NEVER EVER do crossposting again. Thanks, Uwe Ligges Uwe Ligges wrote: Vallejo, Roger wrote: Dear R Users,

Re: [R] (package e1071) SVM tune for best parameters: why they are different everytime i run?

2007-12-27 Thread Uwe Ligges
Maggie Wang wrote: Hi, Uwe, Thanks for the reply!! I have 87 observations in total. If this amount causes the different best.parameters, is there a better way than cross validation to tune them? In order to get stable (I do not say best) results, you could try some bootstrap with many

Re: [R] (package e1071) SVM tune for best parameters: why they are different everytime i run?

2007-12-27 Thread Maggie Wang
Hi, Uwe, Thanks for the reply!! I have 87 observations in total. If this amount causes the different best.parameters, is there a better way than cross validation to tune them? Thank you so much for the help! Best Regards, Maggie On Dec 27, 2007 6:17 PM, Uwe Ligges [EMAIL PROTECTED] wrote:

Re: [R] Error: cannot allocate vector of size ...

2007-12-27 Thread Uwe Ligges
Maura E Monville wrote: I read the subject message in a number of R archived emails. Since I am experiencing the same problem: upfmla A ~ T + cosP + cos2P + cos4P + cos5P + sin3P + sin5P + cosP2 + sinP3 + P2 glmod - gls(upfmla,correlation=corAR1(),method=ML) Error: cannot allocate

Re: [R] Affy Package

2007-12-27 Thread Uwe Ligges
Vallejo, Roger wrote: Dear R Users, In the expresso function, which combination of these methods for data pre-processing (when using affymetrix oligo arrays) is the best: bgcorrect.metod = rma rma2 mas normalize.method = qspline quantiles loess pmcorrect.method = pmonly subtractmm

Re: [R] Problem of lmer under FreeBSD

2007-12-27 Thread Rainer Hurling
Hello Ronggui Huang, I am working with FreeBSD 8.0-CURRENT (i386) and R-2.6.1 (not built from ports). After loading version 0.99875-9 of lme4 and then executing the example library(lme4) example(lmer) all works fine for me. On 27.12.2007 09:19 (UTC+1), Ronggui wrote: I encounter such

Re: [R] Problem of lmer under FreeBSD

2007-12-27 Thread ronggui
Dear Rainer, Thanks for your suggestion. The problem lies in the Matrix package. I installed it under R-2.5.0. When I upgraded R to R-2.6.0, I didn't upgrade all the add-on packages. I reinstall Matrix and lme4 packages, things are going fine. Regards Ronggui HUANG 2007/12/27, Rainer Hurling

Re: [R] probability from different values

2007-12-27 Thread Matthias Kohl
one addition ... Hello Ricardo, another solution could be using package distr: library(distr) A - c(18,18,18,19,20,21,22,23,24,25,26,27,28) DA - DiscreteDistribution(A) # maybe # support(DA) # plot (DA) B - c(82,83,84,85,85,86,87,88,89,90,91,91,92) DB - DiscreteDistribution(B) #

Re: [R] probability from different values

2007-12-27 Thread Matthias Kohl
Hello Ricardo, another solution could be using package distr: library(distr) A - c(18,18,18,19,20,21,22,23,24,25,26,27,28) DA - DiscreteDistribution(A) # maybe # support(DA) # plot (DA) B - c(82,83,84,85,85,86,87,88,89,90,91,91,92) DB - DiscreteDistribution(B) # support(DB) # plot(DB) DC - DB

Re: [R] R Compilation error on Ubuntu

2007-12-27 Thread Dirk Eddelbuettel
On Tue, Dec 25, 2007 at 01:35:19AM -0800, Satoshi Takahama wrote: Hi Taka, I was just trying to do this yesterday and ran into the same problem (compiling R 2.6.1 on Gutsy Gibbon). Apparently this happens on Debian/Ubuntu distributions because the developer install is separate from the

[R] probability from different values

2007-12-27 Thread Ricardo Perrone
Hi all, i'm new R user and i need some help: i have two vectors (A and B) and i need create another vector (C) from the subtraction of A's values with the B's values. How can i estimate the probability of C's values if i have differents values combinations of A and B that can result in the

[R] Too many open files

2007-12-27 Thread Markus Loecher
Dear all, Did this problem that was posted in 2006 (see below) ever got fully resolved ? I am encountering the exact same issue ; I have executed get.hist.quote() in a loop and now R not only refuses to establish any further connections to yahoo, but, worse, it will not open any files either. For

Re: [R] probability from different values

2007-12-27 Thread Richard . Cotton
i have two vectors (A and B) and i need create another vector (C) from the subtraction of A's values with the B's values. How can i estimate the probability of C's values if i have differents values combinations of A and B that can result in the same value? like 90 -20 = 70 and 91 - 21 =

[R] A function for random test based on longest run (UNCLASSIFIED)

2007-12-27 Thread Park, Kyong H Mr ECBC
Classification: UNCLASSIFIED Caveats: NONE Hello, R users, Has anybody written a function for random test based on the length of longest run of same events. I really appreciate your help. Kyong Park Classification: UNCLASSIFIED Caveats: NONE [[alternative HTML version deleted]]

[R] A function for random test based on longest run of same events (U NCLASSIFIED)

2007-12-27 Thread Park, Kyong H Mr ECBC
Classification: UNCLASSIFIED Caveats: NONE Hello, R users, Has anybody written a function for random test based on the length of longest run of same events. I really appreciate your help. Kyong Park Classification: UNCLASSIFIED Caveats: NONE [[alternative HTML version deleted]]

Re: [R] how to remove paths from where library() looks for packages

2007-12-27 Thread Lynd Bacon
Thanks, Henrique! I'm not sure this will help since the paths are already unique. Phil Spector wrote separately(Phil, I hope it's ok that I quote you here for the list): Lynd - If the message bothers you, look at /etc/R/Renviron and modify the line that defines R_LIBS . However, note

Re: [R] Principal Components Analysis

2007-12-27 Thread Prof Brian Ripley
On Wed, 26 Dec 2007, SNN wrote: Hi, I do have a file that has 50 columns and 40 rows. I want to apply PCA on that data and this is what I did h1-read.table(Ccode.txt, sep='\t', header=F) # reads the data from the file Ccode.txt h2-prcomp(na.omit(h1),center=T) but I am getting the

Re: [R] Problem of lmer under FreeBSD

2007-12-27 Thread Prof Brian Ripley
On Thu, 27 Dec 2007, ronggui wrote: I encounter such problem with lmer under FreeBSD, but not under Windows. Anyone knows why? Thanks. Most likely you have a mixed-up system, with some packages installed under an earlier version of R. Please use update.packages(checkBuilt=TRUE) to fix this.

Re: [R] A function for random test based on longest run (UNCLASSIFIED)

2007-12-27 Thread bogdan romocea
require(tseries) ?runs.test Also, take a look at dieharder, it implements a large number of randomness tests: http://www.phy.duke.edu/~rgb/General/dieharder.php -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Park, Kyong H Mr ECBC Sent:

Re: [R] Principal Components Analysis

2007-12-27 Thread Bert Gunter
Are there lots of missing values in the data? If so, my guess would be that na.omit(h1) leaves you with no data. Have you checked this? Bert Gunter Genentech -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of SNN Sent: Wednesday, December 26, 2007 2:49 PM

[R] Apresentação Evangelismcenter

2007-12-27 Thread Evangelismcenter
Prezados Cybernautas: Em fase de crescimento, a Evangelismcenter apresenta agora um sistema mais acessível a todos os visitantes e com mais conteúdos para consulta. Destacamos entre outros, um sistema de Bíblia On-line, Vídeos, Notícias, Links, Fórum, Chat, etc etc...

[R] Apresentação Evangelismcenter

2007-12-27 Thread Evangelismcenter
Prezados Cybernautas: Em fase de crescimento, a Evangelismcenter apresenta agora um sistema mais acessível a todos os visitantes e com mais conteúdos para consulta. Destacamos entre outros, um sistema de Bíblia On-line, Vídeos, Notícias, Links, Fórum, Chat, etc etc...

Re: [R] A function for random test based on longest run (UNCLASSI FIED)

2007-12-27 Thread Park, Kyong H Mr ECBC
Classification: UNCLASSIFIED Caveats: NONE Thanks for your quick response. The program you mentioned below available from R is based on number of runs (up or down) not based on a longest length of runs of same events. To be more specific, for example, from a series, HHTHHHH, the number of

[R] getting a string output from str

2007-12-27 Thread eggsbrown
I would like to use the output from str() in a homemade function but str does not return a value! eg: list(x=str(1:20),y=str(1:15)) returns odd output... Thanks - Kevin. -- View this message in context: http://www.nabble.com/getting-a-string-output-from-str-tp14517059p14517059.html Sent

Re: [R] getting a string output from str

2007-12-27 Thread Greg Snow
If you want to capture the output of the str function in a vector of character strings, try the capture.output function. From: [EMAIL PROTECTED] on behalf of eggsbrown Sent: Thu 12/27/2007 11:51 AM To: r-help@r-project.org Subject: [R] getting a string output

[R] Odd time conversion glitch

2007-12-27 Thread Pat Carroll
Hello, all. I ran across an odd problem while working in R 2.6.0. The command line text follows. Basically, I attempted to convert a character vector of length 13 (in a data frame with 13 rows) from a character representation of dates to a POSIX representation using strptime. strptime returned

[R] Running R from a CD on Windows?

2007-12-27 Thread Charles Annis, P.E.
Greetings, R-ians: Yes it's easy to run R from a CD: I copied my windows installation folder to the CD, then copied my R working directory to the CD. To run from the CD, I copy the working directory from the CD to the desktop, and then create an R desktop icon that points to Rgui.exe on the CD,

Re: [R] Running R from a CD on Windows?

2007-12-27 Thread Gabor Grothendieck
There is a batch script, rgui.bat, in batchfiles, see home page at batchfiles.googlecode.com, that will search the registry and a few other places for R and start up R if it can find it. It does not search CD's automatically but that would be simple to add. On Dec 27, 2007 3:25 PM, Charles

Re: [R] Running R from a CD on Windows?

2007-12-27 Thread Uwe Ligges
Sounds like you want to write some VisualBasic script that sets up the link etc., started by the autorun.inf facility. In any case, many virus and/or behavior checkers will shout when you implement things like that ... - and I have disabled auto-anything for CD/USB devices not only form

[R] Conditionally incrementing a loop counter

2007-12-27 Thread Mike Jones
Hi, I am trying a for loop from 1 to 100 by 1. However, if a condition does not get met, I want to throw away that iteration. So if my loop is for (i in 1:100) and i is say, 25 and the condition is not met then I don't want i to go up to 26. Is there a way to do that? I can't seem to manually

Re: [R] Conditionally incrementing a loop counter

2007-12-27 Thread Peter Dalgaard
Mike Jones wrote: Hi, I am trying a for loop from 1 to 100 by 1. However, if a condition does not get met, I want to throw away that iteration. So if my loop is for (i in 1:100) and i is say, 25 and the condition is not met then I don't want i to go up to 26. Is there a way to do that? I

[R] Reminiscing on 20 years using S

2007-12-27 Thread John Maindonald
My first exposure to S was on an ATT 3B2 (a 3B2/100, I think), at the Auckland (Mt Albert) Applied Mathematics Division Station of the NZ Dept of Scientific and Industrial Research. The AMD Head Office in Wellington had one also. There may have been one or more others; I cannot remember. This

[R] warning on gamma option in par(args) or calling par(= new)?

2007-12-27 Thread AA
Dear All, I have the following function tstpar - function(n = 200, want.pdf = FALSE, pdfFileName = NULL){ oldpar - par(no.readonly = TRUE) on.exit(par(oldpar)) steps - seq(from = 1, to = 8, by = 1) h - 10; w - 6 if(want.pdf){pdf(file = pdfFileName, onefile = TRUE,

Re: [R] Conditionally incrementing a loop counter

2007-12-27 Thread Bert Gunter
Please read the posting guide and provide a simple reproducible example as it asks you to. Very likely a loop is not even needed. -- Bert Gunter Genentech, Inc. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mike Jones Sent: Thursday, December 27, 2007

[R] groupedData function not found

2007-12-27 Thread andrea previtali
Hello, I'm trying to use the groupedData function and R is giving me the message: Error: can not find function groupedData The code is coming from a textbook so I think it should be correct: pigs-data.frame(cbind(pig.time,pig.id,pig.wt)) pig.growth-groupedData(pig.wt~pig.time|pig.id,data=pigs)

[R] Conditionally incrementing a loop counter: Take 2

2007-12-27 Thread Mike Jones
My apologies for not including a working example. Here it is: for (i in 1:10){ cat(initial i = ,i,\n) x - runif(1) if (x 0.7){ i - i-1 } cat(second i = ,i,\n) } When I ran this i got what follows, so there were four cases where I wanted the i not to increment. initial

Re: [R] Conditionally incrementing a loop counter: Take 2

2007-12-27 Thread Peter Dalgaard
Mike Jones wrote: My apologies for not including a working example. Here it is: for (i in 1:10){ cat(initial i = ,i,\n) x - runif(1) if (x 0.7){ i - i-1 } cat(second i = ,i,\n) } When I ran this i got what follows, so there were four cases where I wanted the

Re: [R] Odd time conversion glitch

2007-12-27 Thread Gabor Grothendieck
Read RNews 4/1 and follow the advice there. On Dec 27, 2007 2:31 PM, Pat Carroll [EMAIL PROTECTED] wrote: Hello, all. I ran across an odd problem while working in R 2.6.0. The command line text follows. Basically, I attempted to convert a character vector of length 13 (in a data frame with

[R] Lda and Qda

2007-12-27 Thread pedrosmarques
Hi all, I'm working with some data: 54 variables and a column of classes, each observation as one of a possible seven different classes: var.can3-lda(x=dados[,c(1:28,30:54)],grouping=dados[,55],CV=TRUE) Warning message: In lda.default(x, grouping, ...) : variables are collinear

[R] Help with lm and multiple linear regression?

2007-12-27 Thread Aaron Barzilai
Hello, I'm new to R, but I've read the intro to R and successfully connected it to an instance of mysql. I'm trying to perform multiple linear regression, but I'm having trouble using the lm function. To start, I have read in a simply y matrix of values(dependent variable) and x matrix of

Re: [R] Conditionally incrementing a loop counter: Take 2

2007-12-27 Thread Mike Jones
Since I didn't want the i to increment in the loop when the condition is not met, then in my example I wanted the loop to actually run 14 times instead of the 10 since I wanted 4 of the iterations to be thrown away, or ignored. I still haven't been able to figure this out. Going the while

[R] SAS to R - if you don't have a SAS license

2007-12-27 Thread Gyula Gulyas
Hi all, if you do not have a SAS license but want to convert native SAS data files, the solution below will work. # read SAS data without SAS # 1. Download free SAS System Viewer from either of the sites below: # http://www.sas.com/apps/demosdownloads/setupcat.jsp?cat=SAS+System+Viewer

[R] Efficiency of for-loop in R

2007-12-27 Thread Tong Wang
Hi, I just realized that in Matlab, as long as memory is pre-allocated, doing for-loop doesn't cost more time than doing things in vector form. But it seems in R, it still cost a lot to do for-loop. Is there any improvement in R that I missed. Thanks a lot. Merry Xmas Everyone !

Re: [R] SAS to R - if you don't have a SAS license

2007-12-27 Thread Wensui Liu
while I move data between SAS and R all the time, personally I don't think your recommendation is very practical. Instead, I feel SAS transport file is much better than csv. Plus, the sas dataset created on unix can't be opened by sas viewer on windows. It is even undoable if the dataset is

Re: [R] Help with lm and multiple linear regression? (Plain Text version)

2007-12-27 Thread Tim Calkins
consider merging everything into a singe dataframe. i haven't tried it, but something like the following could work: reg.data - cbind(margin, personcoeff) names(reg.data) - c('margin', 'p1', 'p2') lm(margin~p1+p2, data = reg.data) the idea here is that by specifying the data frame with the

[R] Help with lm and multiple linear regression? (Plain Text version)

2007-12-27 Thread Aaron Barzilai
(Apologies the previous version was sent as rich text) Hello, I'm new to R, but I've read the intro to R and successfully connected it to an instance of mysql. I'm trying to perform multiple linear regression, but I'm having trouble using the lm function. To start, I have read in a simply y

Re: [R] Efficiency of for-loop in R

2007-12-27 Thread jim holtman
Exactly what is the problem you are trying to solve? Could you provide commented, minimal, self-contained, reproducible code? A lot depends on what you are trying to do, There might be other ways, in R, than a 'for' loop to solve your problems. On Dec 27, 2007 6:44 PM, Tong Wang [EMAIL

Re: [R] Reminiscing on 20 years using S

2007-12-27 Thread jim holtman
My introduction to S was around 1984 on a 3B20 and VAX systems at Bell Labs. I still have a copy of the brown book written by Becker and Chambers on the S Interactive Language (copyright 1984). I remember the graphical output on a daisy-wheel printer and using the HP plotter that was connected

Re: [R] Conditionally incrementing a loop counter: Take 2

2007-12-27 Thread Peter Dalgaard
John Fox wrote: Dear Mike, You could use a repeat loop and manage the index yourself: i - 0 repeat{ x - runif(1) if (x .1){ i - i + 1 cat(x = , x, \n) } if (i == 10) break } But if your example problem reflects your actual application,

Re: [R] Efficiency of for-loop in R

2007-12-27 Thread Tong Wang
HI, The question is meant to be a general one, I am trying to find out if there is new development in R that I might have missed. but here's a trivial example, To compute y=sin(x) , x = 1,2,... 10 x=1:10, 1. y =sin(x) 2. for(i in 1:10) y=sin(x[i]) 1 is much faster

Re: [R] Efficiency of for-loop in R

2007-12-27 Thread jim holtman
I will venture a guess in that in the case of the 'for' loop, you are calling 'sin' 100,000 times incurring the cost of individual function calls at the interpreter level plus evaluating 'for' loop. In the vectorized case, you are only interpreting a single 'sin' call and then internally

Re: [R] Help with lm and multiple linear regression? (Plain Text version)

2007-12-27 Thread Aaron Barzilai
Tim (and others who responded privately), Thanks for the help, this approach did work. I have also reread ?lm a little more closely, I do see the weights functionality. I have one last question: Now that I understand how to call this function and review the results, I want to extend it to my

[R] How to catch data from the different dataframes and lm problem?

2007-12-27 Thread leeznar
Dear all: I am a new R-user and I have 2 questions about it. 1) I have a dataframe. Based on “formulation” and “subject”, a dataframe is split into 4 dataframes. The example is as follows. Moreover, I want to calculate “test” value for these 4 dataframes. My question is that the

Re: [R] Help with lm and multiple linear regression? (Plain Text version)

2007-12-27 Thread Charilaos Skiadas
Hi Aaron, if I understand your question correctly, you can use the . in the formula, like so: dat - data.frame(x=1:10,y=rnorm(10),z=10:1) lm(x~., data=dat) The dot there stands for everything not already specified, so in this case that would be y and z (since x is already on the lhs). You