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
> Z2 NA NA
> Z3 X1 NA
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
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: [R] change location of
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 --vanilla
> > tempdir()
> [
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] "/tmp/RTMP-BILL/Rtmppgowz4/f
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 important because the te
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 us
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 w
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 d
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
> 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
> [1] FALSE
> N
11 matches
Mail list logo