search for: jonqli

Displaying 6 results from an estimated 6 matches for "jonqli".

2002 Aug 30
5
density() returns a density function that does not add up to 1
Dear R users, I ran into this curious problem: > d <- rnorm(100) > d.density <- density(d) > sum( d.density$x * d.density$y) [1] 2.517502 Admittedly the method of computing the mass under the density curve at line 3 is crude. But 2.5 is pretty far from 1, the value it should be. I tried a few other dataset and got similar result. Am I missing something obvious? Or is the return
2001 Nov 15
0
the computational complexity of sample()
Hi all, I am studying R's sample() function's behaviour when we are sampling from a large vector with weights. For instance, the following code measures the time it takes to do a weighted Bootstrap sampling. >logfile <- file("/home/jonqli/nortel/logfile.txt", "at") >cat("\n", file=logfile) >cat(date(), file=logfile) >UPPER <- 1e5 >tmp <- sample(UPPER, replace=T, prob=1:UPPER) >cat(date(), file=logfile) Here is a table for the time it takes in a Pentium III with 750 M memory running Deb...
2001 Jul 17
1
scoping problem?
Hi, I wrote a dummy function that passes a dataset to tree() as the following: test.func <- function(training.data){ tr <- tree(type~., data = training.data) tr } Then I run the function under R > test.func(MyData) Error in model.frame.default(formula = type ~ ., data = training.data) : Object "training.data" not found MyData resides in the working environment, while
2001 Nov 21
1
src directory disappeared after installation of packages
Hi, I am using R on Debian Linux. I tried to install packages from inside R by calling function install.packages(), e.g., install.packages("tree"). The packages were installed successfully. However, I couldn't find the "src" subdirectory under the /usr/lib/R/library/tree directory,, which is supposed to contain the C, C++ and FORTRAIN source files, according to the
2001 Dec 05
3
trouble with R CMD INSTALL for building my own library
Hi, I have built a library that consists of a piece of C code and some R functions. To build it into a library that I can load using library() command, I have followed "Writing R Extensions" and made sub-directories such as mylib/R and mylib/src. But when I run R CMD INSTALL mylib, nothing seems to be happening with src directory, i.e., no C compiling. I have probably missed some key
2001 Dec 05
3
trouble with R CMD INSTALL for building my own library
Hi, I have built a library that consists of a piece of C code and some R functions. To build it into a library that I can load using library() command, I have followed "Writing R Extensions" and made sub-directories such as mylib/R and mylib/src. But when I run R CMD INSTALL mylib, nothing seems to be happening with src directory, i.e., no C compiling. I have probably missed some key