Re: [R] R bug when started in Windows 10

2016-08-14 Thread Daniel Nordlund
On 8/14/2016 12:57 PM, Itamar José G. Nunes wrote: Greetings, CRAN supporter. I am Itamar José, a Brazilian programmer and biotechnology student. I'm using R from some time ago, most of the time working with it in Windows 7, but since I changed to Windows 10, I'm having some bugs when R platform

Re: [R] Adding loess lines subsetting to each panel in lattice plot

2016-08-14 Thread Duncan Mackay
Hi A slightly different approach xyplot(y~x|fac, groups = ifelse(age < 40,1,2), par.settings = list(strip.background = list(col = "transparent"), superpose.symbol = list(col = c("red","blue","green")), superpose.line = list(col

Re: [R] need some help with date

2016-08-14 Thread Jeff Newmiller
Thank you for the (not quite working) example. a) your '= "character"' bit is a bit anti-productive, since on the one hand you are indicating that a default value can be used (so omitting any argument is okay) yet the default value you are specifying is invalid. b) The origin argument is rare

Re: [R] need some help with date

2016-08-14 Thread Jim Lemon
Hi Glenn, Perhaps this will help: dateCentury<-function(x,new_century=20) { xbits<-strsplit(x,"/") long_year<-function(x,new_century) { x[3]<-ifelse(as.numeric(x[3]) <= new_century, paste(20,x[3],sep=""), paste(19,x[3],sep="")) xdate<-paste(x,collapse="/") return(xdate) } newx<-as.

Re: [R] need some help with date

2016-08-14 Thread peter dalgaard
> On 15 Aug 2016, at 00:40 , Glenn Schultz wrote: > > Here is a sample of the data that I am working with. Dates may go back as > far as 1930’s. When I use as.Date() I noticed that any data < 12/31/68 > returns as the new century. So I wrote this function below to be applied to > the data

Re: [R] need some help with date

2016-08-14 Thread David Winsemius
> On Aug 14, 2016, at 3:40 PM, Glenn Schultz wrote: > > Here is a sample of the data that I am working with. Dates may go back as > far as 1930’s. When I use as.Date() I noticed that any data < 12/31/68 > returns as the new century. So I wrote this function below to be applied to > the dat

[R] need some help with date

2016-08-14 Thread Glenn Schultz
Here is a sample of the data that I am working with. Dates may go back as far as 1930’s. When I use as.Date() I noticed that any data < 12/31/68 returns as the new century. So I wrote this function below to be applied to the data which I dput below the function. If I use the function DateCen

Re: [R] R bug when started in Windows 10

2016-08-14 Thread Bert Gunter
I have cc'ed this to r-help. As I said, I am not on Windows and so cannot help directly. -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Sun, Aug 14, 20

Re: [R] question please

2016-08-14 Thread David Winsemius
> On Aug 14, 2016, at 8:43 AM, Janire Peñalba wrote: > > What is the R code for neuralnet for time series forecasting? > Page Not Found This question was removed from Cross Validated f

Re: [R] R bug when started in Windows 10

2016-08-14 Thread Bert Gunter
I'm not on Windows and cannot help directly. But you might consider downloading Rstudio ( https://www.rstudio.com/ ) and running R through that. Their website should contain the info you need to get things up and running. Cheers, Bert Bert Gunter "The trouble with having an open mind is that pe

[R] R bug when started in Windows 10

2016-08-14 Thread Itamar José G . Nunes
Greetings, CRAN supporter. I am Itamar José, a Brazilian programmer and biotechnology student. I'm using R from some time ago, most of the time working with it in Windows 7, but since I changed to Windows 10, I'm having some bugs when R platform particularly in this new operational system. If there

[R] question please

2016-08-14 Thread Janire Peñalba
What is the R code for neuralnet for time series forecasting? This question might seem very basic but I can´t seem to get the code right. I have the data for the Pound/Euro Exchange rate

Re: [R] Adding loess lines subsetting to each panel in lattice plot

2016-08-14 Thread Bert Gunter
Juan: What I gave you previously was correct, but not "nice". The subscripts = TRUE argument should have been in the xyplot() call, not the pnl function. However, it is actually not explicitly needed there either, because it will default to TRUE if the panel function has a subscripts argument, whi

Re: [R] Help with non standard evaluation and require function

2016-08-14 Thread Duncan Murdoch
On 14/08/2016 5:23 AM, Luca Cerone wrote: Hi David and Duncan, thanks for your answers! I think what is not clear to me is actually how "substitute" works. Arguments passed to R functions become a special kind of object known as a "promise". Promises contain two things: the expression to ev

Re: [R] Help with non standard evaluation and require function

2016-08-14 Thread peter dalgaard
> On 14 Aug 2016, at 11:23 , Luca Cerone wrote: > > I have no access to my laptop so I can't double check but I think in one of > Wickham's book there was an example like > > f <- function (y) { > substitute (x + y) > } > > f(4) > [1] x + 4 > > i.e. where substitute inside a function was sub

Re: [R] Help with non standard evaluation and require function

2016-08-14 Thread Luca Cerone
Hi David and Duncan, thanks for your answers! I think what is not clear to me is actually how "substitute" works. If I run require (dplyr) or require("dplyr") in the R console everything works as I expect even without the character.only=T (actually because of this I always interpreted that charac