Folks:
1. Ankur needs to read "An Introduction to R" or other R tutorial (on the
web, say), as it appears that he has not made much of an effort to learn
how R works. In particular, R is not a data base and does not (normally, at
user level) use pointers/references. So no automatic updating.
2. I
Hello,
What you can do is to write a function to do the change. When you want
to change a value in column Value, it will update the value in column
New. Something like this:
fun <- function(data, row, newval){
data$Value[row] <- newval
data$New <- c(NA, diff(data$Value))
Is there a way in which I can setup a model like that?
Regards,
Ankur Seth
On Sat, Sep 7, 2013 at 4:49 PM, Rui Barradas wrote:
> Hello,
>
> It will not change the value automatically, you will have to rerun the
> code.
>
> Rui Barradas
>
> Em 07-09-2013 11:52, Ankur Seth escreveu:
>
>> Thanks
Hello,
No, I don't believe so. If you change one column and want another column
to change you have to tell R to do it.
Rui Barradas
Em 07-09-2013 12:19, Ankur Seth escreveu:
Is there a way in which I can setup a model like that?
Regards,
Ankur Seth
On Sat, Sep 7, 2013 at 4:49 PM, Rui Barr
Hello,
It will not change the value automatically, you will have to rerun the code.
Rui Barradas
Em 07-09-2013 11:52, Ankur Seth escreveu:
Thanks Rui, but this does not change the value in the new column
automatically if I change the value in the data column. Any ideas?
Regards,
Ankur Seth
Thanks Rui, but this does not change the value in the new column
automatically if I change the value in the data column. Any ideas?
Regards,
Ankur Seth
On Sat, Sep 7, 2013 at 2:11 PM, Rui Barradas wrote:
> Hello,
>
> Try the following.
>
> dat <- read.table(text = "
>
> Date
Hello,
Try the following.
dat <- read.table(text = "
DateValue
08/01/2013100
08/02/2013 100.5
08/03/2013 102
", header = TRUE)
dat$New <- c(NA, diff(dat$Value))
dat
Hope this helps,
Rui B
Hello All,
I am trying to build a model in R. I am facing the following problem...
My Data Frame contains the following data...
DateValue
08/01/2013100
08/02/2013 100.5
08/03/2013 102
No
8 matches
Mail list logo