Re: [R] Reading data

2009-10-28 Thread Vassilis Golfinopoulos
Val, please take it slow, you are missing basic stuff here. (1) Windows Explorer may hide extensions; the 'Type' column should read 'R file' anyway. (2) Script files are included in your workspace with the comand source(). Please type ?source for details. (3) You should call files with their pat

Re: [R] Anthropometric calculations with R

2009-10-28 Thread Shige Song
Dear David, This information is very helpful, thanks. Best, Shige On Wed, Oct 28, 2009 at 10:55 AM, David Winsemius wrote: > > On Oct 28, 2009, at 10:18 AM, David Winsemius wrote: > > You might want to take a look at this article by WEI, PERE, KOENKER, AND >> HE. Its in the research files of

Re: [R] Anthropometric calculations with R

2009-10-28 Thread David Winsemius
On Oct 28, 2009, at 10:18 AM, David Winsemius wrote: You might want to take a look at this article by WEI, PERE, KOENKER, AND HE. Its in the research files of Koenker who is a regular contributor to R-help: http://www.econ.uiuc.edu/~roger/research/growth/growth.pdf In particular it menti

Re: [R] Reading data

2009-10-28 Thread Val
The working directory is > getwd() [1] "C:/Documents and Settings/Val/My Documents" The data file(Rossi.dat) and the script(Rossi.R) are in "C:/Documents and Settings/Val/My Documents/R_data/prd" How should I write to read the file? source(???) # what should be included here? Rossi <- re

Re: [R] ggplot2: stat_bin ..count.. with geom_text when NA is present

2009-10-28 Thread hadley wickham
Hi Bryan, Thanks for the reproducible example. The problem is actually in your code, not mine ;) You probably want: y = min(res, na.rm = TRUE) - 0.1 * diff(range(res, na.rm = TRUE)) Hadley (drop = TRUE solves a difference problem - it controls whether or not to remove bins with zero count) On

[R] please join the R group on LinkedIn

2009-10-28 Thread Ajit de Silva
LinkedIn is a professional networking site but we have discussions and news items as well. We have over fifteen hundred group members. http://www.linkedin.com/groups?about=&gid=77616&trk=anet_ug_grppro -- _ Ajit Gemunu de Silva Oakland CA 94619 skype: ajit_de_si

Re: [R] structural equation modeling

2009-10-28 Thread Viechtbauer Wolfgang (STAT)
There is the 'sem' package: http://cran.r-project.org/web/packages/sem/index.html The task views (http://cran.r-project.org/web/views/) are often a good place to start when looking for particular techniques/methods. Best, -- Wolfgang Viechtbauerhttp://www.wvbauer.com/ D

Re: [R] cross-over designs

2009-10-28 Thread Peter Dalgaard
Peter Dalgaard wrote: > Data Analytics Corp. wrote: >> Hi, >> >> I have a dataset from a client where the data is from a cross-over >> design. Basically, each subject in a survey was asked to rate two >> products, A and B. The subject sampled A first and then after an >> appropriate wash-out peri

Re: [R] structural equation modeling

2009-10-28 Thread Duncan Murdoch
On 10/28/2009 10:37 AM, Robert Terwilliger wrote: Dear R-help, I am interested in using structural equation modeling. Just getting started with it, but I'm looking for suggestions for packages. As an aside, what's the best way for looking for packages at CRAN? The task views are great: see

[R] structural equation modeling

2009-10-28 Thread Robert Terwilliger
Dear R-help, I am interested in using structural equation modeling. Just getting started with it, but I'm looking for suggestions for packages. As an aside, what's the best way for looking for packages at CRAN? -- Robert Terwilliger Biomedical Physicist Laboratory of Neurocognitive Development

Re: [R] regression on large file

2009-10-28 Thread Benilton Carvalho
bigmemory and biglm packages may be of your interest. b On Oct 28, 2009, at 8:50 AM, Georg Ehret wrote: Dear R community, I have a fairly large file with variables in rows. Every variable (thousands) needs to be regressed on a reference variable. The file is too big to load into R (or R ge

Re: [R] Reading data

2009-10-28 Thread David Winsemius
On Oct 28, 2009, at 10:04 AM, Val wrote: Hi User's, This might be a simple question but it is giving me a hard time as I am a new user. I installed R version 2.9.2 (2009-08-24) 1. I just copied a short script from Fox (2002) as a practice and wanted to save it as Rossi.R. How? The

Re: [R] Reading data

2009-10-28 Thread Vassilis Golfinopoulos
Hi Val, Windows does not display extensions by default. Check the 'Type' column; it should read 'R file'. Keep in mind what you are dealing with; Rossi.R is a script, so you cannot open it with read.table. You have to use source() for that. Moreover, use the extension, as well (Rossi.R, not Rossi

Re: [R] cross-over designs

2009-10-28 Thread Peter Dalgaard
Data Analytics Corp. wrote: > Hi, > > I have a dataset from a client where the data is from a cross-over > design. Basically, each subject in a survey was asked to rate two > products, A and B. The subject sampled A first and then after an > appropriate wash-out period he/she sampled B. The nex

Re: [R] Reading data

2009-10-28 Thread Tal Galili
Hi Val, I am not sure what it is that you are trying to do. "read.table" Is not used to open an R script, but to open a data file. You will also need to give the extension of the file when using the command (someone please correct me if I am wrong). If you wish to open an R script, I would just u

Re: [R] Antropometrics with R

2009-10-28 Thread David Winsemius
You might want to take a look at this article by WEI, PERE, KOENKER, AND HE. Its in the research files of Koenker who is a regular contributor to R-help: http://www.econ.uiuc.edu/~roger/research/growth/growth.pdf In particular it mentions lmsqreg, which would be a package that implements

[R] Reading data

2009-10-28 Thread Val
Hi User's, This might be a simple question but it is giving me a hard time as I am a new user. I installed R version 2.9.2 (2009-08-24) 1. I just copied a short script from Fox (2002) as a practice and wanted to save it as Rossi.R. The system saved it without complain but when I looked at usi

[R] Regex matching that gives byte offset?

2009-10-28 Thread Johannes Graumann
Hi, Is there any way of doing 'grep' ore something like it on the content of a text file and extract the byte positioning of the match in the file? I'm facing the need to access rather largish (>600MB) XML files and would like to be able to index them ... Thanks for any help or flogging, Joh

Re: [R] GGPLOT2 Different Layers Different X Values

2009-10-28 Thread Hadley Wickham
Hi John, Could you please provide a small reproducible example? Thanks, Hadley Sent from my iPhone On 26/10/2009, at 6:50 PM, Jonathan Bleyhl > wrote: I'm trying to plot values based on a date and then overlay a histogram also by date. The problem is that both data sets don't have exact

Re: [R] Creating a sparse matrix from a file

2009-10-28 Thread Martin Maechler
> "PP" == Pallavi P > on Wed, 28 Oct 2009 16:30:25 +0530 writes: PP> Hi Martin, PP> I followed your example on my set of data. Which has non zero values in PP> 300k positions in 22638 X 80914 sparse matrix. I am able to load data into a PP> field and was able to do s

Re: [R] MLE for lambda of Poisson distribution using fitdistr

2009-10-28 Thread Terry Therneau
In general Poisson data consists of a pair of numbers (y,n), where y is the event count for the unit and n is the size of the unit. The Poisson MLE is sum(y)/sum(n). A general example is county level data where y is the number of events (rare cancer) and n is the county size. Two special cases a

Re: [R] Non-normal residuals.

2009-10-28 Thread Kjetil Halvorsen
On Wed, Oct 28, 2009 at 7:25 AM, David Scott wrote: > Karl Ove Hufthammer wrote: >> >> On Tue, 27 Oct 2009 18:06:02 -0400 Ben Bolker wrote: >>> >>>  If transforming your data brings you closer to satisfying >>> the assumptions of your analytic methods and having a sensible >>> analysis, then that

Re: [R] Non-normal residuals.

2009-10-28 Thread Ravi Varadhan
There is also the tlm() function in "hett" package for fitting linear models under t-distributed, heteroscedastic errors. Ravi. --- Ravi Varadhan, Ph.D. Assistant Professor, The Center on Aging and Health Division

[R] HoltWinters function

2009-10-28 Thread Nichenametla, Karthik K
Hi David, I am facing some issues with the HoltWinters function in R (v2.9.2). I am doing time series analysis using this method. For the time series data that I used, (alpha,beta,gamma) parameters came out to be (1,0,0). I think this theoretically should mean that the predicted timeseries valu

Re: [R] WAR file installation

2009-10-28 Thread Vijaya Parthiban
I know of one called Biocep / Virtual R workbench! Info here: http://www.ebi.ac.uk/microarray-srv/frontendapp/ Best, Parthiban. 2009/10/27 Cedrick W. Johnson > WAR files are strictly in the J2EE realm, not something related to R. > > You have to install your choice of app server and write java

[R] cross-over designs

2009-10-28 Thread Data Analytics Corp.
Hi, I have a dataset from a client where the data is from a cross-over design. Basically, each subject in a survey was asked to rate two products, A and B. The subject sampled A first and then after an appropriate wash-out period he/she sampled B. The next subject did the same, but in a di

Re: [R] Vector grouping challenge

2009-10-28 Thread jim holtman
What the breaks are is that you are looking to see where the NAs start. In your case, you wanted the value at the start of the NA string to be grouped with the following NAs. The 'is.na' will return TRUE for NAs and if you invert the vector, you will have TRUE for each of the non-NA values. By d

Re: [R] Vector grouping challenge

2009-10-28 Thread Johannes Graumann
Just so. I got until 'split' but was stuck on how to get the breaks ... Thank you! Joh jim holtman wrote: > Is this what you want: > >> testVector <- c(12,32,NA,NA,56,NA,78,65,87,NA,NA,NA,90) >> # get the breaks at the NAs >> xb <- cumsum(!is.na(testVector)) >> split(seq(length(testVector)

Re: [R] x11(title=' ')

2009-10-28 Thread Jim Lemon
On 10/28/2009 09:51 PM, Prof Brian Ripley wrote: ... Are you perchance x11() on Windows, when you should be using windows()? The posting guide asked you to tell us your OS, amongst other things I say, my dear professor, if this "MS" chap who has used a Microsoft email client and a Micros

Re: [R] Generating sequence of dates

2009-10-28 Thread Vadlamani, Satish {FLNA}
Thanks. Please expect more newbie questions!! Satish -Original Message- From: jim holtman [mailto:jholt...@gmail.com] Sent: Wednesday, October 28, 2009 7:05 AM To: Vadlamani, Satish {FLNA} Cc: R-help@r-project.org Subject: Re: [R] Generating sequence of dates try this: > current = as.D

Re: [R] Vector grouping challenge

2009-10-28 Thread jim holtman
Is this what you want: > testVector <- c(12,32,NA,NA,56,NA,78,65,87,NA,NA,NA,90) > # get the breaks at the NAs > xb <- cumsum(!is.na(testVector)) > split(seq(length(testVector)), xb) $`1` [1] 1 $`2` [1] 2 3 4 $`3` [1] 5 6 $`4` [1] 7 $`5` [1] 8 $`6` [1] 9 10 11 12 $`7` [1] 13 On Wed, O

Re: [R] boxplot, data frame and html

2009-10-28 Thread Gregoire Pau
Hello Silvano, 'hwrite' appends HTML elements in a web page. The web page has to be opened before adding elements in it. The following code should work: require(hwriter) p = openPage('T1000.html') hwrite(t1000[,c(1,5,6)], p, bgcolor='#ffdc98', row.bgcolor='#ffdc98', br=TRUE) hwriteImag

Re: [R] Generating sequence of dates

2009-10-28 Thread jim holtman
try this: > current = as.Date("2009/10/25") > start <- seq(current, by='-1 week', length=2)[2] > seq(start, by='1 week', length=10) [1] "2009-10-18" "2009-10-25" "2009-11-01" "2009-11-08" "2009-11-15" "2009-11-22" "2009-11-29" "2009-12-06" "2009-12-13" [10] "2009-12-20" > On Wed, Oct 28, 2009 a

[R] Vector grouping challenge

2009-10-28 Thread Johannes Graumann
Dear all, Is there an efficient way to get this list > testList <- list(c(1),c(2,3,4),c(5,6),c(7),c(8),c(9,10,11,12),c(13)) from this vector > testVector <- c(12,32,NA,NA,56,NA,78,65,87,NA,NA,NA,90) ? Basically the vector should be grouped, such that non-NA and all following NAs end up in one g

Re: [R] how can i call R program from one java program?

2009-10-28 Thread Romain Francois
On 10/28/2009 12:47 PM, wesley mathew wrote: Dear All I want to call the R program from one Java program because In my project R program parameters are set by one web page developed by java. Is this possible to call R program from java? many thanks in advance Hi, This has many different answ

[R] Generating sequence of dates

2009-10-28 Thread Vadlamani, Satish {FLNA}
Hello All: I have the following question # instantiate a date current = as.Date("2009/10/25") #generate a sequence of dates in the future future_dates = seq(current,by='1 week',length=53) Question: How to generate a sequence of past dates starting one week in the past relative to the current da

Re: [R] wilcox.exact() problem

2009-10-28 Thread David Croll
Dear Achim, let me thank you for this assurance! The sample size is too large (~4000 observations per group) to solve this problem exactly. The error message could maybe be improved, but the message is clear: This is too large to deal with. However, this is not a problem. With several thou

[R] how can i call R program from one java program?

2009-10-28 Thread wesley mathew
Dear All I want to call the R program from one Java program because In my project R program parameters are set by one web page developed by java. Is this possible to call R program from java? many thanks in advance -- Wesley C Mathew [[alternative HTML version deleted]] ___

[R] 'R CMD check' fails with "evaluation nested too deeply: infinite recursion"

2009-10-28 Thread Joerg van den Hoff
I get the error Error : evaluation nested too deeply: infinite recursion / options(expressions=)? during a 'R CMD check ...' on one of my packages. The reason seems to be that this package is mutually dependent on another one (i.e. the DESCRIPTION files of package A lists package B under "Depen

Re: [R] compilation options to get install.packages() to invoke tcl/tk

2009-10-28 Thread Geoff Russell
On Wed, Oct 28, 2009 at 9:27 PM, Peter Dalgaard wrote: > Geoff Russell wrote: >> Hi UseRs, >> >> I've just installed 2.10.0 on Ubuntu hardy, compiling from the tar.gz bundle. >> >> install.packages() just says "Error in install.packages() : no >> packages were specified" [snip ... ] > checking f

[R] boxplot, data frame and html

2009-10-28 Thread Silvano
Hi, I'm trying put in same page: - a data frame with 3 columns and 45 lines; - a box plot; the code is: require(hwriter) hwrite(t1000[,c(1,5,6)], 'T1000.html', bgcolor='#ffdc98', row.bgcolor='#ffdc98', br=TRUE) p = openPage('T1000.html') hwriteImage('caixa.jpg', p, br=TRUE) hwrite('',p,

Re: [R] Creating a sparse matrix from a file

2009-10-28 Thread Pallavi P
Hi Martin, I followed your example on my set of data. Which has non zero values in 300k positions in 22638 X 80914 sparse matrix. I am able to load data into a field and was able to do some operations (essentially t(m) %*% m). However, when I tried to display the value in the resulted matrix. I

Re: [R] regression on large file

2009-10-28 Thread Barry Rowlingson
On Wed, Oct 28, 2009 at 11:50 AM, Georg Ehret wrote: > Dear R community, >   I have a fairly large file with variables in rows. Every variable > (thousands) needs to be regressed on a reference variable. The file is too > big to load into R (or R gets too slow having done it) and I do now read in

Re: [R] compilation options to get install.packages() to invoke tcl/tk

2009-10-28 Thread Peter Dalgaard
Geoff Russell wrote: > Hi UseRs, > > I've just installed 2.10.0 on Ubuntu hardy, compiling from the tar.gz bundle. > > install.packages() just says "Error in install.packages() : no > packages were specified" > > The "normal" hardy 2.6.2 version pops up a tcl/tk menu for repositories. > > I'm a

Re: [R] x11(title=' ')

2009-10-28 Thread Prof Brian Ripley
On Wed, 28 Oct 2009, ms.com wrote: Dear all I was trying to put a title for my plot, but i got this result, x11(width=10,height=5,title="seedling");par(mfrow=c(1,2))Error in x11(width = 10, height = 5, title = "seedling") : unused argument(s) (title = "seedling")> The title is not taking

[R] regression on large file

2009-10-28 Thread Georg Ehret
Dear R community, I have a fairly large file with variables in rows. Every variable (thousands) needs to be regressed on a reference variable. The file is too big to load into R (or R gets too slow having done it) and I do now read in line by line with "scan" (see below) and write the results to

[R] compilation options to get install.packages() to invoke tcl/tk

2009-10-28 Thread Geoff Russell
Hi UseRs, I've just installed 2.10.0 on Ubuntu hardy, compiling from the tar.gz bundle. install.packages() just says "Error in install.packages() : no packages were specified" The "normal" hardy 2.6.2 version pops up a tcl/tk menu for repositories. I'm assuming I missed a configure option for t

Re: [R] Cannot activate chm help in R 2.10

2009-10-28 Thread Duncan Murdoch
On 27/10/2009 10:18 PM, Charles Annis, P.E. wrote: R-insiders: While trying to be clever I inserted these lines in ..\Rprofile.site (which works in R2.9.2 and earlier) # to prefer Compiled HTML help options(chmhelp=TRUE) but upon re-starting R2.10.0 I learned that chmhelp = TRUE is no longe

Re: [R] re gression with multiple dependent variables?

2009-10-28 Thread John Sorkin
Rnewb, Have you given any thought to multivariate linear regression (i.e. MAOVA in which there are multiple dependent variables )? This type of regression makes a number of assumptions beyond the "usual" regression model including multivariate normality of the outcome variables, but can be very use

Re: [R] Non-normal residuals.

2009-10-28 Thread David Scott
Karl Ove Hufthammer wrote: On Tue, 27 Oct 2009 18:06:02 -0400 Ben Bolker wrote: If transforming your data brings you closer to satisfying the assumptions of your analytic methods and having a sensible analysis, then that's good. If it makes things worse, that's bad. Other choices, depending

Re: [R] tk_choose.files without multiple selection?

2009-10-28 Thread Eger, Marcus
Thanks a lot. I installed tcl8.5 and tk8.5 (version 8.5.6) of ubuntu jaunty (there were no conflicts with dependencies <=> hardy) and everything works. Regards Marcus > -Ursprüngliche Nachricht- > Von: Prof Brian Ripley [mailto:rip...@stats.ox.ac.uk] > Gesendet: Dienstag, 27.

[R] x11(title=' ')

2009-10-28 Thread ms.com
Dear all I was trying to put a title for my plot, but i got this result, > x11(width=10,height=5,title="seedling");par(mfrow=c(1,2))Error in x11(width = > 10, height = 5, title = "seedling") : unused argument(s) (title = > "seedling")> The title is not taking How can i give a title for the

Re: [R] read.table but more tables at once

2009-10-28 Thread Barry Rowlingson
On Wed, Oct 28, 2009 at 9:38 AM, Sybille Wendel wrote: > Dear all, > > I have a lot of data files (.txt) that I want to read in all at once, if > possible. > the files have names in time system. for example: RA940101, RA940102, > RA940103, RA940104 an so on. > (meaning: RA, year:91, month: here ja

Re: [R] read.table but more tables at once

2009-10-28 Thread baptiste auguie
Hi, Try this, files <- paste("RA94010",1:3,sep="") # or files <- list.files(pattern = "RA94010") list.of.data <- lapply(files, read.table, header=F) # if required, collapse into a single data.frame do.call(rbind, list.of.data) HTH, baptiste 2009/10/28 Sybille Wendel : > Dear all, > > I have

Re: [R] Non-normal residuals.

2009-10-28 Thread Karl Ove Hufthammer
On Tue, 27 Oct 2009 18:06:02 -0400 Ben Bolker wrote: > If transforming your data brings you closer to satisfying > the assumptions of your analytic methods and having a sensible > analysis, then that's good. If it makes things worse, that's bad. > Other choices, depending on the situation, incl

[R] read.table but more tables at once

2009-10-28 Thread Sybille Wendel
Dear all, I have a lot of data files (.txt) that I want to read in all at once, if possible. the files have names in time system. for example: RA940101, RA940102, RA940103, RA940104 an so on. (meaning: RA, year:91, month: here january, day of the month.) I tried something like vektor <- c("RA940

Re: [R] Detection Times and Poisson Distribution

2009-10-28 Thread Karl Ove Hufthammer
On Tue, 27 Oct 2009 12:11:42 -0700 (PDT) Ben Bolker wrote: > This is not quite right because we have estimated the > rate from the data -- from ?ks.test > ... > > But perhaps not a bad start. Actually, it is a very bad start. Using estimated parameters in tests like ks.test gives you a *compl

Re: [R] Rjava, RImageJ, and/or S4 question.

2009-10-28 Thread Romain Francois
Hello, On 10/28/2009 12:21 AM, Robert Baer wrote: I am out of my league with this question. The following code starts the java imaging program ImageJ from within R, and displays an image (assuming ImageJ is installed on your computer). It does not assume ImageJ is installed, a version of

Re: [R] need help explain the routine input parameters for seROC and cROC found in the R archive

2009-10-28 Thread Dieter Menne
waverley palo wrote: > > I found the code in the archive. > > The author of this script says: "The first function (seROC) calculate > the standard error of ROC curve, the second function (cROC) compare > ROC curves." > > >> From: Bernardo Rangel Tura > ... > The original post has given the

Re: [R] re gression with multiple dependent variables?

2009-10-28 Thread Rnewb
thanks for the quick and accurate responses! cheers, Rnewb -- View this message in context: http://www.nabble.com/regression-with-multiple-dependent-variables--tp26088025p26088943.html Sent from the R help mailing list archive at Nabble.com. __ R-hel

<    1   2