Displaying 3 results from an estimated 3 matches for "indce".
Did you mean:
induce
2006 Feb 08
1
adding variable into dataframe by indice
...sample( c("(1,1)","(1,2)","(2,2)"),14,replace = T),
first_drink = sample(5:17,14,replace = T))
asubs112 <- subset(age.int, rs1042364 != "(2,2)")
ages112 <- sort(unique(na.omit(asubs112$first_drink)))
for ( i in ages112) {
indce <- which(na.omit(asubs112$first_drink == i))
prop <- length(indce)/nrow(asubs112)
asubs112[indce,4] <- prop
asubs112[indce,]
}
Below is the output that I get from the script above. Notice the proportion for the first NA but not any of the others. Not sure what I am doin...
2006 Feb 08
0
insert value according to indice
...that I am using to create this dataframe.
#Read in Data
age.int <- read.csv('C:/intage.csv',header = TRUE)
asubs112 <- subset(age.int, rs1042364 != "(2,2)")
ages112 <- sort(unique(na.omit(asubs112$first_drink)))
for ( i in ages112) {
indce <- which(na.omit(asubs112$first_drink == i))
prop <- length(indce)/nrow(asubs112)
asubs112[indce,5] <- prop
asubs112[indce,]
}
Below is the output that I get from the script above. Notice the proportion for the first NA but not any of the others. Not sure what I am doin...
2010 May 20
1
sqldf: issues with natural joins
Hello,
I'm having trouble discovering what's going wrong with my use of natural
joins via sqldf.
Following the instructions under 4i at http://code.google.com/p/sqldf/,
which discusses creating indices to speed joins, I have been only unreliably
able to get natural joins to work.
For example,
> Tid <- c('AES 01-01-02 10:58:00', 'AES 01-01-02 11:53:00', 'AES