Displaying 4 results from an estimated 4 matches for "direction_".
Did you mean:
direction
2008 Aug 14
2
Simple (?) subset problem
I can't figure out the syntax I need to get subset to work. I'm trying
to split my dataframe into two parts. I'm sure this is a simple issue,
but I'm stumped. I either get all or none of the original "rows".
> XTTable <- xtabs( ~ direction_ , SurveyData)
> XTTable
direction_
EASTBOUND
345
WESTBOUND
307
> EBSurvey <- subset(SurveyData, directi...
2008 Aug 18
1
Survey Design / Rake questions
...ails:
> SurveyData <- read.spss("C:/Data/R/orange_delivery.sav",
use.value.labels=TRUE, max.value.labels=Inf, to.data.frame=TRUE)
>
#=======================================================================
========
> temp <- sub(' +$', '', SurveyData$direction_)
> SurveyData$direction_ <- temp
>
#=======================================================================
========
>
SurveyData$NumStn=abs(as.numeric(SurveyData$lineon)-as.numeric(SurveyDat
a$lineoff))
> EBSurvey <- subset(SurveyData, direction_ == "EASTBOUND" )...
2008 Nov 05
1
How do I read a text (.csv) file to match a matrix/cross tab? (Object confusion??)
...> NewTargetData <- read.table("C:/Data/R/NewTarget.csv", header=TRUE,
sep=",", na.strings="NA", dec=".")
>
#-----------------------------------------------------------------------
--------
> temp <- sub(' +$', '', SurveyData$direction_) # Remove spaces
from variable names
> SurveyData$direction_ <- temp
>
#-----------------------------------------------------------------------
--------
> SurveyData$StnNum=as.numeric(SurveyData$lineon)
> CurrentX1Sums <- as.matrix(xtabs(~tripid_nu+lineon, data=SurveyDat...
2008 Oct 30
1
Trying to "expand" some data - Newbie needs help
...a <- read.table("C:/Data/R/NewTarget.csv", header=TRUE,
sep=",", na.strings="NA", dec=".", strip.white=TRUE)
>
#-----------------------------------------------------------------------
--------
> temp <- sub(' +$', '', SurveyData$direction_) # Remove spaces
from variable names
> SurveyData$direction_ <- temp
>
#-----------------------------------------------------------------------
--------
> SurveyData$StnNum=as.numeric(SurveyData$lineon)
> CurrentX1Sums <- as.matrix(xtabs(~tripid_nu+lineon, data=SurveyDat...