search for: jm540

Displaying 9 results from an estimated 9 matches for "jm540".

Did you mean: jm140
2007 Sep 22
1
reshape() to wide with varying number of responses to fields
Hello, I have a dataframe containing the following variables: PID, Field, Value Where PID refers to a unique individual, Field to a particular question, and Value to a particular response to a question. I?d like this in wide format, with a different row for each PID. However.... there are differing numbers of Values associated with each Field, for each PID. For example, a Field question may
2006 Nov 06
7
Colour-coded Editor for R Code
Do any of you know any simple programming editors for R scripts which offer basic colour-coding and bracket-matching facilities? Dregging through scripts to find a missing comma or parentheses is something I'd rather do less of... Jon Minton [[alternative HTML version deleted]]
2006 Oct 31
2
R crashing during batch file formatting
Hi R users: I have the British Household Panel Survey (BHPS) in .tab format. I want to feed it through the Amelia package (which will be an ‘interesting’ job in itself).. But first I need to convert the various types of missing value (from about -9 to -1) to a more generic ‘NA’ code. I’ve written the following function to do this: BHPS.converter <-
2006 Aug 28
2
regex scares me
Hi, apologies if this is too simple but I've been stuck on the following for a while: I have a vector of strings: filenames with a name before the extension and a variety of possible extensions I want to select only those files with: 1) a ".tab" extension AND 2) the character sequence "lad" anywhere in the name of the file before the extension. Surely this
2006 Nov 01
1
Measuring the effects of history on event probabilities
This is probably very simple but my brain has frozen over. (I'm trying to warm it with coffee) I have observations of around 22000 individuals over 13 successive years: they were either 'interviewed' at time t or 'not interviewed'. What's the most appropriate function/approach to use to find out the extent to which individuals' event outcomes are temporally
2006 Nov 04
2
Equivalent to Stata command
Hi: Do any of you know if there's an equivalent function to the Stata command: Use v1 v3 v5 v2 v7 using file.dat In R? (i.e. something that just selectively loads certain variables from a file and not others)? Thanks Jon Minton [[alternative HTML version deleted]]
2007 Apr 23
1
automating merging operations from multiple dataframes
Hi, I have a set of dataframes names AINDSLIM, BINDSLIM, CINDSLIM ... NINDSLIM In each dataframe I want to extract two variables, “pid” and “{w}region”, where {w} means “a”, “b”, “c”, ...”n” At the moment my code looks like: > PidRegion <- data.frame(pid=XWAVEID$pid) > this.region <- AINDSLIM[,c("pid", "aregion")] > PidRegion <- merge(PidRegion,
2006 Aug 23
1
3d timeseries dataframe
Hi, I'm new to R so this might be a little basic for enlightened people like yourselves... I have quarterly British Labour Force Survey (Local Area) data from 1992 to present in .tab format* in folders running from 01 (for the first time period) to 56 (for the most recent). i.e. my directory structure is: .../t/ 01 ... 56
2006 Sep 13
7
inserting columns in the middle of a dataframe
Dear R users: Is there a built-in and simple way to insert new columns after other columns in a dataframe? I.e. currently I have: V1 V2 V3 V4 [1,] [2,] Etc. But I want V1 V5 V2 V3 V4 [1,] [2,] Etc. Can this be done in one line? Jon Minton [[alternative HTML version deleted]]