On Feb 8, 2012, at 12:23 AM, Sebastián Daza wrote:
Hi everyone,
I would like to have a function to compute some values in a dataset.
First, I have to define a value for the lx variable in row 1 (e.g.,
100,000), npx is a given proportion. lx of row 2 is equal to lx of row
1 times npx of row 1. I
On 08-02-2012, at 06:23, Sebastián Daza wrote:
> Hi everyone,
> I would like to have a function to compute some values in a dataset.
> First, I have to define a value for the lx variable in row 1 (e.g.,
> 100,000), npx is a given proportion. lx of row 2 is equal to lx of row
> 1 times npx of row
Hi everyone,
I would like to have a function to compute some values in a dataset.
First, I have to define a value for the lx variable in row 1 (e.g.,
100,000), npx is a given proportion. lx of row 2 is equal to lx of row
1 times npx of row 1. I can do this row by row...
data[1,"lx"] <- 10
dat
> I want to draw a subset of "ex" by selecting only the A and B units:
>
> > ex1 <- subset(ex[which(ex$id=="A"|ex$id=="B"),])
or a bit simpler:
ex1 <- subset(ex, ex$id %in% c('A','B'))
In your expresion you don't need the subset function, as you are already
using indexing to extract the desired
Hi all,
I have a data management question. I am using an panel dataset read into
R as a dataframe, call it "ex". The variables in "ex" are: id year x
id: a character string which identifies the unit
year: identifies the time period
x: the variable of interest (which might contain NAs).
Here
5 matches
Mail list logo