search for: jcborra

Displaying 7 results from an estimated 7 matches for "jcborra".

Did you mean: jcborras
2011 Jun 28
2
A masked function is a masked function by any other name
...ve this trivial problem. The code that replicates the problem (a source code tree that realizes a R package actually) is under github so one can call it clone it easily from the command line (though more experienced users will spot the problem by browsing through the package code): git clone http://jcborras at github.com/jcborras/rseedpkg.git rseedpkg builds and installs with the usual sequence: R CMD build rseedpkg R CMD INSTALL rseedpkg_0.01-1.tar.gz Last but not least one can test it from the command line: Rscript --verbose --default-packages=testthat,log4r -e "test_package('rseedpkg...
2011 Apr 08
5
Avoiding a loop
Friends. I cannot simplify this much, and I think the loop is unavoidable. As a recovering C programmer I want to avoid loops and in cases like this I almost allways can by using an apply function. But I suspect in this case there is nothing I can do. It is a finance example where a price series is compared to a moving average. If the price goes above the average, plus a bit, buy the
2011 Apr 04
1
svd
Dear list, I searched the libraries but could not find means to compute the svd of a coupled field. Is it possible in R Thanks nuncio -- Nuncio.M Research Scientist National Center for Antarctic and Ocean research Head land Sada Vasco da Gamma Goa-403804 [[alternative HTML version deleted]]
2011 Jun 08
1
The simplest bar graph with ggplot is difficult to realize
Dear all, What is the simplest way of producing a bar graph using ggplot but avoiding calling qplot? That is, given: d <- data.frame(x=seq(1,5), y=seq(1,5)) Why does the following line return an error? ggplot(d, aes(x=x, y=y)) + stat_identity() + geom_bar(bindwidth=1) Thanks in advance, jcb!
2011 Apr 20
2
user input
Dear users, I have looked on different sources and found different functions to prompt the user to provide input. However, I couldn't find one that does exactly what I'm looking for. select.list() and menu() are nice because a graphic window appears to prompt the user. However, the user can only choose from a predefined list of choices. readline() and scan() are more free in the
2011 Mar 31
0
Is it possible to run unit tests after a package installation?
Dear all, I'm deep into Chambers' SoDA and R-exts.html but I can't find all answers. The thing is that I would like to run my unit tests right after a package installation. That is while the command "R CMD check <package_name>" runs all files named <package_name>/tests/*.R (so unit tests can be placed there) I wonder if it is possible to run them on some
2011 Apr 07
1
transform() on selective names. Is it possible?
Hi all, I am whitening my data: # code begins N <- 300 M <- 2 x <- matrix(data=rnorm(N*M, 0, 3)-10, ncol=M, nrow=N) y <- matrix(c(1,-2,-2,1), ncol=M, nrow=M) z <- data.frame(x %*% y) colnames(z) <- c('x','y') par(mfrow=c(1,3)) plot(z, pch=5, col="blue") whiten <- function(x) { (x-mean(x))/sd(x) } zz <- transform(z, x=whiten(x), y=whiten(y))