search for: winsorised

Displaying 2 results from an estimated 2 matches for "winsorised".

2012 Nov 14
1
Winsorisation function
Dear all, someone can find what I doing wrong with the following function. It is for winsorisation mean. At my eyes it is ok, but for reason I sometimes it is changing the results when I change the k value. wmean <- function (x, na.rm = FALSE, k = 1) { if (any(i.na <- is.na(x))) { if (na.rm) x <- x[!i.na] else return(NA) } n
2009 Mar 15
1
Stuck on building a package
...ckage 'ansecon' ... ** R ** preparing package for lazy loading Loading required package: zoo Attaching package: 'zoo' The following object(s) are masked from package:base : as.Date.numeric Error in parse(n = -1, file = file) : unexpected end of input at 63: ft=winsorised.left, winsorised.right=winsorised.right) 64: } Calls: <Anonymous> -> code2LazyLoadDB -> sys.source -> parse Execution halted ERROR: lazy loading failed for package 'ansecon' ** Removing '/Users/ajayshah/L/R/packages/ansecon.Rcheck/ansecon' -- Ajay Shah...