search for: nacount

Displaying 5 results from an estimated 5 matches for "nacount".

Did you mean: acount
2006 May 20
1
merge problem... extra lines appear in the presence of NAs
Good morning! I've searched the docs etc... Am I doing something wrong or is this a bug? I'm doing a merge of two dataframes and getting extra rows in the resulting dataframe - the dataframes being merged might have NAs... count <- 10 nacount <- 3 a1 <- as.data.frame(as.Date("2005-06-01")+0:(count-1)) names(a1) <- "mdate" a1$value <- runif(count) a1[floor(runif(nacount)*count),]$value <- NA a2 <- as.data.frame(as.Date("2005-06-01")+0:(count-1)) names(a2) <- "mdate" a2$value2...
2006 Mar 08
1
info() function?
I would like to have some function for getting an overview of the variables in a worksheet. Class, dimesions, length, number of missing values,... Guess it wouldn't be that hard to set up such a function, but I guess there are others who have made it already. Or is it already a standard feature in the base package? Any suggestions? Robert
2010 Jan 15
2
How to delete matrix rows based on NA frequency?
Hi all, I would like to remove rows from a matrix, based on the frequency of missing values. If there are more than 10 % missing values, the row should be deleted. I use the following to calculate the frequencies, thereby getting a new matrix with the frequencies: freqNA=rowMeans(is.na(exprdata)) But is there a shorter way to remove the rows based on "(1-freqNA)>0.1"
2006 May 22
1
win2k memory problem with merge()'ing repeatedly (long email)
...39;ve been trying to pin down this problem for two weeks and I just gave up... The following works fine as I'd expect with minimal memory usage... for (i in 3:67) { datelist <- as.Date(start.date)+0:(count-1) #remove a couple of elements... datelist <- datelist[-(floor(runif(nacount)*count))] a2 <- as.data.frame(datelist) names(a2) <- "mdate" vname <- paste("value", i, sep="") a2[vname] <- runif(length(datelist)) #a2[floor(runif(nacount)*count), vname] <- NA # atot <- merge(atot,a2,all=T) i <- 2...
2006 Mar 08
0
survival
...list 2 488 5 object function NULL 864 6 row character 1 72 7 USArrests data.frame c(50,4) 4076 8 VADeaths matrix c(5,4) 824 9 value character 1 72 with NA counts: >naCount <- function(x, ...) ifelse(is.vector(x), sum(is.na(x)), NA) >properties <- c("data.class", "dimension", "object.size", "naCount") ll(properties=properties) member data.class dimension object.size 1 a numeric 1000 4...