Hello,

Semi-new r user here and still learning the ropes. I am creating dummy
variables for a dataset on stock prices in r. One dummy variable is
called prev1 and is:

prev1 <- ifelse(ret1 >= .5, 1, 0)

where ret1 is the previous day's return.

The variable "prev1" is created fine and works in my regression model
and for running conditional statistics. However, when I call the
names() function on the dataset the freshly created variable (prev1)
doesn't show up; also, when I export the dataset the prev1 variable
doesn't show up in the exported file. Is there a way to make the
variable show up on both the call function but more importantly on the
exported file? Or am I forced to create dummy variables elsewhere(much
tougher)?


Thanks,

Joe

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to