Re: [R] include

2018-02-23 Thread Jim Lemon
Hi Val, Try this: preval<-data.frame(Col1=unique(unlist(mydat[,c("Col2","col3")]))[-1], Col2=NA,col3=NA) rbind(preval,mydat) Jim On Sat, Feb 24, 2018 at 3:34 PM, Val wrote: > Hi All, > > I am reading a file as follow, > > mydat <- read.table(textConnection("Col1 Col2 col3

[R] include

2018-02-23 Thread Val
Hi All, I am reading a file as follow, mydat <- read.table(textConnection("Col1 Col2 col3 Z2 NA NA Z3 X1 NA Z4 Y1 W1"),header = TRUE) 1. "NA" are missing should be replace by 0 2. value that are in COl2 and Col3 should be included in col1 before they appear in col2 and col3. So the output

Re: [R] change location of temporary files

2018-02-23 Thread Sariya, Sanjeev
You can set this in script as: library("unixtools ") set.tempdir("/home/path_to_dir/temp_dir/") -- Sanjeev -Original Message- From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Kumar Mainali Sent: Friday, February 23, 2018 1:53 PM To: R Help Subject:

Re: [R] change location of temporary files

2018-02-23 Thread Henrik Bengtsson
On Fri, Feb 23, 2018 at 1:55 PM, William Dunlap via R-help wrote: > Does setting the environment variable TMPDIR, before starting R, > to a directory on a bigger file system help? On Linux I get > > % mkdir /tmp/RTMP-BILL > % env TMPDIR=/tmp/RTMP-BILL R --quiet

Re: [R] change location of temporary files

2018-02-23 Thread William Dunlap via R-help
Does setting the environment variable TMPDIR, before starting R, to a directory on a bigger file system help? On Linux I get % mkdir /tmp/RTMP-BILL % env TMPDIR=/tmp/RTMP-BILL R --quiet --vanilla > tempdir() [1] "/tmp/RTMP-BILL/Rtmppgowz4" > tempfile() [1]

Re: [R] change location of temporary files

2018-02-23 Thread Hasan Diwan
Kumar, tempfile has a dir parameter that you can use to designate the directory the file will be created in.-- H On 23 February 2018 at 10:52, Kumar Mainali wrote: > I would like to change where R stores the temporary files to my external > hard drive in my iMac. This is

[R] change location of temporary files

2018-02-23 Thread Kumar Mainali
I would like to change where R stores the temporary files to my external hard drive in my iMac. This is important because the temporary files R creates are huge and I do not have enough available space in my internal HD. Again, this is for macOS. This change has to be temporary. Later I need to

Re: [R] Aggregate over multiple and unequal column length data frames

2018-02-23 Thread PIKAL Petr
Hi Your example is rather confusing - partly because HTML formating, partly because weird coding. You probably could concatenate your data frames e.g. by rbind or merge and after that you could try to aggregate them somehow. I could construct example data.frames myself but most probably they

[R] Quantile regression with some parameters fixed across tau..

2018-02-23 Thread Mark R Payne
Hi, I would like to fit the following model with quantile regression: y ~ alpha + beta where both alpha and beta are factors. The conceptual model I have in my head is that alpha is a constant set of values, that should be independent of the quantile, tau and that all of the variability arises

Re: [R] How to Save the residuals of an LM object greater or less than a certin value to an R object?

2018-02-23 Thread Peter Dalgaard
Also, which( abs( stdresiduals ) > 2.5 ) will tell you which of the standardized residuals are bigger than 2.5 in absolute value. It returns a vector of indices, as in > set.seed(1234) > x <- rnorm(100) > which (abs(x) > 2.5) [1] 62 > x[62] [1] 2.548991 -pd > On 23 Feb 2018, at 05:56 , Jeff

Re: [R] Problem with geterrmessage()

2018-02-23 Thread Martin Maechler
> Dennis Fisher > on Thu, 22 Feb 2018 13:01:37 -0800 writes: > Luke > Thanks — I revised the code to: > ERRORMESSAGE <- try(source(USERSCRIPTFILE, local=T), silent=T) > print(ERRORMESSAGE) now returns: > $value > [1] 0 > $visible

[R-es] Falta de datos en R

2018-02-23 Thread Juan Bautista
Hola a todos: Cuando en un experimento hay datos perdidos, cuando trabajaba en SAS en lugar de anova usaba GLM. En R ... también puedo usar el proc GLM ?? También estima los datos perdidos y te permite hacer el análisis de varianza ?? Y la segunda opción ... ¿Hay algún procedimiento en "R"