Re: [R] problem in getVarianceStabilizedData

2014-01-27 Thread Jeff Newmiller
Please don't cross-post per R-help posting guide. The data function is not itself data. Provide your data to the function using the name you assign to it according to the getVarianceStabilizedData function documentation.

[R] Overlaying two graphs using ggplot2 in R

2014-01-27 Thread Kristi Glover
Hi R Users, I was struggling to overlay two graphs created from the two different dataset using ggplot2. Furthermore, I could not join means of the box plots. I tried this way but did not work. Any suggestions? dat1-structure(list(site = c(1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L,

[R] Statistics courses

2014-01-27 Thread Highland Statistics Ltd
There are a few remaining places on the following three statistics courses in Coimbra, Lisbon and Elche (Alicante). Course: Data exploration, linear regression, GLM GAM in R. With introduction to R. Where: University of Coimbra, Coimbra, Portugal When: 3-7 February, 2014 Course:

[R] Using apply function

2014-01-27 Thread Yen Lee
Hi all R-users, I'm trying to using apply function to input a range of values into a function I wrote. I wrote a function with 4 information needed. I would like to make 2 of them fixed and the other 2 random (but with specified values). I would like to replicate the function 1 times. I

Re: [R] Using apply function

2014-01-27 Thread jim holtman
Is this what you want: random - expand.grid(R1 = 1:5, R2 = -(1:5)) result - cbind(F1 = 10, F2 = 100, random) result F1 F2 R1 R2 1 10 100 1 -1 2 10 100 2 -1 3 10 100 3 -1 4 10 100 4 -1 5 10 100 5 -1 6 10 100 1 -2 7 10 100 2 -2 8 10 100 3 -2 9 10 100 4 -2 10 10 100 5 -2

[R] passing variable names to dplyr

2014-01-27 Thread Bos, Roger
All, I would like to figure out how to pass variable names to the dplyr function mutate. For example, this works because hp is one of the variable names on mtcars: mutate(mtcars, scale(hp)) Let's says I want to pass in the target variable instead of hard-coding the name, as follows: target

[R] problem (un)detecting changepoints

2014-01-27 Thread Enrico R. Crema
Dear List, I am using the cpt.mean() function in the changepoint package to detect change-points in my data and noticed that when there are no visible changes, the function returns the last point as the point of change. The following script can illustrate this:

Re: [R] Calculating group means

2014-01-27 Thread Anoop Kumarkm
Hi Bert, Thanks for the reply. Here is the snippet from R shell running on top of a kerberos secured hadoop cluster = Sys.setenv(HADOOP_CMD=/usr/bin/hadoop) library(rhdfs) Loading required package: rJava HADOOP_CMD=/usr/bin/hadoop Be sure to run hdfs.init() hdfs.init()

[R] Simplifying matrix computation

2014-01-27 Thread Carlo Giovanni Camarda
Dear R-users, I would like to know whether you know some trick for skipping some of the steps in the example below (especially the last step in a way that would make easier to be written succinctly in a text). I could try to explain in words the whole process, but I'm sure the code below

Re: [R] Calculating group means

2014-01-27 Thread Bert Gunter
1. Please cc anything but personal remarks to the list, not to me. That will assure better answers. 2. Your query is too vague for me to be sure -- a small reproducible example of what you'd like would be very helpful here -- but I am guessing that you want the ?ave function instead of by().

Re: [R] testing if xts date exists ?

2014-01-27 Thread Joshua Ulrich
You can use the which.i argument to [.xts: is.null(SPY[2009-01-18,which.i=TRUE]) [1] TRUE Best, -- Joshua Ulrich | about.me/joshuaulrich FOSS Trading | www.fosstrading.com On Sat, Jan 25, 2014 at 9:27 AM, ce zadi...@excite.com wrote: Dear all How to test if xts date exists ? is.null

Re: [R] Calculating group means

2014-01-27 Thread Bert Gunter
That is not a small reproducible example. There's no r code. Please read the posting guide to learn how to post to r-help. -- Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 Data is not information. Information is not knowledge. And knowledge is certainly not wisdom. H.

Re: [R] memory use of copies

2014-01-27 Thread Martin Morgan
Hi Ross -- On 01/23/2014 05:53 PM, Ross Boylan wrote: [Apologies if a duplicate; we are having mail problems.] I am trying to understand the circumstances under which R makes a copy of an object, as opposed to simply referring to it. I'm talking about what goes on under the hood, not the user

[R] Prediction Intervals predict.Arima

2014-01-27 Thread monika nov
I would like to ask how exactly the prediction intervals are calculated by function predict.arima in R. I suppose that the method is same as for the function forecast (which I am actually using). Unfortunately I can not find it anywhere. I am particularly interested in how it works for Arima

[R] R and kerberos

2014-01-27 Thread Anoop Kumarkm
Dear Team, I have R and rhdfs installed in a kerberos secured cluster. Whether R and rhdfs will work with kerberos secured cluster? Is there any reported issues? Thanks Regards Anoop Kumar K M =-=-= Notice: The information contained in this e-mail message and/or

Re: [R] problem (un)detecting changepoints

2014-01-27 Thread Martyn Byng
Hi, I don't think you are doing anything wrong, the routine is doing what it is documented to do, from ?cpt.mean cpt: Vector containing the changepoint locations for the penalty supplied. This always ends with n. i.e. as your series is of length 50, the last value returned in cpts will

Re: [R] problem (un)detecting changepoints

2014-01-27 Thread Enrico R. Crema
Hi Martyn, Thanks! Should have checked the doc more thoroughly ! Enrico On 27 Jan 2014, at 16:35, Martyn Byng martyn.b...@nag.co.uk wrote: Hi, I don't think you are doing anything wrong, the routine is doing what it is documented to do, from ?cpt.mean cpt: Vector containing the

[R] Problem in overlying two figures in ggplot2

2014-01-27 Thread Kristi Glover
Hi R Users, I was struggling to overlay two graphs created from the two different datasets using ggplot2.I could not overlay two figures. I wanted to plot second graph using second Y axis. but there was no provision. Furthermore, I could not join means of the box plots. I tried this way but

[R] Bug or my misunderstanding?

2014-01-27 Thread Bert Gunter
Folks: Before I waste someone's time with a stupid bug report, could I get feedback as to whether the following really appears to be a (minor) bug? Summary: get_all_vars does not seem to handle multiple responses correctly. Example: y - matrix(runif(12),nc=3) x - 1:4 lmfit -lm(y~x)

Re: [R] Bug or my misunderstanding?

2014-01-27 Thread Bert Gunter
It is! I apologize for the noise. Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 Data is not information. Information is not knowledge. And knowledge is certainly not wisdom. H. Gilbert Welch On Mon, Jan 27, 2014 at 9:48 AM, Brian Ripley rip...@stats.ox.ac.uk

Re: [R] problem (un)detecting changepoints

2014-01-27 Thread Enrico R. Crema
Although, I got the similar results using AMOC, which should: cpt The most probable location of a changepoint if a change was identified or NA if no changepoint. Enrico --- Dr Enrico R. Crema ERC EUROEVOL Research Associate UCL Institute of Archaeology

Re: [R] Problem in overlying two figures in ggplot2

2014-01-27 Thread Ista Zahn
Hi Kristi, There is a separate ggplot2 mailing list at https://groups.google.com/forum/#!forum/ggplot2, please post future ggplot2 questions there. On Mon, Jan 27, 2014 at 11:52 AM, Kristi Glover kristi.glo...@hotmail.com wrote: Hi R Users, I was struggling to overlay two graphs created from

[R] using substitute with multiple parameters

2014-01-27 Thread Bos, Roger
Dear All, I can't figure out how to pass multiple arguments to substitute to build up a call statement. One argument works fine: target - val1 call - substitute(select(zidx_df, datadate, target), list(target = as.name(target))) call select(zidx_df, datadate, val1) Now I

Re: [R] Handlig large SAS file in R

2014-01-27 Thread Frank Harrell
For that you need to purchase Stat/Transfer. Frank hans012 wrote Hey Guys I have a .sas7bdat file of 1.79gb that i want to read. I am using the .sas7bdat package to read the file and after i typed the command read.sas7bdat('filename.sas7bdat') it has been 3 hours with no result so far. Is

[R] Numeric Column Labels in Excel Function

2014-01-27 Thread Dustin Fife
Hi all, I frequently get requests to do data analysis where the person references an excel column. e.g., I want to analyze [insert complex variable name], located at column AAQ in Excel. I've been doing is gsub and inserting a part of the string for the complex variable name, then going from

Re: [R] Numeric Column Labels in Excel Function

2014-01-27 Thread arun
HI, May be you can try: fun1 - function(n){  if(n =26){  res - LETTERS[seq_len(n)]  }  else if(n26 n =702){ res -  c(LETTERS,apply(expand.grid(vec1,vec1)[,2:1],1,paste,collapse=))[1:n] } else if(n 702 n =18278){ res -

Re: [R] Numeric Column Labels in Excel Function

2014-01-27 Thread Dustin Fife
There seems to be a problem with that function: object 'vec1' not found. On Mon, Jan 27, 2014 at 4:05 PM, arun smartpink...@yahoo.com wrote: HI, May be you can try: fun1 - function(n){ if(n =26){ res - LETTERS[seq_len(n)] } else if(n26 n =702){ res -

Re: [R] Numeric Column Labels in Excel Function

2014-01-27 Thread arun
Sorry, this should work fun1 - function(n){ vec1 - LETTERS  if(n =26){  res - vec1[seq_len(n)]  }  else if(n26 n =702){ res -  c(LETTERS,apply(expand.grid(vec1,vec1)[,2:1],1,paste,collapse=))[1:n] } else if(n 702 n =18278){ res -

Re: [R] Problem in overlying two figures in ggplot2

2014-01-27 Thread Jim Lemon
On 01/28/2014 03:52 AM, Kristi Glover wrote: Hi R Users, I was struggling to overlay two graphs created from the two different datasets using ggplot2.I could not overlay two figures. I wanted to plot second graph using second Y axis. but there was no provision. Furthermore, I could not join

Re: [R] Numeric Column Labels in Excel Function

2014-01-27 Thread jim holtman
If you use XLConnect, to can reference the column symbolically to retrieve the data. Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you want to do it. On Mon, Jan 27, 2014 at 4:30 PM, Dustin Fife fife.dus...@gmail.com wrote:

[R] Predictor Importance in Random Forests and bootstrap

2014-01-27 Thread Dimitri Liakhovitski
Hello! Below, I: 1. Create a data set with a bunch of factors. All of them are predictors and 'y' is the dependent variable. 2. I run a classification Random Forests run with predictor importance. I look at 2 measures of importance - MeanDecreaseAccuracy and MeanDecreaseGini 3. I run 2 boostrap

Re: [R] Predictor Importance in Random Forests and bootstrap

2014-01-27 Thread Bert Gunter
I **think** this kind of methodological issue might be better at SO (stats.stackexchange.com). It's not really about R programming, which is the main focus of this list. And yes, I know they do intersect. Nevertheless... Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650)

[R] KnitR/RMarkdown: Is there a way to not print a section of the document?

2014-01-27 Thread Jeff Johnson
I've been looking through the R documents to see if there's a way to not output certain chunks of code. I'm trying to present a document to a team of folks that won't necessarily be interested in the line-by-line code, though they are interested in the charts, etc. Thus, I'd like to not output

Re: [R] KnitR/RMarkdown: Is there a way to not print a section of the document?

2014-01-27 Thread Luke Miller
In the chunk options, you can use the argument echo = FALSE to suppress display of the R code in the output. echo = FALSE= # R code @ This will still print out results from R that would be sent to the command line (like print() statements, cat() statements, results from summary(), etc), but the

[R] Error msg while trying to install package ncdf4

2014-01-27 Thread Armel KAPTUE
Hi all, I'm unable to install the package ncdf4 and below is the message that I'm getting. Any thougths on how to fix the problem will be very much appreciated. # # * installing *source*

[R] Use calc function to do RKT over raster stack

2014-01-27 Thread hendricks
I am trying to do the Mann-Kendall, Sen's Slope and Regional Kendall Test (rkt package) over a 30 year time period spatially. I have created a raster stack but am unable to figure out how to use the calc function to do rkt. This is what I have... #create vector of years for tests Years -

Re: [R] KnitR/RMarkdown: Is there a way to not print a section of the document?

2014-01-27 Thread Duncan Mackay
Hi I use Sweave and have a master Rnw file and parent files. If there are large chunks I split them up and then just put a % in front of the \SweaveInput if unwanted. Otherwise I split up the tex files with \input and \includeonly You could get into the chunk options and change things there but

Re: [R] Overlaying two graphs using ggplot2 in R

2014-01-27 Thread David Winsemius
On Jan 27, 2014, at 3:13 AM, Kristi Glover wrote: Hi R Users, I was struggling to overlay two graphs created from the two different dataset using ggplot2. Furthermore, I could not join means of the box plots. I tried this way but did not work. Any suggestions? dat1-structure(list(site =

Re: [R] KnitR/RMarkdown: Is there a way to not print a section of the document?

2014-01-27 Thread Yihui Xie
Similarly, you can split a large input document into child documents in knitr, e.g. chap1, child=chap1.Rnw= @ You can comment out this chunk when you do not need it. Or control it programmatically, setup, include=FALSE= include_me = TRUE # or FALSE @ chap1, child=if (include_me)

Re: [R] subset a data frame into multiple data frames

2014-01-27 Thread arun
Hi, Try ?split() If `dat1` is the dataset: lst1 - split(dat1,dat1$ID) lst1$an1 #   ID V1  mean   SD   SE #1 an1  5  72.21719 22.27118 9.092172 #2 an1  6 100.0   NA   NA lst1$an2 #   ID V1  mean   SD  SE #3 an2  5  79.27999 25.08938 10.2427 #4 an2  6 100.0  

Re: [R] Overlaying two graphs using ggplot2 in R

2014-01-27 Thread Duncan Mackay
Hi Kristi Jim has given you 1 non ggplot2 solution here is one from lattice panel.average is a line so added a line for points # convert site to a factor dat1$Site = factor(dat1$Site) datav - aggregate(Present ~ Site, dat1,mean) datav diff(datav[,2]) # test bw1 -

[R] Assigning a factor to a data frame

2014-01-27 Thread Tjun Kiat Teo
I created an an empty data frame this way: forsentest-data.frame(matrix(nrow=nod,ncol=f)). Then I tried to assign one row of another data frame forsen to it forsentest[1,]-forsen[1,] But the factors in forsen gets converted to numbers in forsentest which is not what I want. Is there another

Re: [R] [BioC] problem in getVarianceStabilizedData

2014-01-27 Thread Suparna Mitra
Thanks a lot Michael, Thats a great help. Best wishes, Suparna Dr. Suparna Mitra Department of Molecular and Clinical Pharmacology Institute of Translational Medicine University of Liverpool Block A: Waterhouse Buildings 1-5 Brownlow Street Liverpool L69 3GL Tel. +44 (0)151 795 5414 M: +44 (0)

Re: [R] Assigning a factor to a data frame

2014-01-27 Thread arun
Hi, Try: Either:  forsentest[1,] - unlist(forsen[1,]) #or forsen[] - lapply(forsen,as.character) forsentest[1,] - forsen[1,] A.K. On Monday, January 27, 2014 10:38 PM, Tjun Kiat Teo teotj...@gmail.com wrote: I created an an empty data frame this way:

[R] How do you install cran mac binaries

2014-01-27 Thread ce
Sorry if the question is stupid, how you you install mac os binaries like in : http://cran.r-project.org/bin/macosx/contrib/r-release/forecast_5.0.tgz __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] How do you install cran mac binaries

2014-01-27 Thread Henrik Bengtsson
As you install basically all CRAN packages and all OSes; install.packages(forecast) /Henrik On Mon, Jan 27, 2014 at 8:18 PM, ce zadi...@excite.com wrote: Sorry if the question is stupid, how you you install mac os binaries like in :

[R] Markov chain simulation

2014-01-27 Thread Armel KAPTUE
Hi there, I'm wonder if in R there is a way to simulate a discrete Markov chains with a specific number of occurence of state knowing the transition matrixway. For example, how to simualte a markov chain of length n with p occurences (pn) of the sate '0' for a transition matrix defined by:

[R] Arguments in functions when packaging

2014-01-27 Thread Eva Prieto Castro
Hi everybody, I have a doubt in relation with arguments in functions when packaging: Does it make sense the fact of having dots as an argument when it is the only argument?.  I mean you have a package and a function that will be used directly by the user has dots as an argument; for example: