Re: [R] How to pass different arguments to a function within lapply()?

2011-08-09 Thread Richard Ma
Hi David, Thank you very much. Problem solved. sapply() and lapply() are so powerful that even I have read their documents several times, still lots of tricky stuff to learn and try. Thank you again! Richard David Winsemius wrote: sapply(c(hsp, dal), function(x) locpoly(x=ts,

Re: [R] Sweave : allowing errors in R code?

2011-08-09 Thread Remko Duursma
Hi Remko, How about ?try Hope it helps, Tsjerk Not quite, because then the code chunk in the final doc. will have this try() around it as well - not too pretty for a user manual. remko On Aug 9, 2011 5:30 AM, Remko Duursma remkoduur...@gmail.com wrote: Dear R-helpers, sorry if

[R] Matlab to R

2011-08-09 Thread Annabel
I am trying to convert a matlab code to R. Most of the conversion statements are simple, but problem is with return. Since it's a recursive function it's a bit complicated. Anyway in matlab we can have return statment like [price, notional] = functionname() and also for the same function...

[R] Transparent color ramp problem

2011-08-09 Thread James Sturman
Hello, I can't seem to add transparency to any color ramp I create using colorRampPalette(). Can someone tell me if it is possible to create transparent colour ramps? I am attempting to map shaded relief under elevation data. I know I can use the terrain.colors() with the alpha option, but

Re: [R] Sweave : allowing errors in R code?

2011-08-09 Thread Duncan Mackay
Hi Remko After thinking about try and tryCatch the problem was catching the error what about ?captureOutput Regards Duncan At 14:28 09/08/2011, you wrote: Hi Remko, How about ?try Hope it helps, Tsjerk Not quite, because then the code chunk in the final doc. will have this try()

Re: [R] on do.call function

2011-08-09 Thread peter dalgaard
On Aug 9, 2011, at 02:38 , Kathie wrote: Thanks a lot all of you Yes, you're right. However, as i know, do.call calls its function once, but apply(or sapply etc) not. So, I think do.call is faster than apply. That's why i am trying to use do.call. Am I right?? You're not getting the

Re: [R] Sweave : allowing errors in R code?

2011-08-09 Thread Tsjerk Wassenaar
Hi Remko, You can modify the behaviour upon errors by setting the error option. Check ?option and ?stop Cheers, Tsjerk On Aug 9, 2011 8:35 AM, Duncan Mackay mac...@northnet.com.au wrote: Hi Remko After thinking about try and tryCatch the problem was catching the error what about

Re: [R] Matlab to R

2011-08-09 Thread Paul Hiemstra
On 08/09/2011 04:39 AM, Annabel wrote: I am trying to convert a matlab code to R. Most of the conversion statements are simple, but problem is with return. Since it's a recursive function it's a bit complicated. Anyway in matlab we can have return statment like [price, notional] =

Re: [R] on do.call function

2011-08-09 Thread Kathie
I understood that the function has to be vectorized. I was just wondering which one is faster. Thanks -- View this message in context: http://r.789695.n4.nabble.com/on-do-call-function-tp3727262p3729234.html Sent from the R help mailing list archive at Nabble.com.

Re: [R] Sweave : allowing errors in R code?

2011-08-09 Thread Remko Duursma
You can modify the behaviour upon errors by setting the error option. Check ?option and ?stop I looked at the 'error' settings in ?options, but I am not sure how that would be helpful, since I am trying to avoid Sweave from halting after an error occurs. I still want the error to be printed,

[R] Odp: nls, how to determine function?

2011-08-09 Thread Petr PIKAL
Hi Hi R help, I am trying to determine how nls() generates a function based on the self-starting SSlogis and what the formula for the function would be. I've scoured the help site, and other literature to try and figure this out but I still am unsure if I am correct in what I am coming up

Re: [R] heatmap is producing unwanted horizontal and vertical lines?

2011-08-09 Thread Uwe Ligges
On 09.08.2011 02:32, Michael Sumner wrote: Is it this? https://stat.ethz.ch/pipermail/r-devel/2011-July/061540.html Try a recent version of R 2.13.1 patched Where it has been fixed by Duncan Murdoch. Uwe On Tue, Aug 9, 2011 at 1:53 AM, Colin Fordcol_f...@yahoo.com wrote: Hi Pete, I

Re: [R] Sweave : allowing errors in R code?

2011-08-09 Thread Tsjerk Wassenaar
Hi Remko, The default behaviour of R upon encountering an error is to stop execution of whatever is happening. To circumvent that, you have to catch the error, using try, or you have to change the reaction of R to errors, using 'options'. The help page for ?stop gives an explicit example of the

Re: [R] Sweave : allowing errors in R code?

2011-08-09 Thread Duncan Murdoch
On 11-08-08 9:48 PM, Remko Duursma wrote: Dear R-helpers, sorry if this is obvious, but I can't find this in the documentation. I am using Sweave, and have some code that does not actually work - but I want to include it anyway, including the error message that R produces. But on running

[R] rgl how to plot a cylinder like arrow3d?

2011-08-09 Thread René Mayer
Dear List, I'm trying to draw vector in XYZ with rgl under use of a cylinder3d. Therefore I scale and rotate a basis-cylinder). However, somehow the rotation is wrong as verified by overplotting arrow3d(). Where is my mistake? library(heplots) library(rgl) # ... 2 vectors

Re: [R] on do.call function

2011-08-09 Thread peter dalgaard
On Aug 9, 2011, at 09:44 , Kathie wrote: I understood that the function has to be vectorized. I was just wondering which one is faster. do.call is as fast as just calling the function. If you need to Vectorize() the function first, then that in itself inserts a mapply() call, so you're

Re: [R] Sweave : allowing errors in R code?

2011-08-09 Thread ONKELINX, Thierry
Dear Remko, Here is a working example on what Duncan suggested. Best regards, Thierry echo = TRUE, eval = TRUE= TheObject - Something ls() rm(TheObject) @ %outputs the R code but does not execute it. So no error echo=TRUE, eval=FALSE= TheObject @ % executes the code but displays only the

Re: [R] rgl how to plot a cylinder like arrow3d?

2011-08-09 Thread Duncan Murdoch
On 11-08-09 5:22 AM, René Mayer wrote: Dear List, I'm trying to draw vector in XYZ with rgl under use of a cylinder3d. Therefore I scale and rotate a basis-cylinder). However, somehow the rotation is wrong as verified by overplotting arrow3d(). Where is my mistake? I would guess it is in

Re: [R] heatmap is producing unwanted horizontal and vertical lines?

2011-08-09 Thread Colin Ford
Yes that sounds very much like it. I'm using R 13.1 on Windows 7 32 bit. I did do a search but didn't find anything - probably not using the correct search terms. Glad its not just me.  Thank you, Col. From: Michael Sumner mdsum...@gmail.com Cc: Peter Morgan

Re: [R] Sweave : allowing errors in R code?

2011-08-09 Thread Remko Duursma
Thanks Duncan. I ended up resorting to lt;eval=FALSEgt;, and just adding the error message 'manually', which is what the Schunk approach does as well. Unfortunately, the highlight package does not work with that Schunk - because it replace the Sweave driver, but anyway, this is close enough.

[R] assign names to vectors in loop

2011-08-09 Thread Henning Jensen
Dear List, I like to assign names to vectors in a loop. Here is a short example: DMUs - as.data.frame(matrix(c(b,c,d,a,e,h,i,f,g,j,k,l),ncol =7, nrow=10)) colnames(DMUs) - v_DMUs - c(a,b,c,d,e,f,g) for (i in v_DMUs) assign(paste(eff_val,i,sep=.),abs(rnorm(10))) Now I like to

Re: [R] Fwd: Need help with xyplot

2011-08-09 Thread Jim Lemon
On 08/09/2011 03:10 AM, az...@illinois.edu wrote: Original message Date: Wed, 3 Aug 2011 16:06:33 -0500 (CDT) From:az...@illinois.edu Subject: Need help with xyplot To: r-help@r-project.org Consider I have the following data: AgeRangeAgeOfPerson PersonNo

[R] Odp: assign names to vectors in loop

2011-08-09 Thread Petr PIKAL
Hi Dear List, I like to assign names to vectors in a loop. Here is a short example: DMUs - as.data.frame(matrix(c(b,c,d,a,e,h,i,f,g,j,k,l),ncol =7, nrow=10)) colnames(DMUs) - v_DMUs - c(a,b,c,d,e,f,g) for (i in v_DMUs) assign(paste(eff_val,i,sep=.),abs(rnorm(10))) Now I like to

Re: [R] rgl how to plot a cylinder like arrow3d?

2011-08-09 Thread René Mayer
Thanks Duncan! yes! this works; I paste the code in case someone wants to draw 3d-vectors with cylinders and cones. René vector3D=function(start=c(0,0,0), end, mycol='green', cone.length=0.1, ... ){ # ... cylinder as basis-vector c=cylinder3d(rbind( c(start), # start

[R] lavaan: how to analyse residuals of a latent variable

2011-08-09 Thread Hans Ekbrand
Hi r-help, I use lavaan:sem() for structural equation modelling with latent variables. Below is a reproducible example (the code requires a working installation of lavaan) where the latent variable criminality is in focus. Besides criminality in general, I am specifically interested one of the

Re: [R] lavaan: how to analyse residuals of a latent variable

2011-08-09 Thread yrosseel
My question is: how can I analyse the part of the variation in fire.setting that is not included in the latent variable criminality? Ideally I would want a new variable that captures just this. Then I could model regressions with this variable as the dependent variable. You can add a

[R] need your consult

2011-08-09 Thread Mehrshad Koleini
Dear Sir/Madam Hi. I am a general paediatrician, and I have read *some* chapters of the following books(1-3). I think SPSS lacks some features that may be important in data analysis (for example: interval of correlation coefficient in bivariate normal distribution, PRESS, and MSPR in

[R] importing spss-files [ was: Re: need your consult]

2011-08-09 Thread Hans Ekbrand
On Tue, Aug 09, 2011 at 02:28:22AM -0700, Mehrshad Koleini wrote: Dear Sir/Madam Hi. I am a general paediatrician, and I have read *some* chapters of the following books(1-3). I think SPSS lacks some features that may be important in data analysis (for example: interval of correlation

Re: [R] merging lists within lists via time stamp

2011-08-09 Thread tomtomme
Wow that worked! Thank you very much. Next time I will try this number generator thing. Thanks for the hint. I had no idea, that this might have caused the silence. Thomas. -- View this message in context:

Re: [R] How to pass different arguments to a function within lapply()?

2011-08-09 Thread David Winsemius
On Aug 9, 2011, at 2:10 AM, Richard Ma wrote: Hi David, Thank you very much. Problem solved. sapply() and lapply() are so powerful that even I have read their documents several times, still lots of tricky stuff to learn and try. The basic difference between my approach and yours was

[R] Correlation Matrix - p value?

2011-08-09 Thread ScottM
Hello all, I've run a Spearman's Rank test to discern relationships between landscape characteristics and a specific aspect of river behaviour. I've executed a correlation matrix between the one dependent variable and all of the predictors, which gives me a nice output of Spearman's Rho values.

Re: [R] Correlation Matrix - p value?

2011-08-09 Thread Jorge Ivan Velez
?cor.test cor.test(x, y, method = spearman)$p.value HTH, Jorge On Tue, Aug 9, 2011 at 8:44 AM, ScottM wrote: Hello all, I've run a Spearman's Rank test to discern relationships between landscape characteristics and a specific aspect of river behaviour. I've executed a correlation matrix

[R] reflecting a PCA biplot

2011-08-09 Thread Andrew Halford
Hi Listers, I am trying to reflect a PCA biplot in the x-axis (i.e. PC1) but am not having much success. In theory I believe all I need to do is multiply the site and species scores for the PC1 by -1, which would effectively flip the biplot. I am creating a blank plot using the plot command and

Re: [R] Correlation Matrix - p value?

2011-08-09 Thread ScottM
Cheers Jorge, I've tried this, but keep getting error messages, relating to either: Error: unexpected '$' in $ or Error in cor(data, method = spearman)$p.value : $ operator is invalid for atomic vectors Very annoying! S Scott McGrane MA (Hons), MRes SAGES Theme 1 PhD Student Northern

Re: [R] Correlation Matrix - p value?

2011-08-09 Thread R. Michael Weylandt michael.weyla...@gmail.com
Just pointing out that Jorge wrote cor.test not cor. Don't know if you saw that but it should help. Michael Weylandt On Aug 9, 2011, at 8:58 AM, ScottM scott.mcgr...@abdn.ac.uk wrote: Cheers Jorge, I've tried this, but keep getting error messages, relating to either: Error:

Re: [R] lavaan: how to analyse residuals of a latent variable

2011-08-09 Thread Hans Ekbrand
On Tue, Aug 09, 2011 at 01:49:13PM +0200, yrosseel wrote: My question is: how can I analyse the part of the variation in fire.setting that is not included in the latent variable criminality? Ideally I would want a new variable that captures just this. Then I could model regressions with this

[R] How to run R with parameters of the script to be executed?

2011-08-09 Thread Eduardo Alexandre
Hello I need to use R together with a system I´m developing. I need to call the U.S. by passing a command line script to run. The result of this script (data or graph) should be written to a text file or image. This call will be made through a system made ​​in PHP. It has to do it? I´m not

Re: [R] Sweave : allowing errors in R code?

2011-08-09 Thread Remko Duursma
Works like a charm, thanks! remko -- View this message in context: http://r.789695.n4.nabble.com/Sweave-allowing-errors-in-R-code-tp3728790p3729802.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

[R] Denormalize data

2011-08-09 Thread RobinLovelace
Hello R users, My problem is that the data I've got is in the minimum number of columns with each ward (geographic area) appearing multiple times. The first 30 terms look like this HHum02 CASW Btype Yr CO2Group NumVeh 170597 00CCFA CARS 2002C 2 170598 00CCFA CARS

[R] how to display Greek characters in lattice plot (in the labels inside the panels)

2011-08-09 Thread Ranjan Maitra
Dear friends, I would like to know how to use Greek (and plotmath characters) in lattice plots. Here is an example which works: but I would like to replace s_v with expression(hat(sigma))_v. Finally, is there a way to get the BIC, ICL, etc in the same panel such that we can have this text on

[R] how to display Greek characters in lattice plot (in the labels inside the panels)

2011-08-09 Thread Ranjan Maitra
Sorry. I forgot to paste 3 lines over: here is the corrected reproducible code. Apologies again, and many thanks, Ranjan Dear friends, I would like to know how to use Greek (and plotmath characters) in lattice plots. Here is an example which works: but I would like to replace s_v with

Re: [R] lavaan: how to analyse residuals of a latent variable

2011-08-09 Thread yrosseel
Can I include criminality among those and thereby get the common part of criminality and fire.setting out of the way? No. You already regress fire.setting on criminality since it is an indicator in the measurement model of criminality. In other words, the 'criminality' part is already

Re: [R] Correlation Matrix - p value?

2011-08-09 Thread Dennis Murphy
Works for me: x - rnorm(10) y - rnorm(10) cor.test(x, y, method = 'spearman')$p.value [1] 0.166058 What are the classes of your inputs? A reproducible example would be helpful. From the help page of cor.test(): x, y numeric vectors of data values. x and y must have the same length. Do

Re: [R] Denormalize data

2011-08-09 Thread David Winsemius
On Aug 9, 2011, at 8:36 AM, RobinLovelace wrote: Hello R users, My problem is that the data I've got is in the minimum number of columns with each ward (geographic area) appearing multiple times. The first 30 terms look like this HHum02 CASW Btype Yr CO2Group NumVeh 170597

[R] monthly boxplot

2011-08-09 Thread Fernando Andreacci
I'm trying to make a monthly boxplot using this: boxplot(varmeasure ~ vardates) vardates = [1] 10/1/2010 10/1/2010 10/1/2010 10/1/2010 10/1/2010 10/1/2010 10/1/2010 [8] 10/1/2010 10/1/2010 11/1/2010 11/1/2010 11/1/2010 11/1/2010 11/1/2010 varmeasure = [1] 0.0 26.0 0.2 -0.2 -1.2

Re: [R] how to display Greek characters in lattice plot (in the labels inside the panels)

2011-08-09 Thread David Winsemius
On Aug 9, 2011, at 9:29 AM, Ranjan Maitra wrote: Sorry. I forgot to paste 3 lines over: here is the corrected reproducible code. Apologies again, and many thanks, Ranjan Dear friends, I would like to know how to use Greek (and plotmath characters) in lattice plots. Here is an example which

Re: [R] aggregate.zoo on bivariate data

2011-08-09 Thread Johannes Egner
On Mon, Aug 8, 2011 at 6:44 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: On Mon, Aug 8, 2011 at 9:16 AM, Johannes Egner johannes.eg...@gmail.com wrote: Hi, I'm removing non-unique time indices in a zoo time series by means of aggregate. The time series is bivariate, and the row to

Re: [R] monthly boxplot

2011-08-09 Thread David Winsemius
On Aug 9, 2011, at 9:46 AM, Fernando Andreacci wrote: I'm trying to make a monthly boxplot using this: boxplot(varmeasure ~ vardates) vardates = [1] 10/1/2010 10/1/2010 10/1/2010 10/1/2010 10/1/2010 10/1/2010 10/1/2010 [8] 10/1/2010 10/1/2010 11/1/2010 11/1/2010 11/1/2010 11/1/2010

Re: [R] aggregate.zoo on bivariate data

2011-08-09 Thread Gabor Grothendieck
On Tue, Aug 9, 2011 at 9:57 AM, Johannes Egner johannes.eg...@gmail.com wrote: On Mon, Aug 8, 2011 at 6:44 PM, Gabor Grothendieck ggrothendi...@gmail.com wrote: On Mon, Aug 8, 2011 at 9:16 AM, Johannes Egner johannes.eg...@gmail.com wrote: Hi, I'm removing non-unique time indices in a zoo

Re: [R] monthly boxplot

2011-08-09 Thread Fernando Andreacci
It worked, thanks. Is there a way to put a trend line through the boxplots? On Tue, Aug 9, 2011 at 10:58 AM, David Winsemius dwinsem...@comcast.netwrote: On Aug 9, 2011, at 9:46 AM, Fernando Andreacci wrote: I'm trying to make a monthly boxplot using this: boxplot(varmeasure ~ vardates)

Re: [R] Finite Differences in R

2011-08-09 Thread Jim Silverton
I have two column of points y and x. I want to use finite differences to find the largest gradient to the 'smoothed' fitted curve for x and y. Can R do this? -- Thanks, Jim. [[alternative HTML version deleted]] __ R-help@r-project.org mailing

Re: [R] monthly boxplot

2011-08-09 Thread Carlos Ortega
Hi, Yes. Use lines() Regards, Carlos Ortega www.qualityexcellence.es On Tue, Aug 9, 2011 at 4:17 PM, Fernando Andreacci fandrea...@gmail.comwrote: It worked, thanks. Is there a way to put a trend line through the boxplots? On Tue, Aug 9, 2011 at 10:58 AM, David Winsemius

Re: [R] randomForest partial dependence plot variable names

2011-08-09 Thread Liaw, Andy
See if the following is close to what you're looking for. If not, please give more detail on what you want to do. data(airquality) airquality - na.omit(airquality) set.seed(131) ozone.rf - randomForest(Ozone ~ ., airquality, importance=TRUE) imp - importance(ozone.rf) # get the importance

Re: [R] monthly boxplot

2011-08-09 Thread David Winsemius
On Aug 9, 2011, at 10:17 AM, Fernando Andreacci wrote: It worked, thanks. Is there a way to put a trend line through the boxplots? You have not shown us how you set the data up or made the boxplots. A trend line through boxplots seems be a bit ambiguous, since the x- variable needs to be

Re: [R] Denormalize data

2011-08-09 Thread RobinLovelace
Hi David Winsemius, thanks for the input but your reply seems to omit any answer! Anyway, I've figured this out for myself, with some help from the reshape package. Solution: mdata - melt(Humn02) Denormal - cast(mdata, CASW~CO2Group~variable, sum) Check out the power of the reshape package

Re: [R] Denormalize data

2011-08-09 Thread RobinLovelace
Hi David Winsemius, thanks a lot for the answer that I finally spotted amongst my verbose message. Many thanks, and I see that it does work now: I had to change the variable names of the subset HHum02 because all the rows from main dataset were still there invisibly (after I used subset to remove

Re: [R] reflecting a PCA biplot

2011-08-09 Thread Allan Engelhardt (CYBAEA)
Something like opar- par(mfcol = c(1, 2)) z- prcomp(USArrests, scale = TRUE) biplot(z, cex = 0.5) z$x[,1]- -z$x[,1] z$rotation[,1]- -z$rotation[,1] biplot(z, cex = 0.5, xlab = -PC1) par(opar) perhaps? Allan On 09/08/11 13:57, Andrew Halford wrote: Hi Listers, I am trying to reflect a PCA

Re: [R] S4 classes, some help with the basics

2011-08-09 Thread Mike Williamson
Thanks Duncan, Martin, You both provided exactly what I needed! Regards, Mike --- XKCD http://www.xkcd.com On Mon, Aug 8, 2011 at 5:21 PM, Duncan Murdoch murdoch.dun...@gmail.comwrote: On 08/08/2011 8:04 PM, Mike Williamson wrote: Hi

Re: [R] Denormalize data

2011-08-09 Thread Jeff Newmiller
Your assertion that xtabs did not work on subsetted data seems suspect. Please provide an example so we can show you what you did wrong or R can be fixed. I suspect that you need to learn more about how and when to use factors, since removing all instances of a particular level doesn't

Re: [R] Sample size AUC for ROC curves

2011-08-09 Thread Greg Snow
If you know how to generate random data that represents your null hypothesis (chance, auc=0.5) and how to do your analysis, then you can do this by simulation, simulate a dataset at a given sample size, analyze it, repeat a bunch of times and see if that sample size is about the right size. If

Re: [R] monthly boxplot

2011-08-09 Thread Fernando Andreacci
Hi, I got what I want using lines(varmeasure ~ vardates) but, as I'm using as.Date(vardates) in my boxplot code boxplot(varmeasure ~ as.Date(vardate)) I want to change how vardate is displayed I used strftime(as.Date(vardate), format=%m/%Y) and it worked well, However it mixed the inital and

Re: [R] ggplot2 setting colors for individual groups.

2011-08-09 Thread Dennis Murphy
Hi: You could always try cut() to discretize a continuous variable and then apply your vector of set colors to the discretized variable in ggplot2's scale_*_manual(). HTH, Dennis On Tue, Aug 9, 2011 at 9:26 AM, Adrienne Wootten amwoo...@ncsu.edu wrote: All, I'm working with ggplot2 to

[R] Tinn-R

2011-08-09 Thread devon woodcomb
Hi, How do I stop Tinn-R from starting automatically when I start R or R studio, without uninstalling it. I just started using R studio and might want to switch back to Tinn-R so I don't want to uninstall it. Thanks, D [[alternative HTML version deleted]]

Re: [R] Need help with xyplot - thanks

2011-08-09 Thread aziz4
Lolz, My bad in assigning 13, 14 to age ranges 15-18. I have corrected that to 16 and 17. Thanks for pointing out. Your R code works great. I shall try it with my real data. I shall get back with more questions after I give a shot to understand your code myself. Best, Fayez Original

[R] [Solved] Re: lavaan: how to analyse residuals of a latent variable

2011-08-09 Thread Hans Ekbrand
On Tue, Aug 09, 2011 at 03:30:17PM +0200, yrosseel wrote: Can I include criminality among those and thereby get the common part of criminality and fire.setting out of the way? No. You already regress fire.setting on criminality since it is an indicator in the measurement model of

Re: [R] Fwd: Need help with xyplot - thanks

2011-08-09 Thread aziz4
Very interesting. I can track every person along the lines too. It would be useful to have a grouping on Age-range as my actual data has above six thousand nodes and thus the spaghetti can get really messy. I shall get back with more questions after some trials with your code. Best, Fayez

Re: [R] convert a splus randomforest object to R

2011-08-09 Thread Liaw, Andy
You really need to follow the suggestions in the posting guide to get the best help from this list. Which versions of randomForest are you using in S-PLUS and R? Which version of R are you using? When you restore the object into R, what does str(object) say? Have you also tried

Re: [R] monthly boxplot

2011-08-09 Thread Brian Diggs
On 8/9/2011 10:32 AM, Fernando Andreacci wrote: Hi, I got what I want using lines(varmeasure ~ vardates) but, as I'm using as.Date(vardates) in my boxplot code boxplot(varmeasure ~ as.Date(vardate)) I want to change how vardate is displayed I used strftime(as.Date(vardate), format=%m/%Y)

Re: [R] Tinn-R

2011-08-09 Thread Eik Vettorazzi
Hi Devon, check your rprofile.site file and comment the following lines options(IDE='C:/Tinn-R/bin/Tinn-R.exe') trStartIDE() hth. Am 09.08.2011 19:51, schrieb devon woodcomb: Hi, How do I stop Tinn-R from starting automatically when I start R or R studio, without uninstalling it. I

Re: [R] nls, how to determine function?

2011-08-09 Thread Katrina Bennett
Hi Petr, thanks for your help on this. I will most definitely get this book as it appears to be a good one. I am happy with how nls() and the self starting function appears to be fitting the data set. What I am wondering about is how to write out this function outside of R. For example, if I sat

[R] simple plot question

2011-08-09 Thread Maxim
Hi, please excuse the most likely very trivial question, but I'm having no idea where to find related information: I try to recapitulate very simple plotting behavior of Excel within R but have no clue how to get where I want. I have tab delimited data like cell treatment value line a treat1 4

[R] embedFonts() does not embed fonts?

2011-08-09 Thread Sverre Stausland
Dear helpers, I'm trying out the embedFonts() to embed fonts into my pdf files. However, when I inspect the new pdf with a program designed to look for embedded fonts, I see that the fonts have in fact not been embedded. Below are my calls. R version 2.13.1 (2011-07-08) Copyright (C) 2011 The R

Re: [R] Sweave: Changing the background color, adding a border

2011-08-09 Thread cgenolin
I am not familiar with wiki (wich one?) but here is the code without line-break --- 8 -- %\usepackage{Sweave} \RequirePackage[T1]{fontenc} \RequirePackage{graphicx,ae,fancyvrb} \IfFileExists{upquote.sty}{\RequirePackage{upquote}}{} \setkeys{Gin}{width=0.8\textwidth}

Re: [R] convert a splus randomforest object to R

2011-08-09 Thread Zhiming Ni
In Splus the randomForest package version is 4.5-18; in R randomForest version is 4.6-2. I'm using R version 2.13.1. After restore the randomForest object into R using data.restore(), below are str(cost.rf) outputs, List of 17 $ call : language randomForest(x =

Re: [R] monthly boxplot

2011-08-09 Thread Fernando Andreacci
It worked, thanks. On Tue, Aug 9, 2011 at 4:15 PM, Brian Diggs dig...@ohsu.edu wrote: On 8/9/2011 10:32 AM, Fernando Andreacci wrote: Hi, I got what I want using lines(varmeasure ~ vardates) but, as I'm using as.Date(vardates) in my boxplot code boxplot(varmeasure ~ as.Date(vardate))

Re: [R] embedFonts() does not embed fonts?

2011-08-09 Thread Sverre Stausland
Some of you might see that there's a tiny mistake in the embedFonts() call. fontpaths = C/Windows/Fonts should of course be fontpaths = C:/Windows/Fonts. I fixed this, but it didn't change the fact that the new .pdf does not have its fonts embedded. Sverre On Tue, Aug 9, 2011 at 4:48 PM, Sverre

Re: [R] convert a splus randomforest object to R

2011-08-09 Thread William Dunlap
For a variety of reasons, there is no easy way to transfer many kinds of complicated objects (and some simple ones) from S+ to R (or vice versa). If you want to compare predictions made by randomForest in S+ and R, I would recommend transferring the data.frames used to create the model and to

Re: [R] Missing R.h

2011-08-09 Thread wxffxw
I have the same problem. Either using install.packages() in R or using R CMD INSTALL. See below - /usr/local/cuda/bin/nvcc -gencode arch=compute_10,code=sm_10 -gencode arch=compute_11,code=sm_11 -gencode arch=compute_12,code=sm_12 -gencode

Re: [R] Revolutions Blog: July Roundup

2011-08-09 Thread Frank Harrell
David, as always this is a terrific roundup. I note in passing that the big data logistic function rxLogit used on the 1B observation dataset (impressive run time!) inappropriately used the t distribution for testing the coefficients in the logistic model [at least if the notation used is any

Re: [R] simple plot question

2011-08-09 Thread R. Michael Weylandt
Hi Maxim, I notice no one has replied to you (on list at least) so I'll take a stab at answering your question and giving some productive advice. I believe the axis command will do what you want with a little tweaking: It certainly lines things up for me. x -

Re: [R] Revolutions Blog: July Roundup

2011-08-09 Thread David Smith
Thanks, Frank! I'm actually not sure what distribution it's using there, but I'll pass this along to Sue Ranney who created the video. Kind regards, # David On Tue, Aug 9, 2011 at 4:25 PM, Frank Harrell f.harr...@vanderbilt.edu wrote: David, as always this is a terrific roundup.  I note in

[R] How to get the date of specific value within a zoo object?

2011-08-09 Thread Richard Ma
Hi all, I have a zoo time series object, see below code: --- # This is a pasteable example library(zoo) x - c(1, 2, 3, 4, 5) dt - c(2011-01-01, 2011-01-02, 2011-01-03, 2011-01-04, 201-01-05) ts - zoo(x, ts)

Re: [R] How to get the date of specific value within a zoo object?

2011-08-09 Thread R. Michael Weylandt
I'd suggest you look into the xts class and write require(xts) xts = as.xts(1:5,Sys.Date()+1:5) time(xts)[xts==3] By the way, your code isn't pastable for me: not sure why. Michael Weylandt On Tue, Aug 9, 2011 at 10:39 PM, Richard Ma xuanlong...@uts.edu.au wrote: Hi all, I have a zoo time

Re: [R] How to get the date of specific value within a zoo object?

2011-08-09 Thread R. Michael Weylandt
D'Oh -- just spotted it (don't know what was wrong with me): in your code: 2011-01-05 and ts = zoo(x dt) need to be changed. If you do that, the same trick time(ts)[ts==3] will work. Still, I'm a big xts fan. Michael On Tue, Aug 9, 2011 at 10:45 PM, R. Michael Weylandt

[R] Plotting Ellipses and Points of Matching Colors in an Ordination

2011-08-09 Thread Gabriel Yospin
Hello, R-Help - I am trying to plot the results of an ordination from package vegan. The tricky part for me right now is getting the colors of the ellipses denoting the 95% confidence intervals of the group centroids to match the colors of the points for those same groups. From and earlier post,

[R] Can R handle a matrix with 8 billion entries?

2011-08-09 Thread Chris Howden
Hi, I’m trying to do a hierarchical cluster analysis in R with a Big Data set. I’m running into problems using the dist() function. I’ve been looking at a few threads about R’s memory and have read the memory limits section in R help. However I’m no computer expert so I’m hoping I’ve

Re: [R] Can R handle a matrix with 8 billion entries?

2011-08-09 Thread David Winsemius
On Aug 9, 2011, at 11:38 PM, Chris Howden wrote: Hi, I’m trying to do a hierarchical cluster analysis in R with a Big Data set. I’m running into problems using the dist() function. I’ve been looking at a few threads about R’s memory and have read the memory limits section in R help.

[R] Loops for repetitive task

2011-08-09 Thread a217
Hello, I have an R script that I use as a template to perform a task for multiple files (in this case, multiple chromosomes). What I would like to do is to utilize a simple loop to parse through each chromosome number so that I don't have to type the same code over and over again in the R

Re: [R] Loops for repetitive task

2011-08-09 Thread Peter Alspach
Tena koe Try something along the following lines: chrData - vector('list', 22) names(chrData) - paste('chr', 1:22, sep='') for (i in 1:length(chrData)) { chrData[[i]] - read.table(file=paste('chr', i, '.out.txt', sep=''), header=F) ... } HTH Peter Alspach -Original Message-

Re: [R] Can R handle a matrix with 8 billion entries?

2011-08-09 Thread Prof Brian Ripley
On Wed, 10 Aug 2011, David Winsemius wrote: On Aug 9, 2011, at 11:38 PM, Chris Howden wrote: Hi, I’m trying to do a hierarchical cluster analysis in R with a Big Data set. I’m running into problems using the dist() function. I’ve been looking at a few threads about R’s memory and have read

[R] Can R handle a matrix with 8 billion entries?

2011-08-09 Thread Peter Langfelder
Sorry if this is a duplicate... my email is giving me trouble this evening... On Tue, Aug 9, 2011 at 8:38 PM, Chris Howden ch...@trickysolutions.com.au wrote: Hi, I’m trying to do a hierarchical cluster analysis in R with a Big Data set. I’m running into problems using the dist() function.

Re: [R] Can R handle a matrix with 8 billion entries?

2011-08-09 Thread Peter Langfelder
Assuming you need the full distance matrix at one time (which you do not for hierarchical clustering, itself a highly dubious method for more than a few hundred points). Apologies if this hijacks the thread, but why is hierarchical clustering highly dubious for more than a few hundred points?

[R] How to quickly convert a data.frame into a structure of lists

2011-08-09 Thread Frederic F
Hello, This is my first project in R, so I'm trying to work 'the R way', but it still feels awkward sometimes. The problem that I'm facing right now is that I need to convert a data.frame into a structure of lists. The data.frame has columns in the order of tens (I need to focus on only three of

[R] glmnet

2011-08-09 Thread Andra Isan
Hi All,  I have been trying to use glmnet package to do LASSO linear regression. my x data is a matrix n_row by n_col and y is a vector of size n_row corresponding to the vector data. The number of n_col is much more larger than the number of n_row. I do the following: fits = glmnet(x, y,

Re: [R] How to get the date of specific value within a zoo object?

2011-08-09 Thread Richard Ma
Hi Michael, Thanks for your kindly help. Problem solved! Just curious why you prefer xts rather than zoo? Is xts more powerful? BTW, It's my mistake that incorrectly type the code. ;-) Cheers, Richard R. Michael Weylandt lt;michael.weyla...@gmail.comgt; wrote: I'd suggest you look into