Hello,
I have a data.frame (below) containing the two fields of "Value" and "Signal"
and I would need to create the third field of "To_Be_Produced". The condition
for producing the third field is to carry the 1 in the "Signal" field down
until "Value" is below 40.
Do I have to create a for-loop
14-01-09 0.00 0.00 0.00 0.00 0.00
> 10 2014-01-10 0.00 0.00 1.68 0.98 0.00
> 11 2014-01-11 0.43 0.00 1.98 1.46 0.00
> 12 2014-01-12 1.51 0.78 1.63 0.46 1.84
> 13 2014-01-13 0.26 0.34 0.34 0.97 1.13
>
> David C
>
> -Original Message-
> From: Pooya Lalehzari
PM
To: Pooya Lalehzari
Cc: R help
Subject: RE: [R] Conditional Data Manipulation -Cumulative Product
More clear to read, but this is much easier to load into R. Then adding
StartSignals$Date <- as.Date(StartSignals$Date, "%m/%d/%Y") MainData$Date <-
as.Date(MainData$Date, "%
I noticed the data samples did not come out legible in the original email. Here
is the original email with data as plain text that should make it more legible.
Hello,
I have three datasets StartSignals, MainData, StopSignals and need to compound
the data for each variable in
Hello,
I have three datasets StartSignals, MainData, StopSignals and need to compound
the data for each variable in MainData over dates that fall between the Start
and Stop signals. (Stop signals are common and the same to all X1:X5
variables). Please see sample below:
The one way I was thinking
Hello,
I have a simple Data table like below:
> Data
V1 V2
1 1 3
2 5 4
And I like to apply a switch to all the values of the table.
Exp for one value:
switch(as.character(Data[2,1]),
"1"="One",
"2"="Two",
"3"="Three",
"4"="Four",
"5"="Five"
)
What would b
Hello,
I noticed an unexpected behavior when using the xts object and I was wondering
if anyone knows why that happens. I have a code to create a new column and copy
one of the columns to the new column (please see below):
library(xts)
df = data.frame(stringsAsFactors=FALSE)
df[1:3,"date"] = c("
That is great!
Thank you so much.
-Original Message-
From: arun [mailto:smartpink...@yahoo.com]
Sent: Thursday, August 15, 2013 5:29 PM
To: Ista Zahn
Cc: Pooya Lalehzari; R help
Subject: Re: [R] How can I create a data.table with 1000 variables
(Var1:Var1000)
Just to add:
You could
-
From: arun [mailto:smartpink...@yahoo.com]
Sent: Thursday, August 15, 2013 5:04 PM
To: Pooya Lalehzari
Subject: Re: [R] How can I create a data.table with 1000 variables
(Var1:Var1000)
This question is still not clear. Could you show a reproducible example as to
what you want? In the title
Sorry. data.table or even data.frame (as they are related). My question is, if
there is a short form to refer to all 1000 of them similar to what exists in
SAS.
Thank you,
Pooya Lalehzari.
-Original Message-
From: Bert Gunter [mailto:gunter.ber...@gene.com]
Sent: Thursday, August 15
Hello everyone,
How can I create a data_table with 1000 variables (Var1:Var1000)?
Thank you,
Pooya Lalehzari
THIS E-MAIL IS FOR THE SOLE USE OF THE INTENDED RECIPIENT(S) AND MAY CONTAIN
CONFIDENTIAL AND PRIVILEGED INFORMATION.ANY UNAUTHORIZED REVIEW, USE, DISCLOSURE
OR DISTRIBUTION IS
removed everything.
Thanks again,
Pooya.
-Original Message-
From: David Winsemius [mailto:dwinsem...@comcast.net]
Sent: Monday, July 08, 2013 4:26 PM
To: Pooya Lalehzari
Cc: r-help@r-project.org
Subject: Re: [R] xts zoo "cannot remove prior installation of package"
On Jul 8, 2013
Hello,
Some how, my xts/zoo package ran into trouble. I tried to re-install the
packages, I get an error that it cannot remove the prior installation.
I uninstalled R and the deleted all the libraries and reinstalled everything
fresh. It still complains the same thing. I try to remove.packages("z
Hello,
If I use set.seed(x) to set a seed for the random number generator, how can I
undo that to revert a random output every time I run my code?
Thanks,
Pooya.
THIS E-MAIL IS FOR THE SOLE USE OF THE INTENDED
RECIPIENT(S) AND MAY CONTAIN CONFIDENTIAL AND
PRIVILEGED INFORMATION.
ANY UNAUTHORI
Hello,
When I use "apply" on a data frame, it seems like I get an error when I have a
column that is not numeric. Via trial and error I realized that if I remove
that column, I can get it to run. Is there a better way to tell the function
not to worry about the character columns, especially sinc
15 matches
Mail list logo