search for: surveydata

Displaying 18 results from an estimated 18 matches for "surveydata".

2008 Nov 07
2
Faster way to combine data sets with different date ranges
I am trying to combine two data sets, one with daily values and one with weekly values.  SurveyData conatins environmental data collected on a daily basis.  sat.data contains satellite sea surface temperature that is an average of satellite measurements over a six day period.  I would like to combine the two files so that my output file has the daily dates from SurveyData and the weekly average f...
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 Woodman Valley College...
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, direction_ == "...
2008 Oct 30
1
Trying to "expand" some data - Newbie needs help
...d 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 advance. All the gory details: > sessionInfo()...
2008 Aug 18
1
Survey Design / Rake questions
...y call to svydesign correct? I'm not sure I understand just what a "survey design" is. Where can I read up on this? What's a good reference for such things as "PSUs", "cluster sampling", and so on. I've tried the following code, which fails: > 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_) > SurveyDat...
2009 Feb 06
0
Comparing weighted histograms?
...one cross-hatched right and the other cross-hatched left. Do I need to pretend this is a survey and the "percentages' are survey weights? How is such a svydesign formed? Thanks in advance. PS I can plot a single unweighted histogram as follows: > > SurveyData <- read.table("C:/Data/R/RADAMdata2.csv", header=TRUE, sep=",", na.strings="NA", dec=".", strip.white=TRUE) > MyX <- c(0,5,10,15,20,30,40,50,60,120) > hist(SurveyData$Miles2LAX, breaks = MyX, + include.lowest = TRUE, right = TRUE, +...
2009 Feb 07
0
Problems with svyhist
...e to get a single plot out, but I need to put two distributions in the same graphic to visually compare them. 2) I get uniform breaks at intervals of 10. I can plot the unweighted data using MyBreaks with hist as shown in the second code snippet ###################################### SurveyData <- read.table("C:/Data/R/RADAMdata2.csv", header=TRUE, sep=",", na.strings="NA", dec=".", strip.white=TRUE) DsnRADAM <- svydesign(id = ~RADAM.TAZ, weights = ~RADAM2005Pct, data = SurveyData) DsnLAWA <- svydesign(id = ~RADAM.TAZ, weights = ~LAWA...
2008 Oct 22
0
newbie Syntax questions: Re-Calculating expansion factors
...at {schematically} it may look something like this: TargetX1Sums <- ##{read an external file of totals for tripid_nu/lineon, How should I format the data?? Dataframe or matrix??}## TargetX2Sums <- xtabs(~tripid_nu, data= TargetX1Sums) InitX1Sums <- xtabs(~tripid_nu+lineon, data=SurveyData) SurveyData$NewX1= ##{some formulation of TargetX1Sums/InitX1Sums, selecting by tripid_nu/lineon }## InitX2Sums <- xtabs(NewX1~tripid_nu, data=SurveyData) SurveyData$NewX2= ##{some formulation of TargetX2Sums/InitX2Sums selecting by tripid_nu }## Am I thinking of this correctl...
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] Th...
2009 Nov 22
2
how to read BRFSS file
hello, I am trying to do exploratory factor analysis with BRFSS dataset ( http://www.cdc.gov/brfss/technical_infodata/surveydata/2008.htm) for a couple of days, but I was not able to do that and got frustrated. Can anybody help me with step by step guide? BRFSS dataset provides ASCII or SAS format. Thank you. chloe [[alternative HTML version deleted]]
2008 Jun 17
1
read.spss {foreign} doesn't work over network?
...e over my network. If I copy it to my local C:/ drive I can read it. I saved the command (in a "crib sheet" text file) in order to avoid all the typing, so I'm pretty sure I've done it before. I verified that the file I'm trying to read is OK. This is what happens: > SurveyData <- read.spss("P:/Jobs/6015.Orange.Rapid.Survey/SurveyData/4.ProcessedData/D elivery4/mrb_delivery.sav", use.value.labels=TRUE, max.value.labels=Inf, to.data.frame=TRUE) Error in read.spss("P:/Jobs/6015.Orange.Rapid.Survey/SurveyData/4.ProcessedData/D elivery4/mrb_delivery.sav&quo...
2017 Sep 01
4
Consejo
Estimados miembros de la comunidad de R Me gustaria conocer dado que estoy trabajando con datos del World Values Survey, y tengo que recodificar variables y manipularlas, por donde podria empezar a estudiar el uso de R en grandes surveys. Que podria comenzar a la leer. Su respuesta sera bienvenida saludos Antonio -- Member, Editorial Committee, *The Economic and Labour Relations Review* (a
2003 Feb 11
2
Periods instead of spaces in dataframe names?
Basic question: when I use names() to extract the name of a dataframe element, why does it have "." instead of " " between words? Context: I'm importing a CSV file of survey results for analysis. I read them like this: df <- read.csv("surveydata.csv",nrows=40,header=TRUE, na.string=c("N/A",""),comment.char="",strip.white=TRUE) To do a summary of the responses to a question, I can now do something like this: table(df[13]) 1 2 3 4 13 13 4 2 and can then do a barplot with: barplot(ta...
2013 May 27
0
Variable labels in a data.frame
...misc, texreg, xtable). Part of the lack of support could be that variable labels are not handled automatically by the data.frame functions. Support has been added by subsequent packages but they differ in implementation. Hmisc and memisc attach the labels individually to the variables. Foreign and surveydata attach the labels all together to the dataframe. I thank those package authors for tackling this issue as R lags behind other software in this regard (Stata for example supports multiple sets of labels for different languages). This diversity, though, discourages other package writers from adding s...
2013 Mar 04
3
What package can I use to help me categorize comment responses?
Hi, We have comment questions from a survey that we need to categorize. What package and functions can I use in R to help do this? Daniel Lopez Lawrence Livermore Labs SHRM [[alternative HTML version deleted]]
2013 Oct 09
1
muestreo
Se quiere hacer una encuesta de actitudes a una población de 45000 personas, quisiera me sugirieran un script adecuado , he revisado algunos en epicalc, pero no encuentro la respuesta adecuada (prevalencia 0,5, error 5%) -- Este mensaje le ha llegado mediante el servicio de correo electronico que ofrece Infomed para respaldar el cumplimiento de las misiones del Sistema Nacional de Salud.
2016 Feb 11
2
inconsistency in treatment of USE.NAMES argument
...264 /surveillance/R/twinSIR_profile.R:229 /surveillance/R/twinSIR_simulation.R:284 /surveillance/R/twinSIR_simulation.R:288 /surveillance/R/twinstim.R:212 /surveillance/R/twinstim.R:553 /surveillance/R/twinstim_epitest.R:188 /surveillance/R/twinstim_helper.R:139 /surveillance/R/twinstim_siaf.R:176 /surveydata/R/questions.R:164 /sweidnumbr/R/luhn_algo.R:75 /sweidnumbr/R/oin.R:104 /sweidnumbr/R/oin.R:134 /sweidnumbr/R/pin.R:202 /sweidnumbr/R/pin.R:440 /taxize/R/gni_parse.R:29 /taxize/inst/ignore/taxonclass.R:117 /taxize/inst/ignore/taxonclass2.R:157 /testthat/R/utils.r:13 /textreuse/R/TextReuseCorpus.R:13...
2016 Feb 08
2
inconsistency in treatment of USE.NAMES argument
Hi, Both vapply() and sapply() support the 'USE.NAMES' argument. According to the man page: USE.NAMES: logical; if ?TRUE? and if ?X? is character, use ?X? as ?names? for the result unless it had names already. But if 'X' has names already and 'USE.NAMES' is FALSE, it's not clear what will happen to the names. Are they going to propagate to the result