[R] Getting more results from lda (MASS)

2011-07-25 Thread Stephen T
Hello, I am using linear discriminant analysis (lda) from the MASS library to classify data in two classes. 1. How do I get the full LDA model? The function lda reports coefficients but not the constant term? Currently I run the linear model function lm on the LDA scores and variables to find

[R] (no subject)

2011-03-08 Thread Stephen T.
Hi, I am exporting an HDF5 file from Matlab (hdf5write function). It contains several datasets: one scalar, one vectory, one 2-D array, and one 3-D array. The hdf5read() function in the hdf5 library seems to load everything except the 3-D array. There are no errors reported even with

[R] removing margin space between columns in lattice plots

2010-10-23 Thread Stephen T.
Hi list, From the xyplot() documentation I'm guessing this may not be possible, but is there a way to specify a scale definition something between relation=free and relation=same such that the scales are fixed across rows and column margins are removed for a M x N conditioning plot (sort of

[R] large files produced from image plots?

2010-09-08 Thread Stephen T.
Hi list, I wonder if anyone has thoughts on making image plots in R [using image() or image.plot(), or filled.contour()]- I've made quite a bit now, but they seem quite large in size when exported to pdf file format (even after compressing with pdftk or ghostscript, which I regularly do). I

Re: [R] large files produced from image plots?

2010-09-08 Thread Stephen T.
files produced from image plots? From: baptiste.aug...@googlemail.com Date: Wed, 8 Sep 2010 19:41:46 +0200 CC: r-help@r-project.org To: obsessiv...@hotmail.com Hi, Have you tried the recent rasterImage() function? HTH, baptiste On Sep 8, 2010, at 7:30 PM, Stephen T. wrote

Re: [R] list of closures

2010-08-26 Thread Stephen T.
at 12:04 AM, Stephen T. obsessiv...@hotmail.com wrote: Hi, I wanted to create a list of closures. When I use Map(), mapply(), lapply(), etc., to create this list, it appears that the wrong arguments are being passed to the main function. For example: Main function: adder - function(x

Re: [R] list of closures

2010-08-26 Thread Stephen T.
Hi Philippe, thanks for the suggestion - for my smaller problems I find that closures are quicker to define and deploy. At larger scales, I've implemented S4 objects with methods and attributes - though while elegant, I find that OO (apart from what's built-in) adds significant biolerplate in

[R] list of closures

2010-08-25 Thread Stephen T.
Hi, I wanted to create a list of closures. When I use Map(), mapply(), lapply(), etc., to create this list, it appears that the wrong arguments are being passed to the main function. For example: Main function: adder - function(x) function(y) x + y Creating list of closures with Map(): plus -

[R] drop unused levels in lattice dotplot axis?

2010-08-24 Thread Stephen T.
Hi list, I have a data set - something like this dfr - data.frame(A=factor(letters[1:25]),B=runif(25), C=sample(LETTERS[1:4],25,replace=TRUE)) and I want to create a dotplot: library(lattice)dotplot(A ~ B | C, data=dfr, scales=list(y=list(relation=free))) but this puts uneven

Re: [R] drop unused levels in lattice dotplot axis?

2010-08-24 Thread Stephen T.
:25 AM, Stephen T. obsessiv...@hotmail.com wrote: Hi list, I have a data set - something like this dfr - data.frame(A=factor(letters[1:25]),B=runif(25), C=sample(LETTERS[1:4],25,replace=TRUE)) and I want to create a dotplot: library(lattice)dotplot(A ~ B | C, data=dfr