Displaying 20 results from an estimated 9000 matches similar to: "Faster way to combine data sets with different date ranges"
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
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
2009 Oct 09
4
Satellite ocean color palette?
Dear List,
Is there a color palette avaliable similar to what is used in satellite ocean color imagery? I.e. a gradient with blue on one end and red on the other, with yellow in the middle? I have tried topo.colors(n) but that comes out more yellow on the end. I am looking for something similar to what is found on the CoastWatch web page:
2008 Oct 30
1
Trying to "expand" some data - Newbie needs help
I want to calculate "expansion factors" for elements in my dataframe
based on a 2-d cross classification. Since I'll have "missing values"
(many combinations will have no record) I'll need a second "expansion
factor" for each "row". I've included my "work to date" below, but I'm
not very close to getting this right.
My
2008 Jun 17
1
read.spss {foreign} doesn't work over network?
I'm unable to open an SPSS file 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 <-
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]]
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,
2008 Aug 18
1
Survey Design / Rake questions
I'm trying to learn how to calibrate/postStratify/rake survey data in
preparation for a large survey effort we're about to embark upon. As a
working example, I have results from a small survey of ~650 respondents,
~90 response fields each. I'm trying to learn how to (properly?) apply
the aforementioned functions.
My data are from a bus on board survey. The expansion in the
2009 Feb 06
0
Comparing weighted histograms?
I'm trying to plot and compare weighted histograms and I can't seem find
where to start. I have data similar to this:
Miles2LAX RADAM2005Pct LAWA2005Pct
35.57 .00123 .00684
24.74 .00118 .00187
27.09 .00965 .00876
16.23 .00587 .00397
{ ...
2009 Feb 07
0
Problems with svyhist
I have two problems with svyhist. I hope this is easy, and it may be
that "simple R syntax" will do what I need.
1) I'm able 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
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 the number of records.
2009 May 22
5
Need a faster function to replace missing data
Dear List,
I need some help in coming up with a function that will take two data sets, determine if a value is missing in one, find a value in the second that was taken at about the same time, and substitute the second value in for where the first should have been. My problem is from a fish tracking study. We put acoustic tags in fish and track them for several days. Location data is supposed
2007 Nov 13
7
combine two dataframe
I have two data frame A and B adn want to cross them.
A has format as:
a1 a2 a3
1 2 3
2 3 1
1 3 2
...
B:
b1 b2
1 2
2 1
...
the combine result shall be something like
a1 a2 a3 b1 b2
1 2 3 1 2
1 2 3 2 1
2 3 1 1 2
2 3 1 2 1
1 3 2 1 2
1 3 2 2 1
....
is there a function able of doing this instead of loops?
Thanks,
Sun
2008 Jul 07
2
"installation method" (CentOS 5.2)
I'm trying to install CentOS 5.2 on a Dell PE 1850 via the DRAC 4
card, with CentOS-5.2-i386-bin-1of6.iso mounted as virtual media. At
the boot prompt, I hit <Enter>, which should start the graphical
installation, but it starts off with a text installation. I am asked
- whether I want to test the media, which I skip
- what language I want to use - I select English
- what keyboard I
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
2007 Aug 20
1
Q: combine 2 data frames with missing values
Een ingesloten tekst met niet-gespecificeerde tekenset is
van het bericht gescrubt ...
Naam: niet beschikbaar
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070820/920567a6/attachment.pl
2008 Nov 05
2
Simple rep() question duplicating times and dates.
I want to create a data.frame of time and date for a year. I started with the idea of simply producing two vectors (time and date)
The first part ( time) is easy.
rep(1:24, 365)
But how do I get a series of 24 dates for O1 January 2005 and repeat this to 31 December 2005.
It should be easy but I don't see it.
Thanks
2007 Aug 16
4
Combine matrix
Hi R user,
I am new to R, and I have a very simple question for you. I have two matrix
A and B, with internally redundant rownames (but variables are different).
Some, but not all the rownames are shared among the two matrix. I want to
create a greater matrix that combines the previuos two, and has all the
possible combinations of matching rownames lines among matrix A and B.
looking for the
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
2010 Oct 12
2
merging and working with BIG data sets. Is sqldf the best way??
Hi everyone,
I’m working with some very big datasets (each dataset has 11 million rows
and 2 columns). My first step is to merge all my individual data sets
together (I have about 20)
I’m using the following command from sqldf
data1 <- sqldf("select A.*, B.* from A inner join B
using(ID)")
But it’s taking A VERY VERY LONG TIME to merge just 2 of the datasets