Re: [R] Gam() function in R

2004-12-06 Thread Jari Oksanen
On 6 Dec 2004, at 7:36, Janice Tse wrote: Thanks for the email. I will check that out However when I was doing this :gam(y~s(x1)+s(x2,3), family=gaussian, data=mydata )it gives me the error : Error in terms.formula(formula, data = data) : invalid model formula in ExtractVars

[R] Use value of character vector for parameter of general R-function

2004-12-06 Thread always
__ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

[R] Cocoa GUI: pasting in R Console yields syntax error

2004-12-06 Thread Anthony Westerling
I've recently upgraded to R-2.0.1 on a Mac running OS X 10.3+ I am using the new Cocoa-based GUI. Everything was working well for a while. In the middle of an R session, I started suddenly to have a problem where code copied from an open editor window and pasted into the R Console gives a

Re: [R] Cocoa GUI: pasting in R Console yields syntax error

2004-12-06 Thread David Enot
Anthony I faced the same problem and it took me some time to spot the origin: I have no clue where it can come from!( I suspect this happened when I moved from 1.9.0 to 2.0.0, OS X 1.3...). I know that the built in R editor is very handy: what I do is a more myfile.r on the terminal to check

Re: [R] Gam() function in R

2004-12-06 Thread Yves Magliulo
hi all, this subject is very intersting for me. I'm using mgcv 0.8-9 with R version 1.7.1. i didn't know that there was an another gam version with package library(gam). Someone can tell me the basics differences between them? I look for an help page on google but i only find mgcv help pages.

Re: [R] Text Mining with R

2004-12-06 Thread Jean-Pierre Muller
Jose, Le 3 déc. 04, à 21:23, Jose Quesada a écrit : Tobias, I just created a zip file from the tar, and used the install from zip option of the Rwin console. ttda is shown in the list of installed packages. However, when I try load packages, or the equivaent library(ttda), I get: Error in

Re: [R] Re: Protocol for answering basic questions

2004-12-06 Thread Jim Lemon
Liaw, Andy wrote: ... Someone mentioned a tip shown at R startup (a la S-PLUS for Windows, I guess). I guess someone (hint, hint) could collect a set of tips, perhaps using Paul Johnson's page as a starting point, and make it into a contrib package similar to the `fortune' package. Those

RE: [R] Which FM should beginners R? A suggestion.

2004-12-06 Thread Ted Harding
On 06-Dec-04 Richard A. O'Keefe wrote: We've recently had a thread on beginners and FAQs and the like. I decided that it might be a good idea to offer a short list of on-line help pages that beginners should read. Goals: - the list short be short (I think mine is too long) - many of the

Re: [R] Gam() function in R

2004-12-06 Thread Simon Wood
I'm a new user of R gam() function. I am wondering how do we decide on the smooth function to use? The general form is gam(y~s(x1,df=i)+s(x2,df=j)...) , how do we decide on the degree freedom to use for each smoother, and if we shold apply smoother to each attribute? I guess you are

RE: [R] Gam() function in R

2004-12-06 Thread Janice Tse
Thank you very much. I am using gam() from mgcv actually. You answered my question about degree of freedom. One more question, if I were to compare the results from gam() and glm(), which numbers are of the greatest interest? What if my response variables are binary? Thanks! -Janice

Re: [R] String manipulation---mixed case

2004-12-06 Thread Martin Maechler
Spencer == Spencer Graves [EMAIL PROTECTED] on Sun, 05 Dec 2004 13:48:07 -0800 writes: Spencer That's great, Peter. Spencer For pedestrians like me who are not quite as facile with regular Spencer expressions, the following seems slightly more readable: Spencer s - the

Re: [R] Gam() function in R

2004-12-06 Thread Henric Nilsson
At 10:48 2004-12-06 +0100, Yves Magliulo wrote: this subject is very intersting for me. I'm using mgcv 0.8-9 with R version 1.7.1. You're in need of an update. i didn't know that there was an another gam version with package library(gam). This is the 'classic' GAM implementation by Hastie

Re: [R] tree class in R?

2004-12-06 Thread Martin Maechler
DFARRAR == DFARRAR [EMAIL PROTECTED] on Sun, 5 Dec 2004 22:09:02 -0500 writes: DFARRAR I am trying to store a couple numbers for each DFARRAR partition, in a subset of the partitions of my data DFARRAR set. Of course, one can accomplish this using a DFARRAR binary tree.

Re: [R] AIC, AICc, and K

2004-12-06 Thread Martin Maechler
Spencer == Spencer Graves [EMAIL PROTECTED] on Sat, 04 Dec 2004 17:09:26 -0800 writes: Spencer I don't know the best way, but the following looks like it will Spencer work: Spencer tstDF - data.frame(x=1:3, y=c(1,1,2)) Spencer fit0 - lm(y~1, tstDF) Spencer fitDF -

Re: [R] Gam() function in R

2004-12-06 Thread Simon Wood
this subject is very intersting for me. I'm using mgcv 0.8-9 with R version 1.7.1. i didn't know that there was an another gam version with package library(gam). Someone can tell me the basics differences between them? I look for an help page on google but i only find mgcv help pages. - I

Re: [R] String manipulation---mixed case

2004-12-06 Thread Gabor Grothendieck
Martin Maechler maechler at stat.math.ethz.ch writes: : : Spencer == Spencer Graves spencer.graves at pdf.com : on Sun, 05 Dec 2004 13:48:07 -0800 writes: : : Spencer That's great, Peter. : Spencer For pedestrians like me who are not quite as facile with regular : Spencer

Re: [R] String manipulation---mixed case

2004-12-06 Thread Gabor Grothendieck
Gabor Grothendieck ggrothendieck at myway.com writes: : : Martin Maechler maechler at stat.math.ethz.ch writes: : : : : : Spencer == Spencer Graves spencer.graves at pdf.com : : on Sun, 05 Dec 2004 13:48:07 -0800 writes: : : : : Spencer That's great, Peter. : : Spencer For

Re: [R] AIC, AICc, and K

2004-12-06 Thread Renaud Lancelot
Martin Maechler a écrit : Spencer == Spencer Graves [EMAIL PROTECTED] on Sat, 04 Dec 2004 17:09:26 -0800 writes: Spencer I don't know the best way, but the following looks like it will Spencer work: Spencer tstDF - data.frame(x=1:3, y=c(1,1,2)) Spencer fit0 - lm(y~1, tstDF)

[R] using subset

2004-12-06 Thread Antonio Olinto
Hi, I have doubts in using subset command. I have a list of, lets say, 15 species and I want to make a subset with only 2 of them. I’m the command data2 - subset(data1, species==sp1|species==sp2) Nevertheless, when I ask for the summary (summary(data2)) the others species names still apearing.

RE: [R] using subset

2004-12-06 Thread Doran, Harold
Antonio: If the variable you are subsetting is a factor with multiple levels (and it appears you have 15), then the levels of the factor remain and will show up in summary, but your data set will only include the rows of data that you want. I am pretty sure subset has worked properly in your

[R] removing NA as a level

2004-12-06 Thread Anne
Dear R-helpers, I have a problem which I suppose is trivila, but... I have included NA values as factors ( (to be able to make nice printed summaries with NAs % ba category ) with the following code dat$x.f-factor(dat$x, exclude=NULL); levels(dat$x.f)-c(A1,A2,A3,A4,NA); length(dat$x.f) Now, I

[R] RE: using subset

2004-12-06 Thread Antonio Olinto
Dear Harold, thanks for your answer. The problem is that the levels of the factor are shown not only in the summary, but also when I make an interaction plot. Is it possible to create a new subset without the reference to the levels that I will not use? Thanks again. Antonio Quoting Doran,

Re: [R] removing NA as a level

2004-12-06 Thread Chuck Cleland
dat$x.f - factor(replace(dat$x.f, dat$x.f == NA, NA)) Anne wrote: Dear R-helpers, I have a problem which I suppose is trivila, but... I have included NA values as factors ( (to be able to make nice printed summaries with NAs % ba category ) with the following code dat$x.f-factor(dat$x,

RE: [R] using subset

2004-12-06 Thread Petr Pikal
On 6 Dec 2004 at 7:55, Doran, Harold wrote: Antonio: If the variable you are subsetting is a factor with multiple levels (and it appears you have 15), then the levels of the factor remain and will show up in summary, but your data set will only include the rows of data that you want. I

Re: [R] removing NA as a level

2004-12-06 Thread Anne
Thank you! so easy and I did not think of it! - Original Message - From: Chuck Cleland [EMAIL PROTECTED] To: Anne [EMAIL PROTECTED] Cc: R list [EMAIL PROTECTED] Sent: Monday, December 06, 2004 2:12 PM Subject: Re: [R] removing NA as a level dat$x.f - factor(replace(dat$x.f, dat$x.f ==

Re: [R] removing NA as a level

2004-12-06 Thread Petr Pikal
On 6 Dec 2004 at 13:58, Anne wrote: Dear R-helpers, I have a problem which I suppose is trivila, but... I have included NA values as factors ( (to be able to make nice printed summaries with NAs % ba category ) with the following code dat$x.f-factor(dat$x, exclude=NULL);

[R] Modyfing PATH in Windows Installer for R

2004-12-06 Thread Henrik Andersson
Just a small suggestion since Windows have a file system not designed for command line use... Would it be possible to add the possibility of automatically adding/modifying the path to the R executables in the windows installer program? - Henrik

Re: [R] Modyfing PATH in Windows Installer for R

2004-12-06 Thread Gabor Grothendieck
Henrik Andersson h.andersson at nioo.knaw.nl writes: : : Just a small suggestion since Windows have a file system not designed : for command line use... : : Would it be possible to add the possibility of automatically : adding/modifying the path to the R executables in the windows installer

[R] how to get how many lines there are in a file.

2004-12-06 Thread Hu Chen
hi all If I wanna get the total number of lines in a big file without reading the file's content into R as matrix or data frame, any methods or functions? thanks in advance. Regards __ [EMAIL PROTECTED] mailing list

RE: [R] Modyfing PATH in Windows Installer for R

2004-12-06 Thread BXC (Bendix Carstensen)
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Henrik Andersson Sent: Monday, December 06, 2004 2:44 PM To: [EMAIL PROTECTED] Subject: [R] Modyfing PATH in Windows Installer for R Just a small suggestion since Windows have a file system not

Re: [R] RE: using subset

2004-12-06 Thread Peter Dalgaard
Antonio Olinto [EMAIL PROTECTED] writes: Dear Harold, thanks for your answer. The problem is that the levels of the factor are shown not only in the summary, but also when I make an interaction plot. Is it possible to create a new subset without the reference to the levels that I

Re: [R] String manipulation---mixed case

2004-12-06 Thread Martin Maechler
Gabor == Gabor Grothendieck [EMAIL PROTECTED] on Mon, 6 Dec 2004 12:10:42 + (UTC) writes: Gabor Gabor Grothendieck ggrothendieck at myway.com writes: Gabor : Gabor : Martin Maechler maechler at stat.math.ethz.ch writes: Gabor : : Nice. Since

[R] barplot() options for intervals on axes

2004-12-06 Thread Sebastien Moretti
Hello, I am a beginner with R. I read many tutorials and the FAQ but I cannot solve my problem. I use barplot() to view my graph. I try to get more interval marks on y axis. I wasn't able to find options in 'help(barplot)' or 'help(par)' to do this with barplot(). I seek for another option to

Re: [R] how to get how many lines there are in a file.

2004-12-06 Thread Marc Schwartz
On Mon, 2004-12-06 at 22:12 +0800, Hu Chen wrote: hi all If I wanna get the total number of lines in a big file without reading the file's content into R as matrix or data frame, any methods or functions? thanks in advance. Regards See ?readLines You can use: length(readLines(FileName))

Re: [R] how to get how many lines there are in a file.

2004-12-06 Thread Uwe Ligges
Hu Chen wrote: hi all If I wanna get the total number of lines in a big file without reading the file's content into R as matrix or data frame, any methods or functions? You must read it in R, or how do you think should one determine the number of lines in a file (if you don't want to use another

Re: [R] Modyfing PATH in Windows Installer for R

2004-12-06 Thread Chris Jackson
Henrik Andersson wrote: Just a small suggestion since Windows have a file system not designed for command line use... Would it be possible to add the possibility of automatically adding/modifying the path to the R executables in the windows installer program? After asking the same question on

RE: [R] how to get how many lines there are in a file.

2004-12-06 Thread Liaw, Andy
From: Marc Schwartz On Mon, 2004-12-06 at 22:12 +0800, Hu Chen wrote: hi all If I wanna get the total number of lines in a big file without reading the file's content into R as matrix or data frame, any methods or functions? thanks in advance. Regards See ?readLines You can

Re: [R] barplot() options for intervals on axes

2004-12-06 Thread Uwe Ligges
Sebastien Moretti wrote: Hello, I am a beginner with R. I read many tutorials and the FAQ but I cannot solve my problem. I use barplot() to view my graph. I try to get more interval marks on y axis. I wasn't able to find options in 'help(barplot)' or 'help(par)' to do this with barplot(). See

Re: [R] barplot() options for intervals on axes

2004-12-06 Thread Chuck Cleland
Did you see the lab argument to par()? 'lab' A numerical vector of the form 'c(x, y, len)' which modifies the way that axes are annotated. The values of 'x' and 'y' give the (approximate) number of tickmarks on the x and y axes and 'len' specifies the label size.

[R] matrix of 1,0's to a data.frame of factors

2004-12-06 Thread Rajarshi Guha
Hi, I have an integer matrix consisting of 1's and 0's and I would like to convert this to a data.frame where each column of the matrix becomes a factor variable. Now, some columns of the matrix have only 1's or only 0's as a result there is only 1 level for those columns in the data.frame.

Re: [R] Modyfing PATH in Windows Installer for R

2004-12-06 Thread Duncan Murdoch
On Mon, 06 Dec 2004 14:43:46 +0100, Henrik Andersson [EMAIL PROTECTED] wrote : Just a small suggestion since Windows have a file system not designed for command line use... Hmm? I'm not sure what you mean by that. As far as the command line is concerned, Windows and Unix file systems are

Re: [R] barplot() options for intervals on axes

2004-12-06 Thread Sebastien Moretti
Did you see the lab argument to par()? 'lab' A numerical vector of the form 'c(x, y, len)' which modifies the way that axes are annotated. The values of 'x' and 'y' give the (approximate) number of tickmarks on the x and y axes and 'len' specifies the

Re: [R] matrix of 1,0's to a data.frame of factors

2004-12-06 Thread Dimitris Rizopoulos
Hi Rajarshi, try this: mat - sample(0:1, 20, TRUE); dim(mat) - c(5,4) mat[,1] - 0; mat[,3] - 1 # dat - data.frame(mat) dat[] - lapply(dat, function(x) factor(x, levels=c(0,1))) dat lapply(dat, levels) I hope it helps. Best, Dimitris Dimitris Rizopoulos Ph.D. Student Biostatistical

Re: [R] Modyfing PATH in Windows Installer for R

2004-12-06 Thread Gabor Grothendieck
Chris Jackson chris.jackson at imperial.ac.uk writes: : : Henrik Andersson wrote: : Just a small suggestion since Windows have a file system not designed : for command line use... : : Would it be possible to add the possibility of automatically : adding/modifying the path to the R

Re: [R] Modyfing PATH in Windows Installer for R

2004-12-06 Thread Duncan Murdoch
On Mon, 06 Dec 2004 14:34:01 +, Chris Jackson [EMAIL PROTECTED] wrote : The ideal solution seems to be what's done in Mac OS X, that is, to store a permanent path to the current R version as a symlink, and then just changing where the symlink points to when R is upgraded. Unfortunately

Re: [R] barplot() options for intervals on axes

2004-12-06 Thread Marc Schwartz
On Mon, 2004-12-06 at 15:30 +0100, Sebastien Moretti wrote: Hello, I am a beginner with R. I read many tutorials and the FAQ but I cannot solve my problem. I use barplot() to view my graph. I try to get more interval marks on y axis. I wasn't able to find options in 'help(barplot)' or

Re: [R] Modyfing PATH in Windows Installer for R

2004-12-06 Thread Gabor Grothendieck
Duncan Murdoch murdoch at stats.uwo.ca writes: : : On Mon, 06 Dec 2004 14:43:46 +0100, Henrik Andersson : h.andersson at nioo.knaw.nl wrote : : : Just a small suggestion since Windows have a file system not designed : for command line use... : : Hmm? I'm not sure what you mean by that. As

RE: [R] Modyfing PATH in Windows Installer for R

2004-12-06 Thread Philippe Grosjean
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Chris Jackson Sent: Monday, December 06, 2004 3:34 PM To: Henrik Andersson Cc: [EMAIL PROTECTED] Subject: Re: [R] Modyfing PATH in Windows Installer for R Henrik Andersson wrote: Just a small

RE: [R] Computing the minimal polynomial or, at least, its degree

2004-12-06 Thread Ravi Varadhan
Dear Spencer, Thank you very much for your help. Your solution is almost correct, but not quite completely (it is correct for your example of A, but not in general). The problem is that the minimal polynomial is related to the characteristic polynomial in a not-so-straightforward manner. The

[R] (no subject)

2004-12-06 Thread Rene Pineda
I need information about space state models in structural model and kalman filtering. I have a univariate time serie and i nedd aplicate space state model Thank's - Todo lo que quieres saber de Estados Unidos, América Latina y el resto del Mundo. Visíta

[R] Missing Values

2004-12-06 Thread nhy303
I have just started using R for my PhD. I am importing my data from Excel via notepad into Word. Unfortunately, my data has many missing values. I have put '.' and this allowed me to import the data into R. However, I now want to interpolate these missing values. Please can someone give me

[R] EXPORT OUPUTS

2004-12-06 Thread Rene Pineda
I need information about how i can exports the ouputs in latex or in other format... Thank's - Todo lo que quieres saber de Estados Unidos, América Latina y el resto del Mundo. Visíta Yahoo! Noticias. [[alternative HTML version deleted]]

Re: [R] Modyfing PATH in Windows Installer for R

2004-12-06 Thread Duncan Murdoch
On Mon, 6 Dec 2004 16:04:56 +0100, Philippe Grosjean [EMAIL PROTECTED] wrote : Path and environment variables are indeed mirrored in the registry under Windows NT. Thus, a program that can change the registry, like Inno Setup, can also change the path. See here:

Re: [R] barplot() options for intervals on axes

2004-12-06 Thread Sebastien Moretti
Hello, I am a beginner with R. I read many tutorials and the FAQ but I cannot solve my problem. I use barplot() to view my graph. I try to get more interval marks on y axis. I wasn't able to find options in 'help(barplot)' or 'help(par)' to do this with barplot(). I seek for

Re: [R] barplot() options for intervals on axes

2004-12-06 Thread Marc Schwartz
On Mon, 2004-12-06 at 16:31 +0100, Sebastien Moretti wrote: There are too many answers in the FAQ. Given the discussions here of late, I suspect that there will be one or two folks who might disagree with that statement... ;-) Marc __ [EMAIL

Re: [R] EXPORT OUPUTS

2004-12-06 Thread Marc Schwartz
On Mon, 2004-12-06 at 09:28 -0600, Rene Pineda wrote: I need information about how i can exports the ouputs in latex or in other format... Thank's See the 'xtable' package as well as the latex() function in the 'Hmisc' package on CRAN. HTH, Marc Schwartz

Fwd: Re: [R] barplot() options for intervals on axes

2004-12-06 Thread Sebastien Moretti
There are too many answers in the FAQ. For this topic ! Marc Schwartz -- Sebastien MORETTI Linux User - #327894 CNRS - IGS 31 chemin Joseph Aiguier 13402 Marseille cedex 20, FRANCE tel. +33 (0)4 91 16 44 55 __ [EMAIL PROTECTED] mailing list

[R] The survival rate at a certain time

2004-12-06 Thread Lisa Wang
Hello there, I am doing analysis on survival data. How do I pick out a probability of survival at a chosen landmark time(for example, 3 years, 4 years) from the result of survfit? or any other functions? As I know, the result of 'survfit' only have the probabilities for all event or cencor time.

Re: [R] Gam() function in R

2004-12-06 Thread Yves Magliulo
so mgcv package is the one i need! indeed, i want integrated smoothness selection and smooth interactions rather than stepwise selection. i have a lot of predictor, and i use gam to select those who are efficient and exclude others. (using p-value) thanks a lot for those precious information.

RE: [R] The survival rate at a certain time

2004-12-06 Thread Austin, Matt
You can use the summary method for a survfit object from the package survival as in the following example: library(survival) summary( survfit( Surv(futime, fustat)~rx,data=ovarian), times=500) Call: survfit(formula = Surv(futime, fustat) ~ rx, data = ovarian) rx=1 time

Re: [R] Excel *.xls files, RODBC

2004-12-06 Thread Alan Swanson
I read excel spreadsheats into R often using the RODBC package. I like being able to manipulate my data in excel then import it directly into R without saving as text. I use a windows xp machine and an older version of R (1.9.1). Assuming you have a worksheet in melvin.xls named data, here is

RE: [R] Excel *.xls files, RODBC

2004-12-06 Thread Berton Gunter
Folks: An additional issue is that worksheet names must conform to ODBC/SQL standards; so, for example, Excel permits worksheet names with embedded spaces, but RODBC does not handle them (or at least, I was not able to get to to do so), as this is not permitted in the standards. -- Bert Gunter

Re: [R] Excel *.xls files, RODBC

2004-12-06 Thread James Muller
There is also a perl module that converts excel files to .csv on CPAN. It works fine for everything I've ever used it for, which is really simple stuff, i.e. no cells defined by functions. steps involved: 1. go to www.cpan.org and find the package, download it 2. ensure you have the necessary

Re: [R] how to get how many lines there are in a file.

2004-12-06 Thread Thomas Lumley
On Mon, 6 Dec 2004, Uwe Ligges wrote: Hu Chen wrote: hi all If I wanna get the total number of lines in a big file without reading the file's content into R as matrix or data frame, any methods or functions? You must read it in R, or how do you think should one determine the number of lines in a

Re: [R] Excel *.xls files, RODBC

2004-12-06 Thread Marc Schwartz
On Tue, 2004-12-07 at 04:09 +1100, James Muller wrote: There is also a perl module that converts excel files to .csv on CPAN. It works fine for everything I've ever used it for, which is really simple stuff, i.e. no cells defined by functions. steps involved: 1. go to www.cpan.org and

RE: [R] how to get how many lines there are in a file.

2004-12-06 Thread Liaw, Andy
From: Liaw, Andy From: Marc Schwartz On Mon, 2004-12-06 at 22:12 +0800, Hu Chen wrote: hi all If I wanna get the total number of lines in a big file without reading the file's content into R as matrix or data frame, any methods or functions? thanks in advance.

Re: [R] Gam() function in R

2004-12-06 Thread Frank E Harrell Jr
Yves Magliulo wrote: so mgcv package is the one i need! indeed, i want integrated smoothness selection and smooth interactions rather than stepwise selection. i have a lot of predictor, and i use gam to select those who are efficient and exclude others. (using p-value) It is interesting that you

[R] R Coders - Programmers

2004-12-06 Thread Mike Thomas
I'm hoping the members can guide me to someone looking for coding work in R. I'm running an on-line survey service bureau where we do 360-feedback (data is collected about a person's leadership/work behaviors from those all-around him/her 360-degrees). We've built the front end admin section in

[R] one dimensional AKIMA in R?

2004-12-06 Thread Thomas Petzoldt
Hello, I am looking for an interpolation method similar to the one-dimensional AKIMA interpolation as in Akima (1970). Is there already such an algorithm in R which I may have overlooked? Thank you in advance Thomas P. H. Akima, A new method of interpolation and smooth curve fitting based on

RE: [R] how to get how many lines there are in a file.

2004-12-06 Thread Marc Schwartz
On Mon, 2004-12-06 at 12:26 -0500, Liaw, Andy wrote: Marc alerted me off-list that count.fields() might spent time delimiting fields, which is not needed for the purpose of counting lines, and suggested using sep=\n as a possible way to make it more efficient. (Thanks, Marc!) Here are

Re: [R] Cocoa GUI: pasting in R Console yields syntax error

2004-12-06 Thread Anthony Westerling
Thanks David. I'm glad I'm not the only one. I was beginning to wonder if I had really lost it. Anthony On Dec 6, 2004, at 1:23 AM, David Enot wrote: Anthony I faced the same problem and it took me some time to spot the origin: I have no clue where it can come from!( I suspect this happened

Re: [R] how to get how many lines there are in a file.

2004-12-06 Thread David Whiting
Thomas Lumley [EMAIL PROTECTED] writes: [...] If the file is large enough that you don't want to read the whole thing at once you can read it in chunks using readLines(). If all the lines are the same length you can find the size of the file and divide by the length of a line. Also, you

Re: [R] how to get how many lines there are in a file.

2004-12-06 Thread Uwe Ligges
David Whiting wrote: Thomas Lumley [EMAIL PROTECTED] writes: [...] If the file is large enough that you don't want to read the whole thing at once you can read it in chunks using readLines(). If all the lines are the same length you can find the size of the file and divide by the length of a

[R] convert Map shapes to logical matrices - for set operations

2004-12-06 Thread James Muller
Hi, I have a little problem. I'm trying to do the following: Convert _projected_ shapes from a Map object into logical matrices. That is, rasterize a shape into a logical in-the-shape and out-of-the-shape matrix. What I'm trying to do is get an 'equal-area' estimate of the area of

Re: [R] Re: (no subject)

2004-12-06 Thread Jeff Newmiller
On Mon, 6 Dec 2004, Vito Ricci wrote: Hi, see: http://agec221.agecon.uiuc.edu/csiss/Rgeo/ for R-Spatial Models, are there many packages for spatial data analysis. State space has nothing to do with spatial... the space term comes from linear algebra, and has to do with how the innards

RE: [R] how to get how many lines there are in a file.

2004-12-06 Thread Liaw, Andy
From: Marc Schwartz On Mon, 2004-12-06 at 12:26 -0500, Liaw, Andy wrote: Marc alerted me off-list that count.fields() might spent time delimiting fields, which is not needed for the purpose of counting lines, and suggested using sep=\n as a possible way to make it more efficient.

[R] surface fitting

2004-12-06 Thread m p
Hello, I am looking for a R routine to fit a function/surface to my data 3d data. I'd like to use the function in a model so something like splines is not applicable. The data are smooth and can provide a plot if helpful. Thanks, Mark __ [EMAIL

Re: [R] surface fitting

2004-12-06 Thread Thomas Petzoldt
m p wrote: Hello, I am looking for a R routine to fit a function/surface to my data 3d data. I'd like to use the function in a model so something like splines is not applicable. The data are smooth and can provide a plot if helpful. You may try surf.ls or surf.gls from package spatial. Thomas P.

[R] VR package not found for R version 1.9.1

2004-12-06 Thread Moises Hassan
I'm trying to install the VR package for version 1.9.1 but I'm getting the following error message: install.packages(VR) trying URL `http://cran.r-project.org/bin/windows/contrib/1.9/PACKAGES' Content type `text/plain; charset=iso-8859-1' length 20716 bytes opened URL downloaded 20Kb

Re: [R] VR package not found for R version 1.9.1

2004-12-06 Thread Duncan Murdoch
On Mon, 6 Dec 2004 12:02:12 -0800, Moises Hassan [EMAIL PROTECTED] wrote : I'm trying to install the VR package for version 1.9.1 but I'm getting the following error message: install.packages(VR) trying URL `http://cran.r-project.org/bin/windows/contrib/1.9/PACKAGES' Content type

Re: [R] String manipulation---mixed case

2004-12-06 Thread Kjetil Brinchmann Halvorsen
Martin Maechler wrote: Gabor == Gabor Grothendieck [EMAIL PROTECTED] . . . Many people have been lamenting about too complicated examples on help pages. Yes, but the help examples should be advanced too! Long time ago, when I used excel a little, the

Re: [R] how to get how many lines there are in a file.

2004-12-06 Thread Kjetil Brinchmann Halvorsen
Liaw, Andy wrote: From: Marc Schwartz On Mon, 2004-12-06 at 22:12 +0800, Hu Chen wrote: hi all If I wanna get the total number of lines in a big file without reading the file's content into R as matrix or data frame, any methods or functions? thanks in advance. Regards See

Re: [R]time series - state space (was: no subject)

2004-12-06 Thread Kjetil Brinchmann Halvorsen
Rene Pineda wrote: I need information about space state models in structural model and kalman filtering. I have a univariate time serie and i nedd aplicate space state model Please use an informative subject line! See ?arima and the references therein. See also the R Newsletter, volume 2/2,

[R] plot color question

2004-12-06 Thread Derek Margetts
Thanks again Andy and Uwe for you help on my previous post of ploting lm coef and means. With your direction, I was able to expand and generalize the function to meet my requirements. Follow up question: Is it possible to make the points different colors depending on which quaderant they fall

RE: [R] how to get how many lines there are in a file.

2004-12-06 Thread Marc Schwartz
On Mon, 2004-12-06 at 14:00 -0500, Liaw, Andy wrote: Marc, I wrote the following function to read the file in chunks: countLines - function(file, chunk=1e3) { f - file(file, r) on.exit(close(f)) nLines - 0 while((n - length(readLines(f, chunk))) 0) nLines - nLines + n

Re: [R] Text Mining with R

2004-12-06 Thread Kjetil Brinchmann Halvorsen
Christian Schulz wrote: hi, i'm interested in text-mining, too and so make a trial. In Linux (suse9.2) it works fine, but in windows i can't install the source despite off installed perl, tools ,htmlhelp etc.. regards, christian Just downloaded, and had no problems running Rcmd INSTALL on the

RE: [R] 2GB memory?

2004-12-06 Thread Liaw, Andy
We have a dual Xeon box with 8GB ram, and an R process can use up to nearly 3GB of ram. Andy From: Rob Steele Can R (2.0.1) running under a 32 bit Linux use more than 2 GB of RAM? I have a server with 8 GB (heh heh) but R seems to never use more than 2. The only documentation I've

[R] Harmonic regression in R

2004-12-06 Thread Brian pfeng
I' need to smooth a serie univariate with harmonic regression, but i do not know if it exists somepeople know in R this type of regression, not in S-plus. Thank's _ Información de Estados Unidos y América Latina, en Yahoo! Noticias.

Re: [R] plot color question

2004-12-06 Thread Romain François
Hello That would do the trick : x - rnorm(50) y - rnorm(50) color - rep(blue,50) color[(x0)(y0)] -red color[(x0)(y0)] -green color[(x0)(y0)] -yellow plot(x,y,col=color,pch=19) abline(h=0) #just to check abline(v=0) #just to check Romain. Derek Margetts a écrit : Thanks again Andy and Uwe for you

[R] Random Walk plus noise Model

2004-12-06 Thread Brian pfeng
Hi, I need help about the example that it appears in the book Time series the Brokwell and Davis, specificaly the random walk plus noise in the chapter 8. I need simulate t simulate something similar. thanks _ Información de Estados

Re: [R] How about a mascot for R?

2004-12-06 Thread Richard A. O'Keefe
Thomas Yee [EMAIL PROTECTED] wrote: ps. Ross has Maori origins, so a native NZ animal is a better idea than usual. The native animals of New Zealand include no mammals except for - marine mammals in the coastal waters, such as the Hector's dolphin - a few species of bat which got

Re: [R] matrix of 1,0's to a data.frame of factors

2004-12-06 Thread Peter Dalgaard
Dimitris Rizopoulos [EMAIL PROTECTED] writes: Hi Rajarshi, try this: mat - sample(0:1, 20, TRUE); dim(mat) - c(5,4) mat[,1] - 0; mat[,3] - 1 # dat - data.frame(mat) dat[] - lapply(dat, function(x) factor(x, levels=c(0,1))) dat lapply(dat, levels) A small style/speed point:

[R] Blank eps output files

2004-12-06 Thread Sivakumar Mohandass
Dear all, The following commands results in a blank graph file, postscript(file = C:/Temp/Fig1.eps, height=4.0, width=4.0, horizontal = FALSE, onefile = FALSE, paper = special) x11(height=3,width=3) par(mar=.1+c(4.5,4.5,0,0)) x - c(10,20,30) y - c(5, 7, 9) plot (x,y) dev.off() The codes

Re: [R] Blank eps output files

2004-12-06 Thread Peter Dalgaard
Sivakumar Mohandass [EMAIL PROTECTED] writes: Dear all, The following commands results in a blank graph file, postscript(file = C:/Temp/Fig1.eps, height=4.0, width=4.0, horizontal = FALSE, onefile = FALSE, paper = special) x11(height=3,width=3) par(mar=.1+c(4.5,4.5,0,0)) x -

Re: [R] Blank eps output files

2004-12-06 Thread Sundar Dorai-Raj
Sivakumar Mohandass wrote: Dear all, The following commands results in a blank graph file, postscript(file = C:/Temp/Fig1.eps, height=4.0, width=4.0, horizontal = FALSE, onefile = FALSE, paper = special) x11(height=3,width=3) par(mar=.1+c(4.5,4.5,0,0)) x - c(10,20,30) y - c(5, 7, 9) plot (x,y)

[R] statistics packages for R?

2004-12-06 Thread Mark Pavlick
12/6 List members: I'm obtained the latest version of R for the Mac. I'm running OS 10.3.6 on a dual-processor G4. I'd appreciate any information about statistics training components that can be added to R. I'm a novice at statistics. Are there,

[R] akima

2004-12-06 Thread Erin Hodgess
There is a contributed package called Akima which has the akima function. R Version 2.0.1 Windows The akima is from October 2004, so it is up to date. Sincerely, Erin Hodgess mailto: [EMAIL PROTECTED] __ [EMAIL PROTECTED] mailing list

[R] Importing module into R library

2004-12-06 Thread Heather Maughan
Hello, I am basically familiar with R and am trying to import a module that someone else has written. I know that it must go into the R library but even after I place the file there R doesn't recognize it. The module is maanova, available from the Churchill lab group for analysis of microarray

RE: [R] Importing module into R library

2004-12-06 Thread Liaw, Andy
The instruction in http://www.jax.org/staff/churchill/labsite/software/anova/rmaanova/maanova.p df looks quite complete, so what is the exact problem you run into, if you followed that? BTW, it is stated that it was written for R-1.5.1, which is rather old... If you are using R-2.0.0 or later,

RE: [R] statistics packages for R?

2004-12-06 Thread Liaw, Andy
Get a copy of `Introductory Statistics with R', which has a support package `ISwR' on CRAN. The book is well worth twice its price. Andy From: Mark Pavlick 12/6 List members: I'm obtained the latest version of R for the Mac. I'm running

  1   2   >