That simple code works for me as well, but for some reason my actual code
still isn't working. Here is exactly what I'm doing:
- The code for importing my data is:
/Bridges = read.csv(file = "C:/R/Bridges.RData.csv", head=TRUE, sep=",")/
- Within my group of highway bridges, I have defined a su
Wow, sometimes writing it all out does really help to see the issue. I now
see that I need to run the "log" command before splitting my data into a
subset, or it won't see the newly created variable.
My code now runs without issue. Thanks for everyone who took the time to
read this and/or help. I
Steve,
I tried to replicate your error, but couldn't do it. The code below works
just fine for me. Does it for you?
# create an example data frame
Bridges <- data.frame(CONDITION=1:5, TRAFFIC=rnorm(5), WEATHER=rnorm(5))
# create new variable "LOG_COND"
Bridges$LOG_COND = log(Bridges$CONDITION
Hello, I have question about referencing a variable that I created in a
dataframe, and I am hoping the experts on here can be of assistance. I have
a dataset of highway bridges with approximately 10,000 observations. I
imported these into R in the form of a dataframe called "Bridges".
I am interes
4 matches
Mail list logo