Re: [R] Long model formulae

2010-10-23 Thread Bill.Venables
Here is a dodge I often use. This is a mock-up example. ___ bar <- data.frame(matrix(rnorm(1001), nrow = 1)) names(bar)[1] <- "y" ## say head(bar[,1:5]) nbar <- names(bar) form <- as.formula(paste(nbar[1], "~", paste(nbar[-1], collapse = "+"))) fitModel <- substitute(tm <- rpart(FO

Re: [R] Conditional looping over a set of variables in R

2010-10-23 Thread David Herzberg
Adrienne - this solves the problem nicely. Thanks for your help. David S. Herzberg, Ph.D. Vice President, Research and Development Western Psychological Services 12031 Wilshire Blvd. Los Angeles, CA 90025-1251 Phone: (310)478-2061 x144 FAX: (310)478-7838 email: dav...@wpspublish.com From: woot

Re: [R] If Statement Help

2010-10-23 Thread David Winsemius
On Oct 23, 2010, at 7:44 PM, Jason Kwok wrote: Thanks Jorge. It works. Is there a way to keep the actual price in the price column instead of TRUE/FALSE but filtering on when price>100? Huh? When I use subset I get what you ask for: > subset(x, Price > 100) Price 2010-10-12 10

Re: [R] Long model formulae

2010-10-23 Thread David Winsemius
On Oct 23, 2010, at 6:56 PM, Gabor Grothendieck wrote: On Sat, Oct 23, 2010 at 9:51 PM, James Hirschorn wrote: What is a good way to enter a very long model formula. For example: y ~ Input.2 + Input.3 + ... + Input.1000 (assuming the corresponding dataframe has many other columns). Is the

Re: [R] Feedback on you manual

2010-10-23 Thread Steve Lianoglou
Hi Liping, On Sat, Oct 23, 2010 at 2:18 AM, 刘力平 wrote: > Dear Sir/Madam: > > Great thanks for R project and you contribution. > > I am Liping Liu, a beginner of R. Recently, I use R much. I wish you could > improve the manual by making it search engine friendly. > > The "Introduction to R" page i

[R] Optimize parameters of ODE Problem which is solved numeric

2010-10-23 Thread Michael S.
Hi, I have a data-matrix: > PID sato hrs fim health 214 3 4.376430 6.582958 5 193 6 4.361825 3.138525 6 8441 6 4.205771 3.835886 7 7525 6 4.284489 3.245139 6 6806 7 4.168926 2.821833 7 5682 7 1.788707 1.212653 7 5225 6 1.

Re: [R] If Statement Help

2010-10-23 Thread Jason Kwok
Thanks Jorge. It works. Is there a way to keep the actual price in the price column instead of TRUE/FALSE but filtering on when price>100? Thanks, Jay On Sat, Oct 23, 2010 at 10:37 PM, Jorge Ivan Velez wrote: > Hi Jay, > > If "x" is your data, you could use subset() to do what you want: > >

[R] building compiled help html files

2010-10-23 Thread Erin Hodgess
Dear R People I figured it out. I should RTFM before asking questions, particularly on Saturday nights! Thanks for your patience. Sincerely, Erin -- Erin Hodgess Associate Professor Department of Computer and Mathematical Sciences University of Houston - Downtown mailto: erinm.hodg...@gmai

Re: [R] If Statement Help

2010-10-23 Thread Jason Kwok
Thanks for the help Jim. As a new user and member of this mailing list, I'm very impressed with all the support! Jay On Sat, Oct 23, 2010 at 10:21 PM, jim holtman wrote: > Need to understand how 'indexing' is done in R: > > > x <- read.table(textConnection(" Price > + 2010-10

Re: [R] If Statement Help

2010-10-23 Thread Jorge Ivan Velez
Hi Jay, If "x" is your data, you could use subset() to do what you want: subset(x, Price > 100) See ?subset for more information. HTH, Jorge On Sat, Oct 23, 2010 at 9:56 PM, Jason Kwok <> wrote: >Price > 2010-10-11 99 > 2010-10-12101 > 2010-10-13102 > 2010-10-

Re: [R] If Statement Help

2010-10-23 Thread jim holtman
Need to understand how 'indexing' is done in R: > x <- read.table(textConnection(" Price + 2010-10-11 99 + 2010-10-12101 + 2010-10-13102 + 2010-10-14103 + 2010-10-15 99 + 2010-10-18 98 + 2010-10-19 97 + 2010-10-20101 + 2010-10-21101 + 2010-10-2

Re: [R] Long model formulae

2010-10-23 Thread Gabor Grothendieck
On Sat, Oct 23, 2010 at 9:51 PM, James Hirschorn wrote: > > What is a good way to enter a very long model formula. For example: > > y ~ Input.2 + Input.3 + ... + Input.1000 > > (assuming the corresponding dataframe has many other columns). > > Is there a way to convert a character string to a form

[R] If Statement Help

2010-10-23 Thread Jason Kwok
Price 2010-10-11 99 2010-10-12101 2010-10-13102 2010-10-14103 2010-10-15 99 2010-10-18 98 2010-10-19 97 2010-10-20101 2010-10-21101 2010-10-22101 I have this dataset and I only want to return instances when the Price is > 100. If I use t

[R] Long model formulae

2010-10-23 Thread James Hirschorn
What is a good way to enter a very long model formula. For example: y ~ Input.2 + Input.3 + ... + Input.1000 (assuming the corresponding dataframe has many other columns). Is there a way to convert a character string to a formula? Are there command line expansions in R besides the simple '.'?

[R] getting compiled html files

2010-10-23 Thread Erin Hodgess
Dear R People: Here is a pretty lame question, so please don't be too distressed. I'm trying to get the compiled HTML files on Windows when installing from source. I've set the BUILD HTML = YES and put the directory where the Inno Setup files are into the MkRules.dist and then copied it over to

Re: [R] Summarizing For Values with Multiple categories

2010-10-23 Thread jim holtman
Here is another way of doing it using some of the functions in a step-by-step manner: > # had to put some separators in since data format was not apparent > # best to provide sample data with 'dput' > x <- read.table(textConnection("Cat1|Cat2 |Cat3 | COG |Counts + A | B | C |COG1 |10 +

Re: [R] convert wind direction from degrees to basic compass dir

2010-10-23 Thread will phillips
Hello Ted, Wow, that is some good incite and food for thought. A bit past my learning curve in statistics at this point but I will get there. Thank you for showing me another area to consider. I have not come across circular statistics yet. Will -- View this message in context: http://r.78

Re: [R] Summarizing For Values with Multiple categories

2010-10-23 Thread Alison Waller
Yes, I guess I should update. > R.version.string [1] "R version 2.9.0 (2009-04-17)" On 24-Oct-10, at 1:12 AM, Gabor Grothendieck wrote: R.version.string __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

[R] Different results in FFT analysis

2010-10-23 Thread Tim Clark
Dear List, I am trying to use Fast Fourier Transformation to detect cyclical trends in the detection of acoustically tagged animals on an array of underwater receivers.  I have found two different methods to plot periodograms based on FFT, but they give me different results.  They find the same

Re: [R] Summarizing For Values with Multiple categories

2010-10-23 Thread Alison Waller
Thanks! I tried reading the help for aggregate and can't figure out which form of the formula I am using, and therefore the syntax. I'm getting the below error. > aggregate(counts ~ ind, merge(stack(CAT2COG), df, by = 1), sum) Error in as.data.frame.default(x) : cannot coerce class "formul

Re: [R] Summarizing For Values with Multiple categories

2010-10-23 Thread Gabor Grothendieck
On Sat, Oct 23, 2010 at 7:03 PM, Alison Waller wrote: > Thanks! > > I tried reading the help for aggregate and can't figure out which form of > the formula I am using, and therefore the syntax. > > I'm getting the below error. > >> aggregate(counts ~ ind, merge(stack(CAT2COG), df, by = 1), sum) >

Re: [R] Summarizing For Values with Multiple categories

2010-10-23 Thread Gabor Grothendieck
On Sat, Oct 23, 2010 at 6:15 PM, Alison Waller wrote: > Hi all, > > I have some data as follows. > > Cat1 Cat2 Cat3  COG Counts >   A    B    C COG1     10 >   B    D      COG2     20 >   C           COG3     30 >   D           COG4     40 > > I would like to sum all the counts for each category:

[R] Summarizing For Values with Multiple categories

2010-10-23 Thread Alison Waller
Hi all, I have some data as follows. Cat1 Cat2 Cat3 COG Counts ABC COG1 10 BD COG2 20 C COG3 30 D COG4 40 I would like to sum all the counts for each category: A B C D 10 30 40 60 >CAT2COG<- lis

Re: [R] convert wind direction from degrees to basic compass dir

2010-10-23 Thread Ted Harding
On 23-Oct-10 21:15:37, will phillips wrote: > Hello Josh, > Thank you for the tip on the cut function. I'm new to R and have > not come across this one yet. I'll give it a go. > > Regarding the rationale for segmenting the wind direction, I have > not come across any theory to drive this. My motiv

Re: [R] cv.lm() broken; cross validation vs. predict(interval="prediction")

2010-10-23 Thread John Braun
I've uploaded a new version of DAAG with clearer documentation about cv.lm (for simple regression) and CVlm (for more general problems.) Sincerely, W. John Braun, Professor and Graduate Chair Dept. of Stat. and Act. Sci. Western Science Centre, Rm 262 University of Western Ontario London, Ontari

Re: [R] convert wind direction from degrees to basic compass directions

2010-10-23 Thread will phillips
Thank you David, I'll check that out too. Will -- View this message in context: http://r.789695.n4.nabble.com/convert-wind-direction-from-degrees-to-basic-compass-directions-tp3008773p3008807.html Sent from the R help mailing list archive at Nabble.com. ___

Re: [R] convert wind direction from degrees to basic compass directions

2010-10-23 Thread will phillips
Hello Josh, Thank you for the tip on the cut function. I'm new to R and have not come across this one yet. I'll give it a go. Regarding the rationale for segmenting the wind direction, I have not come across any theory to drive this. My motivation is model fit. This wind direction variable re

Re: [R] convert wind direction from degrees to basic compass directions

2010-10-23 Thread David Winsemius
On Oct 23, 2010, at 1:40 PM, will phillips wrote: Hello, I have a data set that includes a predictor variable "wind direction". This variable is in degrees with 0=North. I've put this predictor into a linear model and its coefficient is far from significant. I was thinking about conve

Re: [R] convert wind direction from degrees to basic compass directions

2010-10-23 Thread Joshua Wiley
On Sat, Oct 23, 2010 at 1:40 PM, will phillips wrote: > > Hello, > > I have a data set that includes a predictor variable "wind direction".  This > variable is in degrees with 0=North.  I've put this predictor into a linear > model and its coefficient is far from significant. > > I was thinking ab

[R] convert wind direction from degrees to basic compass directions

2010-10-23 Thread will phillips
Hello, I have a data set that includes a predictor variable "wind direction". This variable is in degrees with 0=North. I've put this predictor into a linear model and its coefficient is far from significant. I was thinking about converting this variable into 8 factors "north" "northwest" "wes

Re: [R] Feedback on you manual

2010-10-23 Thread Joshua Wiley
Dear Liping Liu, You may already be familiar with this, but most browser have the ability to search for text on the current page. Via menu's often something like Edit -> Find or with the keyboard shortcut, Ctrl + F. This is much more convenient than scrolling through a long page of text looking f

Re: [R] help

2010-10-23 Thread Mastaki Kambale
Dears R Thank you very much Mastaki > From: landronim...@gmail.com > Date: Sat, 23 Oct 2010 16:56:29 +0200 > Subject: Re: [R] help > To: dwinsem...@comcast.net > CC: jkmast...@hotmail.com; r-help@r-project.org > > On Sat, Oct 23, 2010 at 4:37 PM, David Winsemius > wrote: > > That wasn't what

Re: [R] Feedback on you manual

2010-10-23 Thread 刘力平
Hi, all: My opinion is, provide a PDF tutorial is important, but not one web page containing everything. >From the perspective of end-user programming, most people will have a fast reading of your tutorial to get principles of R. When they become working with R, they need come back often to sear

Re: [R] Random Forest AUC

2010-10-23 Thread Claudia Beleites
Dear List, Just curiosity (disclaimer: I never used random forests till now for more than a little playing around): Is there no out-of-bag estimate available? I mean, there are already ca. 1/e trees where a (one) given sample is out-of-bag, as Andy explained. If now the voting is done only ov

Re: [R] Random Forest AUC

2010-10-23 Thread Changbin Du
I think you should use 10 fold cross validation to judge your performance on the validation parts. What you did will be overfitted for sure, you test on the same training set used for your model buliding. On Sat, Oct 23, 2010 at 6:39 AM, mxkuhn wrote: > I think the issue is that you really can'

Re: [R] Change column of numbers in data frame to days

2010-10-23 Thread will phillips
Hello Uwe, Thank you very much! Works like a charm. I wouldn't have thought of that fix on my own. Will -- View this message in context: http://r.789695.n4.nabble.com/Change-column-of-numbers-in-data-frame-to-days-tp3008441p3008699.html Sent from the R help mailing list archive at Nabble.com

Re: [R] Problem with Aggregate - Sum, limit on number of criteria

2010-10-23 Thread Uwe Ligges
This is fixed in recent versions of R: r52862 | hornik | 2010-09-01 18:21:49 -0400 (Wed, 01 Sep 2010) | 1 line Changed paths: M /trunk/src/library/stats/R/aggregate.R Avoid integer overflows. Uwe Ligges On 22.10.20

Re: [R] command to start R and Rcmdr?

2010-10-23 Thread Liviu Andronic
On Sat, Oct 23, 2010 at 6:43 PM, Lee Hachadoorian wrote: > sh -c 'R_DEFAULT_PACKAGES="$R_DEFAULT_PACKAGES Rcmdr" R "$@"' > > This is pulled directly from the launcher that Ubuntu creates when it > installs Rcmdr from the repository. > It seems that the CRAN Rcmdr also ships an Rcmdr.desktop file i

Re: [R] command to start R and Rcmdr?

2010-10-23 Thread Liviu Andronic
On Sat, Oct 23, 2010 at 6:43 PM, Lee Hachadoorian wrote: > sh -c 'R_DEFAULT_PACKAGES="$R_DEFAULT_PACKAGES Rcmdr" R "$@"' > Oh, nice! Thanks a lot, it works like a charm. Regards Liviu __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/lis

Re: [R] lm looking for weights outside of the user-defined function

2010-10-23 Thread William Dunlap
> From: David Winsemius [mailto:dwinsem...@comcast.net] > Sent: Friday, October 22, 2010 9:43 PM > To: William Dunlap > Cc: Dimitri Liakhovitski; r-help > Subject: Re: [R] lm looking for weights outside of the > user-defined function > > > On Oct 22, 2010, at 12:17 PM, William Dunlap wrote: ...

Re: [R] command to start R and Rcmdr?

2010-10-23 Thread Lee Hachadoorian
Liviu, Try sh -c 'R_DEFAULT_PACKAGES="$R_DEFAULT_PACKAGES Rcmdr" R "$@"' This is pulled directly from the launcher that Ubuntu creates when it installs Rcmdr from the repository. --Lee On 10/23/2010 11:37 AM, Liviu Andronic wrote: > On Sat, Oct 23, 2010 at 5:30 PM, Henrique Dallazuanna > wro

[R] EMACS as an end-user GUI (form) to an R process

2010-10-23 Thread Mortimer B. Cladwell III
A tutorial on EMACS as an end-user GUI (form) to an R process Item 4 at http://mysite.verizon.net/mbcladwell/ Mortimer [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] wait for graph to finish plotting

2010-10-23 Thread news
David Winsemius writes: > On Oct 22, 2010, at 12:50 PM, wrote: > >> Tal Galili writes: >> >>> I suspect that using "dev.copy2eps" Is not going to help you here. >>> >>> Please try again using: >>> >>> pdf(...) # Check: ?pdf >>> for(i in something) >>> { >>> plot(things) >>> } >>> dev.

[R] GBM : Extract model for scoring in database

2010-10-23 Thread Jeff
Hi all, I have found a couple posts on this topic but could not (yet) find an answer. Is there a way to extract the model (trees and weights) from the GBM package in order to program the prediction in a non R environment (SQL database)? The constraint of not using R is based on production requirem

[R] removing margin space between columns in lattice plots

2010-10-23 Thread Stephen T.
Hi list, >From the xyplot() documentation I'm guessing this may not be possible, but is >there a way to specify a scale definition something between relation="free" >and relation="same" such that the scales are fixed across rows and column >margins are removed for a M x N conditioning plot (so

Re: [R] add diagonal line to covariance matrix

2010-10-23 Thread Uwe Ligges
On 22.10.2010 19:36, Marcelo Lima wrote: Hi, Created a covariance matrix and i would like to add a diagonal line to the plot, any suggestions? I do not really understand your question. If you actually want to access the main diagonal of a matrix or add a diagonal matrix to another matrix,

Re: [R] cv.lm() broken; cross validation vs. predict(interval="prediction")

2010-10-23 Thread Uwe Ligges
On 23.10.2010 00:17, Daniel Weitzenfeld wrote: << repost because previous attempt was not plain text, sorry!>> Hi Folks, I have a pretty simple problem: after building a multivariate linear model, I need to report my 95% confidence interval for predictions based on future observations. I kno

Re: [R] Limitations and scale of R, and performance issues if and when limit reached

2010-10-23 Thread Uwe Ligges
On 21.10.2010 22:20, Stratos Laskarides wrote: Hi there Thank you for everyone's help in all my previous questions. By way of intro, I am a masters student in actuarial science at the University of Cape Town, and I am doing a project in R on some healthcare cost data. Just for clarity befor

Re: [R] Different time between date() and Sys.date()

2010-10-23 Thread Uwe Ligges
On 21.10.2010 19:53, David Winsemius wrote: On Oct 21, 2010, at 11:59 AM, omerle wrote: Thanks for you answer. It s sufficient but I d like to know why my system think I am CEST and yours think your are EDT. It probably acquired it from your OS at the time of R's installation. No, the OS

Re: [R] command to start R and Rcmdr?

2010-10-23 Thread Liviu Andronic
On Sat, Oct 23, 2010 at 5:30 PM, Henrique Dallazuanna wrote: > In windows it work's fine > After further experimentation, it does work when I escape the parentheses. However, both l...@liv-laptop:~$ R --interactive -e require\(Rcmdr\) and l...@liv-laptop:~$ R -e require\(Rcmdr\) --interactive fa

Re: [R] command to start R and Rcmdr?

2010-10-23 Thread Henrique Dallazuanna
In windows it work's fine On Sat, Oct 23, 2010 at 12:36 PM, Liviu Andronic wrote: > On Sat, Oct 23, 2010 at 2:07 PM, Henrique Dallazuanna > wrote: > > You've tried removing the quotes around require? > > > Yes, but it fails: > l...@liv-laptop:~$ R --interactive -e require(Rcmdr) > bash: syntax e

Re: [R] Biplot: plot group name instead of row number

2010-10-23 Thread Uwe Ligges
On 21.10.2010 00:39, Alejo C.S. wrote: Dear list, I'm trying to make a biplot, but instead of plotting the row number for each observation, plot a group factor. Example: prcomp(iris[,1:4]) -> PCA biplot(PCA) #this makes a nice biplot but with row names Instead of row numbers I want to

Re: [R] How long does skipping in read.table take

2010-10-23 Thread Gabor Grothendieck
On Sat, Oct 23, 2010 at 10:52 AM, Dimitri Liakhovitski wrote: > Just tried it on my work computer (Windows XP, I only have 2 GB RAM): > I've run your code, just indicated the separator "|" in read.table (in > DF line) and added the actual processing (writing out of the result > with a file name) -

Re: [R] How long does skipping in read.table take

2010-10-23 Thread Dimitri Liakhovitski
Also am running the same code on my powerful home PC. It's been running for 25 minutes already, and still has not printed the first end time (does it mean it's still trying to read in DF for the first time)? On Sat, Oct 23, 2010 at 10:52 AM, Dimitri Liakhovitski wrote: > Just tried it on my work

Re: [R] Odp: Cbind query

2010-10-23 Thread Uwe Ligges
On 23.10.2010 08:28, karthicklakshman wrote: Hello Petr Pikal, Thanks for the suggestion. I am sorry for not being very clear in my mail. from your example, Its clear to me now about how to turn factors to character values. I am working on large data sets, and the ultimate aim is to create

Re: [R] Change column of numbers in data frame to days

2010-10-23 Thread Uwe Ligges
On 23.10.2010 17:08, will phillips wrote: Hello Dr. Pagel, Thank you very much for the input. It is "almost" working. It will indicate every day of the week except Sunday. Any multiple of 7 is giving . I'll tinker with it a bit. I really appreciate the direction you've provided. foo <-

Re: [R] Change column of numbers in data frame to days

2010-10-23 Thread will phillips
Hello Dr. Pagel, Thank you very much for the input. It is "almost" working. It will indicate every day of the week except Sunday. Any multiple of 7 is giving . I'll tinker with it a bit. I really appreciate the direction you've provided. Will -- View this message in context: http://r.

Re: [R] wait for graph to finish plotting

2010-10-23 Thread Tal Galili
Could you please paste the exact code you are using? (the one with the pdf and dev.off, outside the loop ) Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatist

Re: [R] help

2010-10-23 Thread Liviu Andronic
On Sat, Oct 23, 2010 at 4:37 PM, David Winsemius wrote: > That wasn't what I understood him to be asking, but rather how to create new > variables within existing dataframes. My suggestion would be to work with > the examples on the help(with) and help(transform) pages. > Oh, then Quick-R [1] may

Re: [R] How long does skipping in read.table take

2010-10-23 Thread Dimitri Liakhovitski
Just tried it on my work computer (Windows XP, I only have 2 GB RAM): I've run your code, just indicated the separator "|" in read.table (in DF line) and added the actual processing (writing out of the result with a file name) - see below. I got: Error in textConnection(x) : cannot allocate memory

Re: [R] Change column of numbers in data frame to days

2010-10-23 Thread Philipp Pagel
> I have a vector of numbers ranging form 20 to 500. The numbers represent > days since a starting point. The list is not consecutive, some numbers > skipped and some numbers duplicated. I know day 1 was a Monday. I want to > use this vector in a lm but I need to factor by day. I'm wondering ho

Re: [R] Big data (over 2GB) and lmer

2010-10-23 Thread Douglas Bates
On Thu, Oct 21, 2010 at 2:00 PM, Ben Bolker wrote: > Michal Figurski mail.med.upenn.edu> writes: > >> I have a data set of roughly 10 million records, 7 columns. It has only >> about 500MB as a csv, so it fits in the memory. It's painfully slow to >> do anything with it, but it's possible. I also

Re: [R] help

2010-10-23 Thread David Winsemius
On Oct 23, 2010, at 4:13 AM, Liviu Andronic wrote: Hello On Sat, Oct 23, 2010 at 10:43 AM, Mastaki Kambale > wrote: Dears R I am a self taught novice user of R. I begin to understand its philosophy and some basics like objects, vectors, arrays, lists etc...I still am not able to manipula

Re: [R] command to start R and Rcmdr?

2010-10-23 Thread Liviu Andronic
On Sat, Oct 23, 2010 at 2:07 PM, Henrique Dallazuanna wrote: > You've tried removing the quotes around require? > Yes, but it fails: l...@liv-laptop:~$ R --interactive -e require(Rcmdr) bash: syntax error near unexpected token `(' l...@liv-laptop:~$ R -e require(Rcmdr) --interactive bash: syntax e

Re: [R] How long does skipping in read.table take

2010-10-23 Thread Dimitri Liakhovitski
Gabor, thanks a lot. So, I don't really need sql? That's great. I'll try your code. To finish with sql, I've run this: (I wanted to skip the first 11 million rows) mydata<-read.csv.sql("my.file.txt", sep="|", eol="\r\n", sql = "select * from file limit 100, 1099") After 20 min (on a 4-co

Re: [R] contour on a simplex

2010-10-23 Thread David Winsemius
If Dennis' interpretation of your request is correct then Harrell rms/ Hmisc packages provide a mechanism for restricting plotting of contours to the region within a perimeter. He has a perimeter function and the bplot function takes a perim argument. The reason I did not offer it earlier is

Re: [R] How long does skipping in read.table take

2010-10-23 Thread Gabor Grothendieck
On Sat, Oct 23, 2010 at 10:07 AM, Dimitri Liakhovitski wrote: > I just tried it: > > for(i in 11:16){ #i<-11 >  start<-Sys.time() >  print(start) >  flush.console() >  filename<-paste("skipped millions- ",i,".txt",sep="") >  mydata<-read.csv.sql("myfilel.txt", sep="|", eol="\r\n", sql = > "select

[R] Change column of numbers in data frame to days

2010-10-23 Thread will phillips
Hello, I have seen a few posts about changing a vector of numbers to days of the week where the numbers are 1-7. I have a similar problem with a twist. I have a vector of numbers ranging form 20 to 500. The numbers represent days since a starting point. The list is not consecutive, some numbers

Re: [R] How long does skipping in read.table take

2010-10-23 Thread Dimitri Liakhovitski
O, wait a sec - does it mean I can't feed my objects into sql commands? On Sat, Oct 23, 2010 at 10:07 AM, Dimitri Liakhovitski wrote: > I just tried it: > > for(i in 11:16){ #i<-11 >  start<-Sys.time() >  print(start) >  flush.console() >  filename<-paste("skipped millions- ",i,".txt",sep="") >  

Re: [R] How long does skipping in read.table take

2010-10-23 Thread Dimitri Liakhovitski
I just tried it: for(i in 11:16){ #i<-11 start<-Sys.time() print(start) flush.console() filename<-paste("skipped millions- ",i,".txt",sep="") mydata<-read.csv.sql("myfilel.txt", sep="|", eol="\r\n", sql = "select * from file limit 100, (100*i-1)") write.table(mydata,file=filename,sep

[R] Frank Harrell's 2011 RMS Short Course-March 9,10 and 11 (fwd)

2010-10-23 Thread Frank Harrell
2011 Regression Modeling Strategies Short Course by Frank E. Harrell, Jr., Ph.D., Professor and Chair, Department of Biostatistics, Vanderbilt University School of Medicine. 2011 Dates: Wednesday, March 9 (8:00AM-11:00AM), Thursday, March 10 (8:00AM-4:00PM) and Friday, March 11, 2011 (8:00AM-

Re: [R] How long does skipping in read.table take

2010-10-23 Thread Dimitri Liakhovitski
Oh, I understand - I did not realize it's reading in the whole file. So, is there any way to make it read it in only once and the spit into R just one piece (e.g., 1 million rows), write a regular file out (e.g., a txt using write.table), and then grab the next million? Because I was planning to do

Re: [R] Random Forest AUC

2010-10-23 Thread mxkuhn
I think the issue is that you really can't use the training set to judge this (without resampling). For example, k nearest neighbors are not known to over fit, but a 1nn model will always perfectly predict the training data. Max On Oct 23, 2010, at 9:05 AM, "Liaw, Andy" wrote: > What Breim

Re: [R] How long does skipping in read.table take

2010-10-23 Thread Gabor Grothendieck
On Sat, Oct 23, 2010 at 9:20 AM, Dimitri Liakhovitski wrote: > This is very helpful, Gabor. > I've run the code to figure out the end of the line and here is what I > am seeing at the end of each line: \r\n > So, I specified like this: > mydata<-read.csv.sql("myfile.txt", sep="|", eol="\r\n", sql

Re: [R] How long does skipping in read.table take

2010-10-23 Thread Dimitri Liakhovitski
This is very helpful, Gabor. I've run the code to figure out the end of the line and here is what I am seeing at the end of each line: \r\n So, I specified like this: mydata<-read.csv.sql("myfile.txt", sep="|", eol="\r\n", sql = "select * from file limit 200, 100") However, again it's hanging agai

Re: [R] Random Forest AUC

2010-10-23 Thread Liaw, Andy
What Breiman meant is that as the model gets more complex (i.e., as the number of trees tends to infinity) the geneeralization error (test set error) does not increase. This does not hold for boosting, for example; i.e., you can't "boost forever", which nececitate the need to find the optimal numb

Re: [R] Bayesian constrained regression method?

2010-10-23 Thread Michael Bedward
Hi Jim, You don't mention whether you have any prior information regarding X2 that can be used to constrain values imputed for it. I think you will need some because without it values sampled for b and X2 respectively will just "see-saw" against each other. Michael On 22 October 2010 18:37, Jim

Re: [R] How long does skipping in read.table take

2010-10-23 Thread Gabor Grothendieck
On Sat, Oct 23, 2010 at 7:44 AM, Dimitri Liakhovitski wrote: > Gabor, > maybe some of my code is wrong (I don't know sql at all). I tried the > following with just a few lines as a test: > library(sqldf) > mydata<-read.csv.sql("myfile.txt",sep="|", sql = "select * from file 200, > 100") "limit"

Re: [R] command to start R and Rcmdr?

2010-10-23 Thread Henrique Dallazuanna
You've tried removing the quotes around require? On Sat, Oct 23, 2010 at 6:19 AM, Liviu Andronic wrote: > Dear all > I would like to start R with Rcmdr from the cli, without tweaking > Rprofile.site. This has been discussed in the past [1], but I don't > see a solution that (1) could be used with

[R] (no subject)

2010-10-23 Thread Felipe Carrillo
http://www.sangermanomobili.it/mfoto.php [[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/posting-guide.html

Re: [R] How long does skipping in read.table take

2010-10-23 Thread Dimitri Liakhovitski
Gabor, maybe some of my code is wrong (I don't know sql at all). I tried the following with just a few lines as a test: library(sqldf) mydata<-read.csv.sql("myfile.txt",sep="|", sql = "select * from file 200, 100") But it's just hanging. The same happened when I wrote: mydata<-read.csv.sql("myfile.

Re: [R] Feedback on you manual

2010-10-23 Thread Patrick Burns
No (and I have an excuse). It is a tree of pages rather than a single document. My impression is that a pdf needs to be linear. On 23/10/2010 10:09, Liviu Andronic wrote: (off-topic) Dear Patrick On Sat, Oct 23, 2010 at 10:57 AM, Patrick Burns wrote: Perhaps 'Some hints for the R beginner'

Re: [R] help

2010-10-23 Thread Liviu Andronic
Hello On Sat, Oct 23, 2010 at 10:43 AM, Mastaki Kambale wrote: > > Dears R > I am a self taught novice user of R. I begin to understand its philosophy and > some basics like objects, vectors, arrays, lists etc...I still am not able to > manipulate variables (objects!) in dataframes (objects als

[R] help

2010-10-23 Thread Mastaki Kambale
Dears R I am a self taught novice user of R. I begin to understand its philosophy and some basics like objects, vectors, arrays, lists etc...I still am not able to manipulate variables (objects!) in dataframes (objects also !!!) already imported from my usual statistical package (stata 10/SE) d

Re: [R] Feedback on you manual

2010-10-23 Thread Liviu Andronic
(off-topic) Dear Patrick On Sat, Oct 23, 2010 at 10:57 AM, Patrick Burns wrote: > Perhaps 'Some hints for the R beginner' > http://www.burns-stat.com/pages/Tutor/hints_R_begin.html > Do you provide a PDF version of this human-friendly introduction to R? :) Regards Liviu > is closer to what you

Re: [R] Feedback on you manual

2010-10-23 Thread Patrick Burns
Perhaps 'Some hints for the R beginner' http://www.burns-stat.com/pages/Tutor/hints_R_begin.html is closer to what you have in mind. It includes links to other documents that are possibly along the lines you seek. On 23/10/2010 07:18, 刘力平 wrote: Dear Sir/Madam: Great thanks for R project and yo

Re: [R] Help: Maximum likelihood estimation

2010-10-23 Thread roach
I'm not quite familiar with E-M algorithm, but I think what I did was the first step of the iteration. The method used in the original article is as follow: http://r.789695.n4.nabble.com/file/n3008241/untitled.png I gave lamda an initial value, and maximized the likelihood function. This is the

[R] command to start R and Rcmdr?

2010-10-23 Thread Liviu Andronic
Dear all I would like to start R with Rcmdr from the cli, without tweaking Rprofile.site. This has been discussed in the past [1], but I don't see a solution that (1) could be used with any working directory and (2) would avoid starting Rcmdr on every R start-up. Personally I tried the following,