Re: [R] Calculating a Maximum for a row or column with NA's

2010-04-18 Thread Henrik Bengtsson
On Sun, Apr 18, 2010 at 7:26 AM, steven mosher wrote: > Ya I got that result but fixing it was a mystery. especially since I will > eventually want to subtract the row max from the row Min ( or calculate the > range) > if a matrix thus is: > >   [,1] [,2] [,3] > [1,]   NA   NA   NA > [2,]    2    

Re: [R] glmer with non integer weights

2010-04-18 Thread Emmanuel Charpentier
Le vendredi 16 avril 2010 à 00:15 -0800, Kay Cichini a écrit : > thanks thierry, > > i considered this transformations already, but variance is not stabilized > and/or normality is neither achieved. > i guess i'll have to look out for non-parametrics? Or (maybe) a model based on a non-Gaussian li

[R] Problem with RGenoud

2010-04-18 Thread yoda55
I've been using RGenoud for a while and it worked smoothly so far. However I came across a strange problem lately (for me at least...). It fails after the first individual and I get the following error message when I set MemoryMatrix = FALSE : Error in genoud(fn, nvars = 8, max = TRUE, pop.size

[R] help

2010-04-18 Thread anderson nuel
Hello, I would like to create all combinations of vectors. I find on Matalb this function 'combvec' which create all combinations of vectors. Please could you help me to find the corresponds function of 'combvec'. For example: On Matlab >> a1 = [1 2 3; 4 5 6] a1 = 1 2 3

[R] unorder an ordered factor

2010-04-18 Thread David.Epstein
Given an ordered factor, how does one unorder it? I tried various commands with reorder, with order=F, but they all gave me error messages. I also tried to drop the order with various 'as dot something' commands, but these didn't work either. -- View this message in context: http://n4.nabble.com

[R] load all data sets in a package

2010-04-18 Thread carol white
Hi, It might be a simple question but how to load all data sets of a package? It's possible to get the list of data sets in a package with v= data(package = package_name) v[3]$results[,3] but data(get(v[3]$results[,3])) doesn't work. Thanks Carol _

Re: [R] [R-pkgs] formatR: farewell to ugly R code... Problem with too old ver. of Gtk

2010-04-18 Thread Brian Lunergan
Yihui Xie wrote: > This is an announcement of the release of an R package 'formatR', > which can help us format our R code to make it more human-readable. If > you have ugly (I mean unformatted) R code like this: > > # rotation of the word "Animation" > # in a loop; change the angle and color > #

Re: [R] update of a function

2010-04-18 Thread carol white
Hi, I could finally create an R package. I was suprised to notice that when I want to update a function, even if it is updated in package_name/R/function.R and after build but it is not updated when the package is loaded. I see that the tar.gz file is updated but when I load the package, I get t

Re: [R] unorder an ordered factor

2010-04-18 Thread David Winsemius
On Apr 18, 2010, at 6:03 AM, David.Epstein wrote: Given an ordered factor, how does one unorder it? I tried various commands with reorder, with order=F, but they all gave me error messages. I also tried to drop the order with various 'as dot something' commands, but these didn't work either

Re: [R] Serverless databases in R

2010-04-18 Thread Gabor Grothendieck
SQLite and H2. These databases are included right in the driver packages RSQLite and RH2 so there is nothing extra to install except you must have Java installed in the case of H2. Also both are supported by sqldf. On Sun, Apr 18, 2010 at 12:56 AM, kMan wrote: > Dear list, > > What are the cros

Re: [R] unorder an ordered factor

2010-04-18 Thread David Winsemius
On Apr 18, 2010, at 7:55 AM, David Winsemius wrote: On Apr 18, 2010, at 6:03 AM, David.Epstein wrote: Given an ordered factor, how does one unorder it? I tried various commands with reorder, with order=F, but they all gave me error messages. I also tried to drop the order with various 'a

Re: [R] [R-pkgs] formatR: farewell to ugly R code... Problem with too old ver. of Gtk

2010-04-18 Thread Prof Brian Ripley
On Sun, 18 Apr 2010, Brian Lunergan wrote: Yihui Xie wrote: This is an announcement of the release of an R package 'formatR', which can help us format our R code to make it more human-readable. If you have ugly (I mean unformatted) R code like this: # rotation of the word "Animation" # in a l

[R] confused with yearmon, xts and maybe zoo

2010-04-18 Thread simeon duckworth
R-listers, I am using xts with a yearmon index, but am getting some inconsistent results with the date index when i drop observations (for example by using na.omit). The issue is illustrated in the example below. If I start with a monthly zooreg series starting in 2009, yearmon converts this to

Re: [R] rosavent problem

2010-04-18 Thread Kevin Turner
The package is climatol. The data I'm working with looks like the following 10 20 30 40 50 60 70. 360 0-10 159 241386495 599 821 874153 10-20 96 481815 1223 1165 856 529..31 20-30 77 3876407403

[R] loops and if statements

2010-04-18 Thread Laura Ferrero-Miliani
Hello, I am very new to R and data analysis in general. I am trying to generate values to append to my data frame using conditional statements. I am playing with this simple example: a <- c(1:4) b <- c("meep", "foo", "meep", "foo") d <- cbind(a, b) now what I want to do is , each time there is a

Re: [R] confused with yearmon, xts and maybe zoo

2010-04-18 Thread Gabor Grothendieck
On Sun, Apr 18, 2010 at 8:25 AM, simeon duckworth wrote: > R-listers, > > I am using xts with a yearmon index, but am getting some inconsistent > results with the date index when i drop observations (for example by using > na.omit). > > The issue is illustrated in the example below.  If I start wi

[R] plotting pca of samples in different colors

2010-04-18 Thread Amit
Hi! All, I am working on a dataset 'rat' with dimension 20500x363. I have calculated pca of samples (columns). Now I am trying to plot first two principle components with specified columns in different color. I have done following so far: > dim(rat) [1] 20500 363 >#specifying columns to be colo

Re: [R] loops and if statements

2010-04-18 Thread jim holtman
You are working with a matrix, so the "$" operator is not allowed (e.g., d$c). Also in your test, you have to test against the second column (e.g., d[i, 2]) try this: > a <- c(1:4) > b <- c("meep", "foo", "meep", "foo") > d <- cbind(a, b) > > > for(i in seq(along=d[,2])) {if (d[i,2]=="meep") { p

Re: [R] loops and if statements

2010-04-18 Thread Joshua Wiley
Hey Laura, Just to add a cautionary note, in > a <- c(1:4) > b <- c("meep", "foo", "meep", "foo") > d <- cbind(a, b) d is a matrix and will only be one type of matrix.  Since you have both integer (a) and character (b) data, it has to be at the character level.  From the help for cbind: "The t

Re: [R] loops and if statements

2010-04-18 Thread Laura Ferrero-Miliani
Thank you so much all! How a simple problem can get complicated by not having enough knowledge, but hopefully I am learning Have a great Sunday! L On Sun, Apr 18, 2010 at 4:56 PM, jim holtman wrote: > You are working with a matrix, so the "$" operator is not allowed (e.g., > d$c). > > Also in

Re: [R] Calculating a Maximum for a row or column with NA's

2010-04-18 Thread steven mosher
Henrik, Thanks! I was just recommending the package to another fellow who is learning R as I am. I was going crazy. Jorge gave me a solution that works, however the data set I'm working with is huge so I'm hoping that switching to your package will give both readability and performance improveme

Re: [R] Loess Fit

2010-04-18 Thread Tal Galili
Where do I nominate this to be a fortune ? Q (Karl Ove Hufthammer ): Why not use 'predict.loess' (i.e., 'predict' on a loess object) directly? A (Greg Snow): Because that would be simple, straight forward, and make sense, and not require knowledge about less obvious functions. Although for the p

[R] Comparing data frames

2010-04-18 Thread Laura Ferrero-Miliani
Dear very helpful friends, It is Sunday, there is no air traffic in Europe, what better to do than try and learn me some more R. I have the following example: owner <- c(1:4) animal <- c("cat", "dog", "cat", "dog") char.1 <- c("fluffy", "playful", "mean", "stupid") food <- c("cat food", "left-ove

Re: [R] update of a function

2010-04-18 Thread Charles C. Berry
On Sun, 18 Apr 2010, carol white wrote: Hi, I could finally create an R package. I was suprised to notice that when I want to update a function, even if it is updated in package_name/R/function.R and after build but it is not updated when the package is loaded. I see that the tar.gz file is up

Re: [R] update of a function

2010-04-18 Thread Uwe Ligges
On 18.04.2010 13:52, carol white wrote: Hi, I could finally create an R package. I was suprised to notice that when I want to update a function, even if it is updated in package_name/R/function.R and after build but it is not updated when the package is loaded. I see that the tar.gz file is

[R] how to use Excel VBA's Shell() to call and execute R file

2010-04-18 Thread KZ
I have an R file R_test.R saved in C:\R_test folder. The R_test.R looks like this: setwd("C:/R_test") rnorm(100) write(rnorm(100),"data.txt") q(save="no", runLast = F) Next I would like use an Excel VBA/macro Shell() function to call R and execute R_test.R file. The syntax is *Shell(pathname*[

Re: [R] Problem with RGenoud

2010-04-18 Thread Uwe Ligges
Please contact the package maintainer. Uwe Ligges On 18.04.2010 11:09, yoda55 wrote: I've been using RGenoud for a while and it worked smoothly so far. However I came across a strange problem lately (for me at least...). It fails after the first individual and I get the following error messag

[R] getting column's main

2010-04-18 Thread AuriDUL
Hello. I have data of potatoes production in EU during 1998-2009 from EuroStat where the first column consists of the names of EU countries, the following columns consists of appropriate data in each year. Let's say, I investigate Lithuania. For example, I have a row containing potatoes producti

Re: [R] efficient rolling rank

2010-04-18 Thread zerdna
Gabor, Charles, Whit -- i've been walking the woods of R alone so far, and i got to say that your replies to that trivial question are eye-opening experience for me. Gentlemen, what i am trying to say in a roundabout way is that i am extremely grateful and that you guys are frigging awesome. Let

Re: [R] update of a function

2010-04-18 Thread Duncan Murdoch
On 18/04/2010 7:52 AM, carol white wrote: > Hi, > I could finally create an R package. I was suprised to notice that when I want to update a function, even if it is updated in package_name/R/function.R and after build but it is not updated when the package is loaded. I see that the tar.gz file is u

Re: [R] source(,echo=T) doesn't echo final comments

2010-04-18 Thread Duncan Murdoch
On 13/04/2010 8:50 AM, Duncan Murdoch wrote: > On 12/04/2010 7:14 PM, Kuhn, Alexandre (NIH/NIA/IRP) [V] wrote: >> Hi, >> >> source(file,echo=T) will not echo the last comment in "file" if it is the last line in the file. >> For instance, when sourcing a file containing the following lines >> >> #co

[R] sample period specification

2010-04-18 Thread Kapur, Muneesh
I am using R and I input data through excel files. I am able to read the excel files into R through xlsreadwrite package. My query: is how to tell the sample period of the data. For example, data in my file are annual and start from the year 1950 and go up to the year 2010. the R, however, reads

Re: [R] loops and if statements

2010-04-18 Thread Erich Neuwirth
I would prefer version 1. Version to creates a global variable R which you do not really need since it contains the same values as d$r. In option 2, you should probably remove the variable r itself after it has been appended to d. On 4/18/2010 5:23 PM, Laura Ferrero-Miliani wrote: > Thanks for co

Re: [R] load all data sets in a package

2010-04-18 Thread Uwe Ligges
On 18.04.2010 12:59, carol white wrote: Hi, It might be a simple question but how to load all data sets of a package? It's possible to get the list of data sets in a package with v= data(package = package_name) v[3]$results[,3] but data(get(v[3]$results[,3])) doesn't work. See ?data that t

Re: [R] plotting pca of samples in different colors

2010-04-18 Thread Uwe Ligges
On 18.04.2010 15:46, Amit wrote: Hi! All, I am working on a dataset 'rat' with dimension 20500x363. I have calculated pca of samples (columns). Now I am trying to plot first two principle components with specified columns in different color. I have done following so far: dim(rat) [1] 20500

Re: [R] sqlite and r

2010-04-18 Thread Wensui Liu
thanks so much for your reply, Gabor! actually, my intention is to rsqlite to submit sql into sqlite db from r and utilize temp tables in sqlite to store the working tables. in this way, there is not much computing burden and memory consumption in r. however, the functions natively supported in sql

[R] Table or file as STDIN to the R Script

2010-04-18 Thread Ayush Raman
Hi all, I am trying to call the R script/ R Program via my Shell Script. I need to pass a file to the R script as an argument. When I am trying to do that I am getting error and only first line of the file is being read. Can you tell me how should I do that so that it reads the entire file in a R

Re: [R] Efficiency of C Compiler in "R CMD SHLIB"

2010-04-18 Thread Uwe Ligges
On 16.04.2010 16:54, yehengxin wrote: I wonder how to further improve the optimization level of gcc. I thought "O-3" has already been the best. If you want to incerease that, don't forget to run checks in order not to get numerical inaccuracies. Uwe Ligges __

Re: [R] [R-pkgs] formatR: farewell to ugly R code... Problem with too old ver. of Gtk

2010-04-18 Thread Yihui Xie
Sorry, I was thinking about GTK+ and RGtk2, then they got mixed up in my mind to the strange animal "RGtk+"... I noticed a few users had troubles with installing RGtk2, so I removed the strict dependence on 'gWidgetsRGtk2' in the next version of 'formatR' (0.1-4). Users can specify other types of

Re: [R] Efficiency of C Compiler in "R CMD SHLIB"

2010-04-18 Thread Uwe Ligges
Please see the manuals On 16.04.2010 16:11, yehengxin wrote: Thank you very much for your kind explanation. I did find my DLL compiled using either VC++ 6.0 or Intel Compiler (almost equally fast) is significanlty faster than that compiled using gcc (55 seconds vs. 78 seconds), the default com

Re: [R] efficient rolling rank

2010-04-18 Thread Gabor Grothendieck
Looks like the rank function in R takes up most of the time. Replacing it with a sum reduces the time of the rollapply solution to one sixth of the its original time: > system.time(rollapply(z,len, function(x) rank(x)[len])) user system elapsed 17.000.27 17.27 > system.time(rollapply(z

Re: [R] plotting pca of samples in different colors

2010-04-18 Thread Daniel Malter
Amit, how to color or label your pca plot has been answered before. Look at this post: http://n4.nabble.com/PCA-analysis-td861508.html#a861509 As for your problem, it's hard to say what went wrong without having the data. You write, there is nothing plotted in the graph. Does that mean you get a g

Re: [R] Regression using R

2010-04-18 Thread Uwe Ligges
On 16.04.2010 08:24, Dieter Menne wrote: Samuel Bravo wrote: I'm working on a very large project in which we do many calculations which include many types of regression such as, Liner, Quadratic, Cubic, Exponential, Sinusoidal, and Logarithmic. Students are often looking at the wrong pl

Re: [R] Serverless databases in R

2010-04-18 Thread Barry Rowlingson
On Sun, Apr 18, 2010 at 1:00 PM, Gabor Grothendieck wrote: > SQLite and H2.  These databases are included right in the driver > packages RSQLite and RH2 so there is nothing extra to install except > you must have Java installed in the case of H2.  Also both are > supported by sqldf. Plain old .R

Re: [R] rosavent problem

2010-04-18 Thread Joshua Wiley
I am wondering if there is a pattern in the rest of your data. I made a table based on the data you provided, using 0s for degrees 80-350, and it plots fine. If your data only changed slightly from section to section (lets say by 4 or 5) it might be hard to tell that it is actually different on t

Re: [R] confused with yearmon, xts and maybe zoo

2010-04-18 Thread simeon duckworth
Hi Gabor Thats odd. I still get the same problem with the same versions of the software in your mail ... viz "as.yearmon" converts 2009(1) to "Dec-2008" and although xts is indexed at "Jan 2009" in xx, using it to create another xts object with that index reverts to "Dec-2008". grateful for any s

Re: [R] Comparing data frames

2010-04-18 Thread Tal Galili
Would: ?merge Work for you ? Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) ---

Re: [R] update of a function

2010-04-18 Thread carol white
Don't you use package.skeleton to add functions or data to an existing package? Othewise, what is the safer way? You should never have to run package.skeleton more than once per package, and it could be harmful to do so, because you are expected to make changes to the skeleton after it is cr

Re: [R] help

2010-04-18 Thread Tal Galili
Maybe: *?expand*.*grid* And: ?combn ? Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English) --

Re: [R] efficient rolling rank

2010-04-18 Thread Charles C. Berry
On Sun, 18 Apr 2010, zerdna wrote: Gabor, Charles, Whit -- i've been walking the woods of R alone so far, and i got to say that your replies to that trivial question are eye-opening experience for me. Gentlemen, what i am trying to say in a roundabout way is that i am extremely grateful and tha

Re: [R] getting column's main

2010-04-18 Thread jim holtman
Please do provide data when submitting a question so we don't have to try to recreate it from a brief description. > pot <- data.frame(count=LETTERS[1:10], '1998'=runif(10), '1999'=runif(10), + '2000'=runif(10), '2001'=runif(10), check.names=FALSE, stringsAsFactors=FALSE) > pot count

Re: [R] confused with yearmon, xts and maybe zoo

2010-04-18 Thread Gabor Grothendieck
On Sun, Apr 18, 2010 at 2:51 PM, simeon duckworth wrote: > Hi Gabor > > Thats odd. I still get the same problem with the same versions of the > software in your mail ... viz "as.yearmon" converts 2009(1) to "Dec-2008" We can`t conclude that its in as.yearmon based on the output shown. What is the

Re: [R] Interacting with dendrogram plots, locator() or click()

2010-04-18 Thread Tal Galili
Bump, I am curious to know this one as well. p.s: David. there is an interesting article on how to retrieve points from a plot (any plot). I don't think it is the best way for a dendrogam , but in case no one will offer a better solution, this one might work for you: http://www.r-bloggers.com/get

[R] Identify() "stop" shortcut? (in windows XP)

2010-04-18 Thread Tal Galili
Hi all, How do I emulate: right click (on image) -> stop That is possible when using identify (in windows)? For example, doing: x11() x = rnorm(20) y = rnorm(20) plot(x, y) # identify 5 points id = identify(x, y, n = 5, pos = TRUE) picking a few points and then pressing "esc", would just cance

Re: [R] run R script from Excel VBA

2010-04-18 Thread Erich Neuwirth
The site has a wiki and the wiki has a page How to install which should answer your question. Furthermore, please subscribe to the rcom mailing list on our side and post your questions regarding RExcel there. On 4/16/2010 8:05 PM, KZ wrote: > hmm, i could be a bit more computer savy. what do i s

Re: [R] how to change the position of xlab in truehist?

2010-04-18 Thread Hua Li
Thanks, Peter. It works! Hua --- On Fri, 4/16/10, Peter Ehlers wrote: > From: Peter Ehlers > Subject: Re: [R] how to change the position of xlab in truehist? > To: "Hua Li" > Cc: r-help@r-project.org > Date: Friday, April 16, 2010, 6:23 PM > On 2010-04-16 16:00, Hua Li wrote: > > Hi, > > > >

Re: [R] sample period specification

2010-04-18 Thread jim holtman
It sounds like your date column is a 'factor'. Please at least provide an 'str' of the data that you are using. You might want to read is in suppressing the conversion to factors (not familar with the xlsreadwrite, but read.table as an 'as.is' parameter). On Sun, Apr 18, 2010 at 12:02 PM, Kapur,

Re: [R] confused with yearmon, xts and maybe zoo

2010-04-18 Thread simeon duckworth
... forgot to post this back to the r-list. it seems that the problem is with xts rather than zoo and yearmon per se ie using yearmon to index xts gives inconsistent results. grateful for any help anyone can offer. thanks On Sun, Apr 18, 2010 at 8:15 PM, simeon duckworth wrote: > Hi gabor

Re: [R] update of a function

2010-04-18 Thread carol white
text format only. --- On Sun, 4/18/10, Duncan Murdoch wrote: > From: Duncan Murdoch > Subject: Re: [R] update of a function > To: "carol white" > Cc: r-h...@stat.math.ethz.ch, murd...@stats.uwo.ca > Date: Sunday, April 18, 2010, 12:22 PM > On Sun, Apr 18, 2010 at 2:53 PM, > carol white > wrot

Re: [R] update of a function

2010-04-18 Thread Duncan Murdoch
On Sun, Apr 18, 2010 at 3:40 PM, carol white wrote: > text format only. You just copy those into the data subdirectory, assuming you're using one of the formats listed in the "Data in packages" section of Writing R Extensions, and have named it as described there. Duncan Murdoch > > --- On Sun,

Re: [R] update of a function

2010-04-18 Thread carol white
But shouldn't they be with rda extension like other data sets in data folder? --- On Sun, 4/18/10, Duncan Murdoch wrote: > From: Duncan Murdoch > Subject: Re: [R] update of a function > To: "carol white" > Cc: r-h...@stat.math.ethz.ch, murd...@stats.uwo.ca > Date: Sunday, April 18, 2010, 12:48

Re: [R] update of a function

2010-04-18 Thread Duncan Murdoch
On Sun, Apr 18, 2010 at 4:05 PM, carol white wrote: > But shouldn't they be with rda extension like other data sets in data folder? You can use text format or rda format. Read the manual. Duncan Murdoch > > --- On Sun, 4/18/10, Duncan Murdoch wrote: > >> From: Duncan Murdoch >> Subject: Re:

Re: [R] piecewise nls?

2010-04-18 Thread Derek Ogle
Christian, Thank you for the response and hint. This is essentially what I ended up doing but I ran into several problems using nls(). I have since switched to optim() and seem to be having better luck. Again, thank you for your help. > -Original Message- > From: Christian Ritz [mail

Re: [R] glmer with non integer weights

2010-04-18 Thread Emmanuel Charpentier
Addendum to my previous answer : In that special case, the limited range of the asin(sqrt()) transformation, which is a shortcoming, turns out to be useful. The fixed-effect doefficients seem semi-reasonable (except for stageB) : > (sin(coef(lm(asin(sqrt(MH.Index))~0+stage, data=similarity^2

Re: [R] help

2010-04-18 Thread anderson nuel
Hello, thank you for your Help. I try this function 'combn' and 'expand. grid'. But, This function don't give the same results with 'combvec'. Best Regards 2010/4/18 Tal Galili > Maybe: > > *?expand*.*grid* > And: > ?combn > > > ? > > Contact > Details:--

[R] About Random Forests,ROC,Misclassified

2010-04-18 Thread kevinzy
Hi,guys. i got a few questions about the R code during my self study of this language. plz help me ^_^ for example,use the dataset Vanveer.4000 in library(MASS), 1.if i used the first 300 genes, how to find the single trees and random forests by using R? And how to see their classification perfo

Re: [R] Problem with RGenoud

2010-04-18 Thread yoda55
Thx. will do -- View this message in context: http://n4.nabble.com/Problem-with-RGenoud-tp2014722p2015133.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help P

[R] ancova

2010-04-18 Thread ATANU
can anyone help me how to do a complete analysis of covariance in RBD?pls help me... -- View this message in context: http://n4.nabble.com/ancova-tp2014984p2014984.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org m

Re: [R] Efficiency of C Compiler in "R CMD SHLIB"

2010-04-18 Thread yehengxin
Could you tell me a little more in details? -- View this message in context: http://n4.nabble.com/Efficiency-of-C-Compiler-in-R-CMD-SHLIB-tp1934429p2015006.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing l

Re: [R] update of a function

2010-04-18 Thread Duncan Murdoch
On Sun, Apr 18, 2010 at 2:53 PM, carol white wrote: > > Don't you use package.skeleton to add functions or data to an existing > package? Othewise, what is the safer way? You can use prompt() to create the outline of the documentation page. I would just copy the file containing a function's sour

[R] Fwd: Table or file as STDIN to the R Script

2010-04-18 Thread Ayush Raman
Hi, Thanks for the advice but now I am getting an error which states that the R file/script cannot be opened. Also, my shell and R script is in an executable mode. My code is as follows: #!/bin/bash DataFile="input.txt" RProgram="Debug5.R" outputfile="output_perl_${I}${I}" time R --slave -f ${

Re: [R] Serverless databases in R

2010-04-18 Thread kMan
It was my understanding that .Rdata files were not very portable, and do not natively handle queries. Otherwise we'd all just use .RData files instead of farming the work out to SQL drivers & external libraries, and colleagues who use, e.g. SAS or SPSS would also have no trouble with them. Sincere

[R] var.test

2010-04-18 Thread anon anon
Hello, I'm using var.test to do a simple F-test for equality of variances. I think I'm missing something small here: > m<-rnorm(10,sd=1) > n<-rnorm(5,sd=1) > var.test(m,n) F test to compare two variances data: m and n F = 13.7438, num df = 9, denom df = 4, p-value = 0.02256 alternative hyp

[R] CRAN (and crantastic) updates this week

2010-04-18 Thread Crantastic
CRAN (and crantastic) updates this week New packages Updated packages BSDA (1.0) New reviews --- * ggplot2, by elaliberte http://crantastic.org/reviews/69 * FD, by elaliberte http://crantastic.org/reviews/68 This email provided as a service for t

Re: [R] sample period specification

2010-04-18 Thread Dennis Murphy
Hi: Here's a simple, manufactured example: x <- rnorm(61) x <- ts(x, start = 1950, end = 2010) plot(x) Is that what you were looking for? HTH, Dennis On Sun, Apr 18, 2010 at 9:02 AM, Kapur, Muneesh wrote: > I am using R and I input data through excel files. I am able to read the > excel file

Re: [R] About Random Forests,ROC,Misclassified

2010-04-18 Thread Max Kuhn
This might help: http://www.jstatsoft.org/v28/i05/paper Max On Sun, Apr 18, 2010 at 1:24 PM, kevinzy wrote: > > Hi,guys. i got a few questions about the R code during my self study of this > language. plz help me ^_^ > > for example,use the dataset Vanveer.4000 in library(MASS), > > 1.if i u

[R] selecting rows based on number that occurs after letter

2010-04-18 Thread Daisy Englert Duursma
Hello, I am trying to cycle through a csv and make some summary statistics. I need to select rows based on the number in the row name that comes after the letter 'y'. For example,   BA1y1 would equal 1,  C3A2r3y1 would equal 1 and  MA3r3y1r3 would equal 1. I currently have my code  cycling throug

Re: [R] selecting rows based on number that occurs after letter

2010-04-18 Thread jim holtman
Use regular expressions: > x <- c( "BA1y1", "C3A2r3y1", "MA3r3y1r3", "MA23r34y123z99") > # extact the number after the 'y' > num <- sub(".*y(\\d +).*", "\\1 ", x) > > num [1] "1" "1" "1" "123" > On Sun, Apr 18, 2010 at 8:41 PM, Daisy Englert Duursma < daisy.duur...@gmail.com> wrote: > Hel

Re: [R] Fwd: Table or file as STDIN to the R Script

2010-04-18 Thread jim holtman
If it is the script file, are you in the right directory. The error indicates the system can not locate your program. Try typing it in by hand and see what you get. You are probably not positioned where you think you are. On Sun, Apr 18, 2010 at 6:21 PM, Ayush Raman wrote: > Hi, > > Thanks for

Re: [R] help

2010-04-18 Thread jim holtman
You can always write a script to do what you want. This will get you the results you want. > a1 <- rbind(1:3, 4:6) > a2 <- rbind(7:8, 9:10) > result <- NULL # initialize the output > for (i in seq(ncol(a2))){ + for (j in seq(ncol(a1))){ + result <- cbind(result, c(a1[, j], a2[, i]))

[R] Exporting PDF

2010-04-18 Thread chrisli1223
Hi everyone, I have written a script which exports my graphs as a PDF file using the function pdf(). For instance, I run the script and it exports a PDF called "version 1". Then, I have got a new dataset and want to run the script again. What it usually does is overwriting "version 1". But I wa

[R] xtabs() of proportions, and naming a dimension (not a row)

2010-04-18 Thread Jeff Brown
Hi, xtabs() creates a table of counts. I want a table of proportions -- that is, I want to divide every vector (along a particular dimension) by its sum. The tiny example below does that. The call to xtabs() creates a matrix "A" with dimensions ("x1","x2","y"). I transform "A" using aperm() a

Re: [R] Exporting PDF

2010-04-18 Thread jim holtman
a little searching would have found: ?file.exists On Sun, Apr 18, 2010 at 7:54 PM, chrisli1223 wrote: > > Hi everyone, > > I have written a script which exports my graphs as a PDF file using the > function pdf(). > > For instance, I run the script and it exports a PDF called "version 1". > Then,

Re: [R] Fwd: Table or file as STDIN to the R Script

2010-04-18 Thread Ayush Raman
Yeah, it is in the right directory and I am sure about it. Ayush On Sun, Apr 18, 2010 at 8:58 PM, jim holtman wrote: > If it is the script file, are you in the right directory. The error > indicates the system can not locate your program. Try typing it in by hand > and see what you get. You a

Re: [R] xtabs() of proportions, and naming a dimension (not a row)

2010-04-18 Thread Dennis Murphy
Hi: Using the result of xtabs, use prop.table(): Example: df <- data.frame ( x1 = ceiling( runif( 20 ) * 3 ), x2 = ceiling( runif( 20 ) * 2 ), y = round( runif( 20 ) ) ) # Get different numbers since your random seed was not specified... (w <- with(df, xtabs(~ y + x1 + x2)))

Re: [R] Exporting PDF

2010-04-18 Thread chrisli1223
Problem solved. I combined file.exists and while loop to create version number. Thank you very much for your help. -- View this message in context: http://n4.nabble.com/Exporting-PDF-tp2015263p2015366.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] xtabs() of proportions, and naming a dimension (not a row)

2010-04-18 Thread David Winsemius
On Apr 18, 2010, at 7:50 PM, Jeff Brown wrote: Hi, xtabs() creates a table of counts. I want a table of proportions -- that is, I want to divide every vector (along a particular dimension) by its sum. ?prop.table The tiny example below does that. The call to xtabs() creates a mat

Re: [R] rosavent problem

2010-04-18 Thread Kevin Turner
As it turns out, there was something wrong with the way that the column and row names were set up when the wind frequency table was made. As I mentioned, the same data (all the data) was plotted 6 times around the circle (rose plot). The way I've resolved this is by writing the data to a .csv fil

[R] Error message GSA package

2010-04-18 Thread David Martino
Dear list, I have gene expression measurements obtained by PCR on 11 genes, tabulated as a data matrix. I'm attempting to use GSA package to distinguish any significant changes in these genes as a pathway. My response variable is binary, 0=no disease, 1=disease. I have read the PCR data in

[R] S4-based package failure: setGeneric example#1

2010-04-18 Thread Daniel Murphy
I am a newbie package builder who successfully built a "Hello world" package but am now having trouble building a package with S4 functionality. I thought I would start by building a package consisting of just the first example under the setGeneric help page in a "fresh" 2.10.0 (windows) console (m

Re: [R] Serverless databases in R

2010-04-18 Thread Barry Rowlingson
On Sun, Apr 18, 2010 at 11:30 PM, kMan wrote: > It was my understanding that .Rdata files were not very portable, and do not > natively handle queries. Otherwise we'd all just use .RData files instead of > farming the work out to SQL drivers & external libraries, and colleagues who > use, e.g. SAS

Re: [R] Scanning only specific columns into R from a VERY large file

2010-04-18 Thread Rubén Roa
-Mensaje original- De: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] En nombre de Josh B Enviado el: sábado, 17 de abril de 2010 0:12 Para: R Help Asunto: [R] Scanning only specific columns into R from a VERY large file Hi, I turn to you, the R Sages, once again for