search for: newtargetdata

Displaying 3 results from an estimated 3 matches for "newtargetdata".

Did you mean: gettargetdata
2008 Nov 05
1
How do I read a text (.csv) file to match a matrix/cross tab? (Object confusion??)
...12040 2 2 2 3 2 7 2 2 2 1 1 1 1 9012050 1 1 1 1 1 1 1 2 2 2 1 1 5 ...{More}... I'm trying to read/process it like this: > NewTargetData <- read.table("C:/Data/R/NewTarget.csv", header=TRUE, sep=",", na.strings="NA", dec=".") > NewTargetX1Sums <- as.matrix(NewTargetData) > NewTargetX2Sums <- apply(NewTargetX1Sums, 1, sum) The structures of CurrentX1Sums and NewTargetX1...
2008 Oct 30
1
Trying to "expand" some data - Newbie needs help
...to the "ID". How do I do this correctly? I expected CurrentX2Sums (and NewTargetX2Sums) to print in column form. How do I 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 adv...
2008 Oct 31
0
Why are these different?
...ms does? Why does NewTargetX1Sums have dots in the label spaces? Do I have the right data organization for my problem? What I've done: > SurveyData <- read.spss("C:/Data/R/orange_delivery.sav", use.value.labels=TRUE, max.value.labels=Inf, to.data.frame=TRUE) > NewTargetData <- read.table("C:/Data/R/NewTarget.csv", header=TRUE, sep=",", na.strings="NA", dec=".") > > CurrentX1Sums <- as.matrix(xtabs(~tripid_nu+lineon, data=SurveyData)) > CurrentX2Sums <- apply(CurrentX1Sums, 1, sum) > NewTargetX1Sums &l...