[R] How to calculate confidence interval using bootstrap

2012-04-13 Thread Jane
Dear List, If I build a model based on training set, and calculate the predictive AUC on test set using that model, how should I calculate the 95%CI for this predictive AUC using bootstrap method? The SE should be calculated on training set or test set, or combine them together? I feel confused

[R] AIC for seasonal decomposition by stl

2012-04-13 Thread Joon-Taek Yoo
Hello I have a question on the seasonal decomposition based on Loess smoothing (called stl) for the R statistics package. I am wondering how to calculate value of AIC (Akaike Information Criterion) for the seasonal decomposition by stl in R. Thanks, [[alternative HTML version deleted]]

Re: [R] Organizations where IT has approved the use of R software

2012-04-13 Thread Michael Bibo
lynnland lynn.landriault at ontario.ca writes: I am putting forward a request that R be considered approved software in my organization. Never an easy task, this is made much more difficult given that it is open source software (sends the IT gang into little fits). So, I am compiling a

Re: [R] Generate combination of strings

2012-04-13 Thread Petr Savicky
On Thu, Apr 12, 2012 at 01:14:27PM -0700, Bart6114 wrote: Hey all, I am trying to generate a number of vectors with string combinations. The below code solves my initial problem, however I would prefer not hardcoding the positions of the 'objects' as in the future the number of 'objects'

Re: [R] AIC for seasonal decomposition by stl

2012-04-13 Thread Prof Brian Ripley
On 13/04/2012 07:32, Joon-Taek Yoo wrote: Hello I have a question on the seasonal decomposition based on Loess smoothing (called stl) for the R statistics package. I am wondering how to calculate value of AIC (Akaike Information Criterion) for the seasonal decomposition by stl in R. AIC is

[R] #!/usr/bin/env Rscript --vanilla ??

2012-04-13 Thread Martin Maechler
I think that's my first true question (rather than answer) to R-help. As R has, for a long time, become my primary scripting and programming language, I'm prefering at times to write Rscript files instead of shell scripts, notably when R has nice ways to do some of the things. On a standard

Re: [R] #!/usr/bin/env Rscript --vanilla ??

2012-04-13 Thread Feng Li
I guess you may try this http://modules.sourceforge.net/ I have seen a lot of clusters using this to manage software of different versions. Feng On 04/13/2012 10:32 AM, Martin Maechler wrote: I think that's my first true question (rather than answer) to R-help. As R has, for a long time,

Re: [R] #!/usr/bin/env Rscript --vanilla ??

2012-04-13 Thread Feng Li
I guess you may try this http://modules.sourceforge.net/ I have seen a lot of clusters using this to manage software of different versions. Feng On 04/13/2012 10:32 AM, Martin Maechler wrote: I think that's my first true question (rather than answer) to R-help. As R has, for a long time,

Re: [R] scatter3d: problem with spheres-color

2012-04-13 Thread René Mayer
Dear John and Duncan, thanks for your ideas! Unfortunatly, calling spheres from rgl did not resolve the problem on my machine. Both - spheres3d() and rgl.spheres() - behave the same: black spheres, all aqual colored. The only difference beeing the looking angle and thebackround color. Seems to

Re: [R] Can't get R to recognize Java for rJava installation

2012-04-13 Thread Milan Bouchet-Valat
Le jeudi 12 avril 2012 à 13:41 -0700, Waichler, Scott R a écrit : Hi, I am unable to install the package rJava. I tried doing what the output suggests, but it doesn't help. How can I get R to find/recognize my Java installation? I am running R-2.15.0. waichler@snow sudo R CMD javareconf

Re: [R] Rprofile.site?

2012-04-13 Thread Uwe Ligges
On 13.04.2012 06:25, Spencer Graves wrote: Hello: I've been using Rprofile.site for several years to set the repos environment variable as follows: options(repos=c(CRAN='http://cran.cnr.berkeley.edu', CRANextra='http://www.stats.ox.ac.uk/pub/RWin') ) However, R 2.15.0 is not recognizing

[R] Long command in Sweave

2012-04-13 Thread Wincent
Dear useRs, I am writing a vignette for a package, which contains long command like this, reduce(Lipset_cs,SURVIVAL,c(GNPCAP, URBANIZA, LITERACY, INDLAB, GOVSTAB),explain=positive,remainder=exclude,case=CASEID) It is longer than the width a page and part of it will become missing. Currently, I

Re: [R] enableJIT(2) causes major slow-up in rpart

2012-04-13 Thread Uwe Ligges
On 12.04.2012 23:15, Tal Galili wrote: Hello, Due to exploration of the JIT capabilities offered through the {compiler} package, I came by the fact that using enableJIT(2) can *slow* the rpart function (from the {rpart} package) by a magnitude of about 10 times. Here is an example code to

Re: [R] Organizations where IT has approved the use of R software

2012-04-13 Thread Liviu Andronic
On Fri, Apr 13, 2012 at 8:56 AM, Michael Bibo michael_b...@health.qld.gov.au wrote: Have you seen this from the archives? http://www.mail-archive.com/r-help@r-project.org/msg45768.html In addition see [1], which highlights the likes of Google, Merck or Stanford University. Liviu [1]

Re: [R] Saving multiple plots using tiff function

2012-04-13 Thread John S
Thanks Uwe, I am gald to hear there is a fix ! Any chance you could let me knwo if it worked ? 2012/4/12 Uwe Ligges lig...@statistik.tu-dortmund.de On 12.04.2012 13:53, Uwe Ligges wrote: On 12.04.2012 13:49, John S wrote: Thanks Berend for your answer! I read the documentation but I

Re: [R] scatter3d: problem with spheres-color

2012-04-13 Thread Duncan Murdoch
On 12-04-13 5:32 AM, René Mayer wrote: Dear John and Duncan, thanks for your ideas! Unfortunatly, calling spheres from rgl did not resolve the problem on my machine. Both - spheres3d() and rgl.spheres() - behave the same: black spheres, all aqual colored. The only difference beeing the looking

Re: [R] Long command in Sweave

2012-04-13 Thread Duncan Murdoch
On 12-04-13 5:46 AM, Wincent wrote: Dear useRs, I am writing a vignette for a package, which contains long command like this, reduce(Lipset_cs,SURVIVAL,c(GNPCAP, URBANIZA, LITERACY, INDLAB, GOVSTAB),explain=positive,remainder=exclude,case=CASEID) It is longer than the width a page and part

Re: [R] scatter3d: problem with spheres-color

2012-04-13 Thread René Mayer
I get the rgb-a are the same rgb-a's: spheres3d(1:5, 1:5, 1:5, col=1:5, radius=(1:5)/10) rgl.ids() idtype 1 11 spheres rgl.attrib(11, color) r g b a [1,] 0 0.000 0 1 [2,] 1 0.000 0 1 [3,] 0 0.8039216 0 1 [4,] 0 0.000 1 1 [5,] 0 1.000 1 1 as all sheres are

[R] group comparison for ordinal variable

2012-04-13 Thread Weiwei Shi
Hi there, I have a task of two group samples' comparison for ordinal variable, the possible values are from 0 to 4 with many many ties for about 60 samples totally. I am wondering which wilcox test like a regular wilcox.test in R or the version wilcox_test in package coin can do this job or not;

Re: [R] Long command in Sweave

2012-04-13 Thread Gavin Simpson
On Fri, 2012-04-13 at 17:46 +0800, Wincent wrote: Dear useRs, I am writing a vignette for a package, which contains long command like this, reduce(Lipset_cs,SURVIVAL,c(GNPCAP, URBANIZA, LITERACY, INDLAB, GOVSTAB),explain=positive,remainder=exclude,case=CASEID) It is longer than the width

Re: [R] how to add 3d-points to bplot {rms} figure?

2012-04-13 Thread David Winsemius
On Apr 12, 2012, at 6:09 PM, phi771 wrote: h! thank you a lot for your effort and help. i preferred a 3d view of the surface in order to see how well it fits the real data (from the file). i will play around with the functions you have mentioned and post my results or further problems.

Re: [R] Generate combination of strings

2012-04-13 Thread Bart6114
Great! Works like a charm! Thanks Petr!! On Fri, Apr 13, 2012 at 9:03 AM, Petr Savicky [via R] ml-node+s789695n4554013...@n4.nabble.com wrote: On Thu, Apr 12, 2012 at 01:14:27PM -0700, Bart6114 wrote: Hey all, I am trying to generate a number of vectors with string combinations. The

Re: [R] how to read netcdf file in R

2012-04-13 Thread Yogesh Tiwari
Dear David, Thanks, I could read and open .nc file in R, but now how to plot a simple filled color. Data and variables of .nc after reading in R are as below. Data have time steps of 99 (monthly mean data for 8 years). If I want to fill / plot co2 variable at time=1 then how to do it. Also, how

[R] Help with stemDocument

2012-04-13 Thread Deborah H. Deng
Hi, All: I am new to R and tm package. I'm trying to do the stemming using tm_map() and it doesn't seem to work: *I used:* stemDocument(t_cmts[[100]]) *Where t_cmts is the corpus object, the results is:* bottle loose box abt airpak sections top plastic bottle squashed nearly flush neck

[R] scatterplot3d(); customise axes

2012-04-13 Thread Tonja Krueger
Hi all! I’m using scatterplot3d() to show the distribution of data for different locations. As I wound like to show distances between the locations and also label the locations, I was wondering whether there is a function similar to axis() for a 2D plot that works with

[R] R-Help: Censoring data

2012-04-13 Thread Christopher Kelvin
Hello,  I want to estimate weibull parameters with 30% censored data. I have below the code for the censoring  but how it must be put into the likelihood equation to obtain the desire estimate is where i have a problem with,  can some body help?  My likelihood equation is for a random type-I

[R] Week number of a date in a month

2012-04-13 Thread arunkumar1111
Hi I have a requirement such that a a week should be ending on sunday. monday is the week start date. if a month start on sunday. then 2nd day of the month the monday will be in week 2 I need help in creating the week number - Thanks in Advance Arun -- View this message in

Re: [R] Help with stemDocument

2012-04-13 Thread Alekseiy Beloshitskiy
Check this slideshare.net/whitish/textmining-with-r Best, -Alex From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] on behalf of Deborah H. Deng [deborah.d...@alumni.utexas.net] Sent: 13 April 2012 10:27 To: r-help@r-project.org Subject: [R]

[R] R Large Dataset Problem

2012-04-13 Thread efulas
Dear All, I have a problem with my data. First problem is that my data is really large and R is omitting some columns from my data. Is there any way to read the whole data without omitting. Another problem is that my data have 102k columns and each column have active or inactive molecules. The

Re: [R] Plotting leapfrog in R

2012-04-13 Thread Jim Lemon
On 04/13/2012 12:25 PM, Colstat wrote: Dear List Is there a package for leapfrog plotting (Hamiltonian Monte Carlo estimation) in R? I tried the actual LEAPFrOG package which doesn't actually give the plot like this one? http://xianblog.files.wordpress.com/2010/09/hamilton.jpg How doe one

[R] Kaplan Meier analysis: 95% CI wider in R than in SAS

2012-04-13 Thread Paul Miller
Hello All,   Am replicating in R an analysis I did earlier using SAS. See this as a test of whether I'm ready to start using R in my day-to-day work.   Just finished replicating a Kaplan Meier analysis. Everything seems to work out fine except for one thing. The 95% CI around my estimate for the

Re: [R] R Large Dataset Problem

2012-04-13 Thread Milan Bouchet-Valat
Le vendredi 13 avril 2012 à 04:32 -0700, efulas a écrit : Dear All, I have a problem with my data. First problem is that my data is really large and R is omitting some columns from my data. Is there any way to read the whole data without omitting. How did you import it? Please be precise.

Re: [R] scatterplot3d(); customise axes

2012-04-13 Thread Uwe Ligges
On 13.04.2012 09:52, Tonja Krueger wrote: Hi all! I’m using scatterplot3d() to show the distribution of data for different locations. As I wound like to show distances between the locations and also label the locations, I was wondering whether there is a function similar to

Re: [R] R Large Dataset Problem

2012-04-13 Thread Alekseiy Beloshitskiy
I would perform data pre-processing before loading in R. Best, -Alex From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] on behalf of efulas [ef_u...@hotmail.com] Sent: 13 April 2012 14:32 To: r-help@r-project.org Subject: [R] R Large

Re: [R] R Large Dataset Problem

2012-04-13 Thread Rainer M Krug
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 13/04/12 14:20, Milan Bouchet-Valat wrote: Le vendredi 13 avril 2012 à 04:32 -0700, efulas a écrit : Dear All, I have a problem with my data. First problem is that my data is really large and R is omitting some columns from my data. Is

[R] Help - Importing data from txt and xlsx files

2012-04-13 Thread AMFTom
Hi all, I have just started to use R for my PhD project and have no previous experience in programming. I am having trouble importing data to R. This is the output: mydata - read.table(Lv2.8.txt) Error in file(file, rt) : cannot open the connection In addition: Warning message: In file(file,

Re: [R] Help with vectorization

2012-04-13 Thread Filoche
Thank you all. Problem solved. Regards, Phil -- View this message in context: http://r.789695.n4.nabble.com/Help-with-vectorization-tp4552638p4554565.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list

Re: [R] Remove superscripts from HTML objects

2012-04-13 Thread S Ellison
h - htmlpCatsupa/sup/ppDog/p/html sub(sup.*sup,,h) Probably safer to do gsub(sup.*?sup,,h) to avoid replacing multiple superscripts. eg h2 - htmlpCatsupa/sup/ppDog/ppMousesupa/sup/ppRaccoon/p/html sub(sup.*sup,,h2) #drops everything between first sup and last sup

Re: [R] Organizations where IT has approved the use of R software

2012-04-13 Thread lynnland
Hi All, Thanks for all the responses and interest. I was aware of Revolution Analytics and had seen some of the other links but some were new. The list received should be of great help. Given the R courses that used to be offered through the USGS site, I would assume they are using it but

Re: [R] R Large Dataset Problem

2012-04-13 Thread efulas
Thank you very much for your helps guys. Both message help me to run the data in R. However, R is omitting many columns from my data. Am i missing something? Many Thanks -- View this message in context: http://r.789695.n4.nabble.com/R-Large-Dataset-Problem-tp4554469p4554698.html Sent from the

Re: [R] Help - Importing data from txt and xlsx files

2012-04-13 Thread ONKELINX, Thierry
Dear Tom, R does not searches your entire file system for the file. It only looks in the working directory. Have a look at ?setwd() and ?getwd() So you will need to set the working directory, use a relative path to the file or use and absolute path to the file. Best regards, ir. Thierry

[R] Boxcox transformation

2012-04-13 Thread ruchi
I am time series data in Eviews to see the fitting of logistic and gompertz model with my data. I used NLS and then the Box cox transformation. I need to see my graph of original data Vs predicted values / fiited values on single graph . I cam do this when dealing only with NLS but I am not able

[R] How do I convert factors to numeric? It's an FAQ but...

2012-04-13 Thread John Coulthard
Dear R list people I loaded a file of numbers into R and got a dataframe of factors. So I tried to convert it to numeric as per the FAQ using as.numeric(). But I'm getting errors (please see example), so what am I getting wrong? Thanks for your time. John Example... #my data object f

[R] getting the value from previous row

2012-04-13 Thread arunkumar1111
Hi I've a dataset with record A = 100,200,300,400... There will be a parameter n. say n=10 means i have add 10% of previous value to the current row current_Val New_value 100 100 200210 (200+10) 300330( 300 +20+10) 400

Re: [R] R Large Dataset Problem

2012-04-13 Thread Milan Bouchet-Valat
Le vendredi 13 avril 2012 à 05:44 -0700, efulas a écrit : Thank you very much for your helps guys. Both message help me to run the data in R. However, R is omitting many columns from my data. Am i missing something? Please read the posting guide. If you don't provide the code you ran and the

Re: [R] How do I convert factors to numeric? It's an FAQ but...

2012-04-13 Thread Milan Bouchet-Valat
Le vendredi 13 avril 2012 à 13:08 +, John Coulthard a écrit : Dear R list people I loaded a file of numbers into R and got a dataframe of factors. So I tried to convert it to numeric as per the FAQ using as.numeric(). But I'm getting errors (please see example), so what am I getting

Re: [R] How do I convert factors to numeric? It's an FAQ but...

2012-04-13 Thread ONKELINX, Thierry
f is a dataframe of factor, not a factor use either as.numeric(levels(f$your.factor))[f$your.factor] or if f only contains factors apply(f, 2, function(x){as.numeric(levels(x))[x]}) ir. Thierry Onkelinx Instituut voor natuur- en bosonderzoek / Research Institute for Nature and Forest team

Re: [R] #!/usr/bin/env Rscript --vanilla ??

2012-04-13 Thread Dirk Eddelbuettel
On 13 April 2012 at 10:32, Martin Maechler wrote: | I think that's my first true question (rather than answer) | to R-help. | | As R has, for a long time, become my primary scripting and | programming language, I'm prefering at times to write Rscript | files instead of shell scripts, notably

Re: [R] How do I convert factors to numeric? It's an FAQ but...

2012-04-13 Thread David Winsemius
On Apr 13, 2012, at 9:08 AM, John Coulthard wrote: Dear R list people I loaded a file of numbers into R and got a dataframe of factors. So I tried to convert it to numeric as per the FAQ using as.numeric(). Actually you used as.numeric(as.character()) which should have been successful

Re: [R] loess function take

2012-04-13 Thread Liaw, Andy
Alternatively, use only a subset to run loess(), either a random sample or something like every other k-th (sorted) data value, or the quantiles. It's hard for me to imagine that that many data points are going to improve your model much at all (unless you use tiny span). Andy From:

Re: [R] Partial Dependence and RandomForest

2012-04-13 Thread Liaw, Andy
Please read the help page for the partialPlot() function and make sure you learn about all its arguments (in particular, which.class). Andy -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of jmc Sent: Wednesday, April 11, 2012 2:44

Re: [R] getting the value from previous row

2012-04-13 Thread Milan Bouchet-Valat
Le vendredi 13 avril 2012 à 06:09 -0700, arunkumar a écrit : Hi I've a dataset with record A = 100,200,300,400... There will be a parameter n. say n=10 means i have add 10% of previous value to the current row current_Val New_value 100 100 200

Re: [R] loess function take

2012-04-13 Thread Bert Gunter
Since you have only one dependent variable, try using lowess() instead. It is less flexible -- only does local linear robust fitting -- but has arguments built in that allow you to sample and interpolate and limit the number of robustness iterations. It runs considerably faster as a result. --

[R] group comparison for ordinal variable

2012-04-13 Thread Weiwei Shi
Hi there, I have a task of two group samples' comparison for ordinal variable, the possible values are from 0 to 3 with many many ties for about 60 samples totally. I am wondering if wilcox test is a proper one and which wilcox test like a regular wilcox.test in R or the version wilcox_test in

[R] list.dirs() full.names broken?

2012-04-13 Thread J Toll
Hi, I am trying to list all the sub-directories in a particular directory and having a few issues. list.dirs seems to be slightly broken and/or poorly labelled. My issue appears to be the same as this one, from the archives: http://tolstoy.newcastle.edu.au/R/e16/help/11/11/1156.html Here is

Re: [R] Simple Problem: Plotting mathematical functions

2012-04-13 Thread R. A. Bilonick
On 04/12/2012 09:11 PM, David Winsemius wrote: On Apr 12, 2012, at 3:49 PM, Aye wrote: Okay, i got this far: f - function(x) 0.25*x^2 + 6.47*x -32.6 g - function(x) 0.99*x^2 -6*x -195 h - function(x) 0.77*x^2 +14*x -495 j - function(x) 0.001*x^2 + 65*x -785 k - function(x) 0.9*x^2 -2*x -636

Re: [R] Long command in Sweave

2012-04-13 Thread Wincent
Thanks, Gavin and Duncan. In that case, what I need is a suitable editor which can break the command properly. All the best On 13 April 2012 19:33, Gavin Simpson gavin.simp...@ucl.ac.uk wrote: On Fri, 2012-04-13 at 17:46 +0800, Wincent wrote: Dear useRs, I am writing a vignette for a

Re: [R] Execution speed in randomForest

2012-04-13 Thread Liaw, Andy
Without seeing your code, it's hard to say much more, but do avoid using formula when you have large data. Andy -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Jason Caroline Shaw Sent: Friday, April 06, 2012 1:20 PM To: jim

Re: [R] Kaplan Meier analysis: 95% CI wider in R than in SAS

2012-04-13 Thread Paul Miller
Hi Enrico, Not sure how SAS builds the CI but I can look into it. The SAS documentation does have a section on computational formulas at: http://support.sas.com/documentation/cdl/en/statug/63033/HTML/default/viewer.htm#statug_lifetest_a000259.htm Although I can't provide my dataset, I can

Re: [R] how to read netcdf file in R

2012-04-13 Thread David William Pierce
On Fri, Apr 13, 2012 at 12:09 AM, Yogesh Tiwari yogesh@googlemail.com wrote: Dear David, Thanks, I could read and open .nc file in R, but now how to plot a simple filled color. [...] Hi Yogesh, glad to hear that the ncdf package is doing its job correctly. I'm sure you understand that

Re: [R] Long command in Sweave

2012-04-13 Thread Yihui Xie
You can probably try knitr; see the manual for example: https://github.com/downloads/yihui/knitr/knitr-manual.pdf Code reformatting is based on the formatR package (https://github.com/yihui/formatR/wiki), which tries to preserve your comments while breaking your long lines into shorter ones.

Re: [R] Long command in Sweave

2012-04-13 Thread Gavin Simpson
I use Emacs and ESS, with the coding standards in one of the R manuals. I have to insert the carriage returns where I want them, but Emacs/ESS indents the code correctly G On Fri, 2012-04-13 at 22:17 +0800, Wincent wrote: Thanks, Gavin and Duncan. In that case, what I need is a suitable

Re: [R] using wildcards in download.file?

2012-04-13 Thread MacQueen, Don
If you take a thorough look at the help page for download.file, and follow its advice, you may find a solution. Hint: The help page for download.file says, -- quote -- The function 'download.file' can be used to download a single file as described by 'url' from the internet and store it in

Re: [R] R Large Dataset Problem

2012-04-13 Thread jim holtman
When using 'scan' I had no problem reading a string that had 1000 'columns' x - scan('/temp/tempxx.txt', what = list(0L, '')) Read 14 records str(x) List of 2 $ : int [1:14] 129876 129876 129876 129876 129876 129876 129876 129876 129876 129876 ... $ : chr [1:14]

[R] vif calculation with car and HH packages

2012-04-13 Thread Özgür Asar
Dear all, I have faced a problem while calculating VIF values via the packages, car and HH for the models witout intercepts. Below is an illustrative example: 1) via the car package y-rnorm(100,0,1) x1-rnorm(100,0,1) x2-rnorm(100,0,1) x3-rnorm(100,0,1) model1-lm(y~-1+x1+x2+x3)

Re: [R] caret package: custom summary function in trainControl doesn't work with oob?

2012-04-13 Thread Max Kuhn
Matt, I've been using a custom summary function to optimise regression model methods using the caret package. This has worked smoothly. I've been using the default bootstrapping resampling method. For bagging models (specifically randomForest in this case) caret can, in theory, uses the

Re: [R] Kaplan Meier analysis: 95% CI wider in R than in SAS

2012-04-13 Thread Frank Harrell
Make sure you use the log S(t) basis on both systems (and avoid log-log S(t) basis as this results in instability in the front part of the survival curve). Frank Paul Miller wrote Hi Enrico, Not sure how SAS builds the CI but I can look into it. The SAS documentation does have a section on

Re: [R] using wildcards in download.file?

2012-04-13 Thread steven mosher
one way to solve your problem is to fetch the directory using rcurl. then mapply using the dirlist as a parameter passed to download file On Apr 13, 2012 9:24 AM, MacQueen, Don macque...@llnl.gov wrote: If you take a thorough look at the help page for download.file, and follow its advice, you

Re: [R] vif calculation with car and HH packages

2012-04-13 Thread John Fox
Dear Özgür, car::vif() produces a warning, not an error. It will proceed to compute VIFs based on the correlation matrix of the coefficients (take a look at car:::vif.lm) even if there is no intercept, and even though this would not normally correspond to variance inflation due to correlation

Re: [R] Gradients in bar charts XXXX

2012-04-13 Thread Greg Snow
Here is one approach: tmp - rbinom(10, 100, 0.78) mp - barplot(tmp, space=0, ylim=c(0,100)) tmpfun - colorRamp( c('green','yellow',rep('red',8)) ) mat - 1-row(matrix( nrow=100, ncol=10 ))/100 tmp2 - tmpfun(mat) mat2 - as.raster( matrix( rgb(tmp2, maxColorValue=255), ncol=10) ) for(i in 1:10)

Re: [R] Help - Importing data from txt and xlsx files

2012-04-13 Thread AMFTom
Dear Thierry, Thanks for your help. Now though, I try to import data from a txt file, and it says either mydataframe - read.table(Lv2.8.txt) Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : line 3 did not have 15 elements or mydataframe -

Re: [R] Applying a function to categorized data?

2012-04-13 Thread Robert Latest
Hello Steve, thank you for your reply. You're right, just before I read your post I'd found aggregate() and indeed it brought me a long way towards my goal. I've been a C programmer for 20+ years, and I'm fairly firm in SQL, so to understand R I need to lose my scalar and row (record) oriented

Re: [R] Partial Dependence and RandomForest

2012-04-13 Thread jmc
Thank you Andy. I obviously neglected to read into the help file and, frustratingly, could have known this all along. However, I am still interested in knowing the relative maximum value in the partial plots via query instead of visual interpretation (and possibly getting at other statistical

Re: [R] [BioC] Read .idat Illumina files in R

2012-04-13 Thread grimbough
I posted this to BioC yesterday, but I'll include it here for completeness: The expression array idats are indeed encrypted. However you can read them using the package available here: http://www.compbio.group.cam.ac.uk/Resources/IDATreader/ You can get back a data.frame containing the

Re: [R] could not find function when compiling PDF

2012-04-13 Thread damiloveu
it works in console, like this: mult.corr(X,Y) $mult.corr [1] 0.8382398 $p.mult [1] 3.570699e-12 $partial.corr [1] 0.18447499 -0.09837888 0.12007457 $p.partial [1] 0.2094076 0.5058976 0.4162641 and it doesn't work when compiling. Error: chunk 3 (label = ques3) Error in eval(expr, envir,

Re: [R] correlation matrix between data from different files

2012-04-13 Thread Rui Barradas
Hello, jeff6868 wrote Dear users, I'm quite a new french R-user, and I have a problem about doing a correlation matrix. I have temperature data for each weather station of my study area and for each year (for example, a data file for the weather station N°1 for the year 2009, a data

Re: [R] Remove superscripts from HTML objects

2012-04-13 Thread Chris Stubben
Sorry if I was not clear. I wanted to remove the superscripts using xpath queries if possible. For example this will get p nodes with superscripts, but how do I remove the superscripts if there are many matching nodes and different superscripts? xpathSApply(doc, //p[sup], xmlValue) [1] Cata

[R] could not find function when compiling PDF

2012-04-13 Thread damiloveu
Hi all, I could use the function when I am in the console. After I finish my assignment and compile them to the pdf, there was an error said, could not find the function XXX. How come this happen? I am a new user to R. Thanks for everyone's help! -- View this message in context:

[R] problem with svyby and NAs (survey package)

2012-04-13 Thread A.F.Fenton
Hello I'm trying to get the proportion true for dichotomous variable for various subgroups in a survey. This works fine, but obviously doesn't give proportions directly: svytable(~SurvYear+problem.vandal, seh.dsn, round=TRUE) problem.vandal SurvYear FALSE TRUE 1995 8906 786

[R] Displayed Date Format in Plot Title.

2012-04-13 Thread Sam Albers
Hello all, I can't seem to figure out how to format a date as a title. I have something like this: plot(x=1:10, y=runif(10,1,18), main=paste(as.Date(2011-05-03, format=%Y-%m-%d))) ## When I would really like this plot(x=1:10, y=runif(10,1,18), main=paste(May-03-2011)) ## I thought to try this

Re: [R] vif calculation with car and HH packages

2012-04-13 Thread Özgür Asar
Dear Prof. Fox, I got the point, things are clear now. Thank you very much, Best wishes Ozgur - Ozgur ASAR Research Assistant Middle East Technical University Department of Statistics 06531, Ankara Turkey Ph: 90-312-2105309 -- View this message in

Re: [R] Help - Importing data from txt and xlsx files

2012-04-13 Thread jim holtman
This is a case where you need to provide a sample of your data. Most likely it is not in a format that read.table can read with the parameters you have given it. It may have different field separators, it might have # in data fields, you might have unbalanced quotes, etc. So it is a problem in

Re: [R] Help - Importing data from txt and xlsx files

2012-04-13 Thread MacQueen, Don
Have you correctly set the value of the 'sep' argument to read.table? -Don -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 4/13/12 7:28 AM, AMFTom the.quiet.r...@gmail.com wrote: Dear Thierry, Thanks for your help. Now

Re: [R] Displayed Date Format in Plot Title.

2012-04-13 Thread R. Michael Weylandt
as.Date() attemps to coerce a character string to a date where you specify the input format -- if you want to specify an output format, you need ?strftime [str + f + time == string format time] E.g., titleDate - as.Date(2011-05-03, format = %Y-%m-%d) plot(1:10, main = strftime(titleDate,

Re: [R] writing spdiags function for R

2012-04-13 Thread Ben Bolker
Moreno I. Coco M.I.Coco at sms.ed.ac.uk writes: [snip snip snip] So, I have written my own spdiags function (below); following also a suggestion in an old, and perhaps unique post, about this issue. It works only for square matrices (that's my need), however I have a couple of issues,

Re: [R] #!/usr/bin/env Rscript --vanilla ??

2012-04-13 Thread Berend Hasselman
On 13-04-2012, at 10:32, Martin Maechler wrote: I think that's my first true question (rather than answer) to R-help. As R has, for a long time, become my primary scripting and programming language, I'm prefering at times to write Rscript files instead of shell scripts, notably when R

Re: [R] rgl_0.92.879 package broke with R 2.15

2012-04-13 Thread Grimes Mark
Duncan Brilliant. This solved the problem. Library (rgl) is now accessiible, and the plot3d function works fine in X11 (which I think is how it worked before anyway). Whatever I may be missing, I don't think I'll notice. Best, Mark On Apr 13, 2012, at 11:08 AM, Duncan Murdoch

[R] is there a way to call python like source(file, echo = TRUE) in R?

2012-04-13 Thread Yihui Xie
Sorry this is more like a Python question, but I believe many R users also know well about Python, so here is my question: I want to run python code like source(file, echo = TRUE) in R, i.e. echo both the source code and the output. This only shows the output: python -c 'print hello' Thanks!

Re: [R] writing spdiags function for R

2012-04-13 Thread Ben Bolker
Ben Bolker bbolker at gmail.com writes: I'm not quite sure how to do it, but I think you should look at the ?band function in Matrix. In combination with diag() of a suitably truncated matrix, you should be able to extract bands of sparse matrices efficiently ... getband -

Re: [R] Can't get R to recognize Java for rJava installation

2012-04-13 Thread Waichler, Scott R
Milan, Merci. I did find the javah file and put it in /usr/bin, where R can now find it. However, I still get a similar error message when trying to install rJava, i.e. configure: error: One or more Java configuration variables are not set. The only field that doesn't have a value now are

[R] Can't read a binary file

2012-04-13 Thread Waichler, Scott R
Hi, I've read up on readBin() and chapter 6 in the R Data Import/Export manual, but I still can't read a binary file. Here is how the creator of the file described the code that would be needed in Fortran: Every record has a return in fortran. The length of each record is nx*ny*4. To read

[R] Coding columns for survival analysis

2012-04-13 Thread Alexander Shenkin
Hello Folks, I have 5 columns for thousands of tree records that record whether that tree was alive or dead. I want to recode the columns such that the cell reads found when a live tree is first observed, alive for when a tree is found alive and is not just found, and mort when it was previously

Re: [R] Can't read a binary file

2012-04-13 Thread Roy Mendelssohn
Hi Scott: On Apr 13, 2012, at 1:45 PM, Waichler, Scott R wrote: Hi, I've read up on readBin() and chapter 6 in the R Data Import/Export manual, but I still can't read a binary file. Here is how the creator of the file described the code that would be needed in Fortran: Every record has a

Re: [R] enableJIT(2) causes major slow-up in rpart

2012-04-13 Thread luke-tierney
The level 2 is a heuristic meant to help with certain kinds of programming idioms. It isn't always going to work. In this case trace(cmpfun) will show three functions being compiled each time through. Not sure why -- I'll try to find out and see if it can be avoided. luke On Thu, 12 Apr 2012,

Re: [R] loess function take

2012-04-13 Thread Duncan Mackay
As lowess() is mentioned another in similar vein is locfit() from package locfit Duncan Duncan Mackay Department of Agronomy and Soil Science University of New England ARMIDALE NSW 2351 Email home: mac...@northnet.com.au At 00:07 14/04/2012, you wrote: Since you have only one dependent

[R] A little exercise in R!

2012-04-13 Thread Ted Harding
Greetings all! A recent news item got me thinking that a problem stated therein could provide a teasing little exercise in R programming. http://www.bbc.co.uk/news/uk-england-cambridgeshire-17680326 Cambridge University hosts first European 'maths Olympiad' for girls The first European

[R] Question with R CMD SHLIB in 64 bit R

2012-04-13 Thread Katharine Miller
Hi, I have some C++ code that I compiled into a dll for use in 32 bit R and would like to recompile for use in 64bit R. I thought it would be as easy as going to R-2.15.0\bib\x64 and running R CMD SHLIB mfregRF.c but that doesn't do anything. It doesn't give me any error messages, but it also

[R] How to define format of number

2012-04-13 Thread mrzung
hi all, What I want to do is show a number with thousand expression. I dont know exactly the expression name but here is example. 1,000 10,000,000 is there a way to express a number like that? -- View this message in context:

[R] R: Colouring phylogenetic tip labels and/or edges

2012-04-13 Thread Monroe, Melanie
Hi, I have reconstructed ancestral character states on a phylogeny using MuSSE in the diversitree package and plotted the character state probabilities as pie charts on the nodes. I would, however, like to colour the character states of my extant species, i.e. the tip labels, the same colours

[R] Odd characters at beginning of file

2012-04-13 Thread Lee Hachadoorian
I'm use RPostgreSQL to access data on a Postgres server. I would like to keep my SQL statements in external files, as they're easier to write and debug in pgAdmin, then I use readLines to bring them into R and feed to dbGetQuery. Here's the problem. When I create a SQL script with pgAdmin, then

  1   2   >