search for: tp2220663p2221052

Displaying 1 result from an estimated 1 matches for "tp2220663p2221052".

2010 May 17
3
Create counter variable for subsets without a loop
Hi all, I am looking to create a rank variable based on a continuous variable for subsets of the data. For example, for an R integrated data set about US states this is how a loop could create what I want: ### Example with loop data <- cbind(state.region,as.data.frame(state.x77))[,1:2] # choosing a subset of the data data <- data[order(data$state.region, 1/data$Population),] #