search for: tripid_nu

Displaying 4 results from an estimated 4 matches for "tripid_nu".

2008 Nov 05
1
How do I read a text (.csv) file to match a matrix/cross tab? (Object confusion??)
I'm having a problem reading data to set control totals for a dataframe. I want to adjust a dataframe based on a 2-d table of values, which I get by using : > CurrentX1Sums <- as.matrix(xtabs(~tripid_nu+lineon, data=SurveyData)) > CurrentX2Sums <- apply(CurrentX1Sums, 1, sum) I've created a .csv file with new (target) sums that looks like this: tripid_nu Warner Center De Soto Pierce College Tampa Reseda Balboa Woodley Sepulveda Van Nuys Woo...
2008 Oct 22
0
newbie Syntax questions: Re-Calculating expansion factors
I have a dataframe with many hundreds of survey records containing: tripid_nu, lineon, MuchOtherData, X1, X2, X3, X4 tripid_nu = identifier for each "Trip" {E.g. for EB MTA-901 leaving the first stop at 07:24} lineon = identifier for each of the stop locations Where X1 is the ratio (for each trip/stop combination) of some target number to...
2008 Oct 31
0
Why are these different?
I want to import some "target values" to normalize elements of a dataframe. I'm summarizing the existing totals using as.matrix(xtabs(~tripid_nu+lineon, data=SurveyData)) and reading a .csv table of target values. I can't even get them to list out as similar data items. My idea is to do something like this, but I don't know how to do it in R SurveyData$X1 = NewTargetX1Sums[Trip,Stop] / CurrentX1Sums[Trip,Stop...
2008 Oct 30
1
Trying to "expand" some data - Newbie needs help
...make it do so? t(CurrentX2Sums) doesn't seem to do the trick. How do I avoid getting e.g. "De.Soto" when I read "De Soto" into NewTargetData? How do I put this back into my dataframe? SurveyData$NewX1 = NewTargetX1Sums/CurrentX1Sums but how do I specify (tripid_nu lineon) the indices? If I'm only a ?LookHere or ??LookThere away I'd appreciate being pointed in the right direction. Thanks in advance. All the gory details: > sessionInfo() # List loaded packages R version 2.8.0 (2008-10-20) i386-pc-ming...