?ifelse
Cheers,
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 Fri, Mar 24, 2017 at 8:56 PM, Val wrote:
> Hi all,
>
>
> I have
Hi all,
I have several variables in a group and one group contains three
variables. Sample of data ( Year, x1, x3 and x2)
mydat <- read.table(header=TRUE, text=' Year x1 x3 x2
Year1 10 120
Year2 0 150
Year3 0 020
Year4 25 0 12
Year5 15 25 12
Year6 0 16 14
> On Mar 24, 2017, at 10:12 AM, Qill Bel wrote:
>
> Dear R-users,
>
> Imagine I have 3 vectors:
> *proc1<-0*
> *proc2<-0*
> *cpd<-c("proc1","proc2")*
The `cpd` vector has only character values in it, and has no relation to either
the `proc1` or `proc2` vectors. If you want
Hi,
In a folder , there are multiple compressed (zip+tar) files. Each of compressed
file can have multiple layer of compression (compressed file inside the
compressed file and so on).
Can anyone suggest, is there any way to decompress all the files in a single
directory ?
Tanvir Ahamed
Dear R-users,
Imagine I have 3 vectors:
*proc1<-0*
*proc2<-0*
*cpd<-c("proc1","proc2")*
How can I change the value of proc1 to 1, based on vector cpd only?
I tried with *as.factor(cpd[1])<-1*, but it produces an error.
Any idea how could I achieve that?
[[alternative HTML version
... and I should have added:
It is a specific instance of how ?match.arg works .
Cheers,
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 Fri, Mar 24,
Follow the "type.convert" link in the numerals section of ?read.table.
That's what it's there for.
-- 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
Those are the available options, not the defaults. If you follow the
chain to ?type.convert as the help for read.table suggests, you will
learn that "allow.loss" is the default value. The help for
type.convert also explains what each option means.
Sarah
On Fri, Mar 24, 2017 at 2:55 PM, Ramnik
Hi,
The help file for function read.table mentions the default value for the
argument numerals as
c("allow.loss", "warn.loss", "no.loss")
How are the three values used as default values ?
Thanks
Ramnik
[[alternative HTML version deleted]]
R for Windows is a bit peculiar where it locates your .Rprofile file,
or rather what it consider to be your home directory. If you look
from within R, the file you do want to create / edit is:
> f <- normalizePath("~/.Rprofile", mustWork = FALSE)
> f
[1] "C:\\Users\\joe\\Documents\\.Rprofile"
Inline.
Cheers,
Bert
On Fri, Mar 24, 2017 at 2:36 AM, Bruce Ratner PhD wrote:
> Henrico:
> Thanks for quick reply.
> However, one last question:
> If I want to change working directory, and put setwd() in the Rprofile file,
> logically R will not know where the be work
Dear Achim,
Thank you for your help, this is exactly what I needed. Your help and
didactic example is very much appreciated.
Best wishes,
Michael
On Wed, Mar 22, 2017 at 11:34 AM, Achim Zeileis
wrote:
> On Wed, 22 Mar 2017, Michael Dayan wrote:
>
> The method of
Henrico:
Thanks for quick reply.
However, one last question:
If I want to change working directory, and put setwd() in the Rprofile file,
logically R will not know where the be work directory is, correct?
So, should I install R in my preferred working directory?
Thanks again, in advance.
Bruce
Thanks very much David for your answer. Sorry ! here is the code without the
error:
library(deSolve)
param <- c(a = 0.1, b = 1)
yini <- c(alpha0 = 6, beta0 = 2)
mod <- function(times, yini, param) {
with(as.list(c(yini, param)), {
gamma0 <- ifelse(times %in% seq(0,10,1), 5, 0)
##
OP is on some variant of MSWindows, which doesn't use a Bash shell, so the
syntax of that example is a bit foreign, Enrico.
I would say that the concept of using .Rprofile to change directories is
ill-advised, since having ALL of your R work in one place is not sustainable.
However you can
Hi
Did you define function ap?
Cheers
Petr
> -Original Message-
> From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Frederic
> Ntirenganya
> Sent: Friday, March 24, 2017 1:18 PM
> To: r-help@r-project.org
> Subject: [R] Error: could not find function "ap"
>
> Dear All,
>
>
Dear All,
I hope you are doing well.
I am new in using evapotranspiration packages and got the following error:
Error: could not find function "ap"
The code I am using and data are:
dat1<-read.csv("/home/fredo/Documents/Meteo Data/Meteo Rwa
data.csv",header=T,na.string="")
On Fri, 24 Mar 2017, Bruce Ratner PhD writes:
> Henrico:
> Thanks for quick reply.
> However, one last question:
> If I want to change working directory, and put setwd() in the Rprofile
> file, logically R will not know where the be work directory is,
> correct?
>
> So, should I install R in my
There is also a package imputeTS, which may be able to do what you want.
It has a nice Introduction vignette and also appears to have nice plot
functions
Berend Hasselman
> On 24 Mar 2017, at 02:11, David Winsemius wrote:
>
> There's also an irts-package "irregular
On Thu, 23 Mar 2017, Bruce Ratner PhD writes:
> Hi R'ers:
> I would like to setting up a .Rprofile file with
> setwd("C:/R_WorkDir")
> set.seed(12345)
> options (prompt "> R ")
>
> ---
> Can you help providing the code or instructive link,
> I've find many links, but I can't figure it out?
>
>
Hi R'ers:
I would like to setting up a .Rprofile file with
setwd("C:/R_WorkDir")
set.seed(12345)
options (prompt "> R ")
---
Can you help providing the code or instructive link, I've find many links, but
I can't figure it out?
Thanks.
Bruce
__
Bruce Ratner PhD
The Significant
Please read and follow the directions at the bottom of your email.
-- 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 Thu, Mar 23, 2017 at 9:55 AM,
22 matches
Mail list logo