[R] One question about saving graph by using xyplot

2010-04-04 Thread Jian Zhang
Hey, folk. I am trying to get many figures by using the function xyplot in the library lattice. I tried to using the loop to finish it quickly. But I cannot open the saved file after I run the program. But if I use the function plot to get other simply figures, it can work. So I want to ask

Re: [R] One question about saving graph by using xyplot

2010-04-04 Thread Duncan Mackay
Hi Not that long ago there was this See http://tolstoy.newcastle.edu.au/R/e10/help/10/04/0003.html Duncan Duncan Mackay Department of Agronomy and Soil Science University of New England ARMIDALE NSW 2351 Email home: mac...@northnet.com.au At 16:52 4/04/2010, you wrote: Hey, folk. I am

Re: [R] compare two fingerprint images

2010-04-04 Thread Tal Galili
Hi Jim, Another thing I am wondering is - even if you have a metric for comparing two images (which I admit I didn't come across and I don't know how to approach), would that be enough to decide if two images are close or not? My guess is that no - one would also need a database of other

Re: [R] panel data

2010-04-04 Thread Tal Galili
Thanks David, I never thought of using merge for this. I usually used the cast command from the reshape package for this type of task. Cheers, Tal Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read

[R] mantel.haenszel.test for trend in S-plus doesn't work i R

2010-04-04 Thread Fredrik Lundgren
Dear R'ers, When I used S-plus i wrote a small program for a Mantel-Haenszel test for trend (I think it worked). Unfortunately I can't get it working in R. It appears as if my use of 'el' is the problem but I can't sort it out. Error in apply(array, c(, 2, 3), function(el) el * 1:s) :

[R] Adjusting X-axis time scale

2010-04-04 Thread zow...@ncst.go.ke
Dear all, I am plotting daily data from 1950 to 2000 and I wish to have the time in X-axis to indicate years and NOT days (i.e 1950 1951,..,2000 instead of 1,2, 3, ..). How do I set the x-axis to show years instead of days. ZABLONE OWITI GRADUATE STUDENT Nanjing University of

[R] Generate Numbers

2010-04-04 Thread kende jan
Hello, How can I generate randomly in R a sample of skewed data with first quartile is 540 and third quartile is 715. I need a sample of 100 cases. Thank you for your help Jan [[alternative HTML version deleted]] __

Re: [R] Adjusting X-axis time scale

2010-04-04 Thread Jim Lemon
On 04/04/2010 08:52 PM, zow...@ncst.go.ke wrote: Dear all, I am plotting daily data from 1950 to 2000 and I wish to have the time in X-axis to indicate years and NOT days (i.e 1950 1951,..,2000 instead of 1,2, 3, ..). How do I set the x-axis to show years instead of days. Hi Zablone,

Re: [R] Generate Numbers

2010-04-04 Thread Bernardo Rangel Tura
On Sun, 2010-04-04 at 04:03 -0700, kende jan wrote: Hello, How can I generate randomly in R a sample of skewed data with first quartile is 540 and third quartile is 715. I need a sample of 100 cases. Thank you for your help Jan Hi Jan, Sorry my direct approach but why you don't

Re: [R] compare two fingerprint images

2010-04-04 Thread Juan Antonio Gil Pascual
Thanks Jim I made a matching algorithm with R, but I get good results for two images of the same person, so I use a cross correlation function to directly compare images. Do you know of normalized cross-correlation function with R?. Juan Jim Lemon escribió: On 04/04/2010 05:18 AM, Juan

Re: [R] mantel.haenszel.test for trend in S-plus doesn't work i R

2010-04-04 Thread David Winsemius
On Apr 4, 2010, at 6:51 AM, Fredrik Lundgren wrote: Dear R'ers, When I used S-plus i wrote a small program for a Mantel-Haenszel test for trend (I think it worked). Unfortunately I can't get it working in R. It appears as if my use of 'el' is the problem but I can't sort it out. Error in

Re: [R] Generate Numbers

2010-04-04 Thread David Winsemius
On Apr 4, 2010, at 7:03 AM, kende jan wrote: Hello, How can I generate randomly in R a sample of skewed data with first quartile is 540 and third quartile is 715. I need a sample of 100 cases. ?rlnorm -- David Winsemius, MD West Hartford, CT

Re: [R] One question about saving graph by using xyplot

2010-04-04 Thread Jorge Ivan Velez
Hi Jian, Take a look at http://CRAN.R-project.org/doc/FAQ/R-FAQ.html#Why-do-lattice_002ftrellis-graphics-not-work_003f http://CRAN.R-project.org/doc/FAQ/R-FAQ.html#Why-do-lattice_002ftrellis-graphics-not-work_003f HTH, Jorge On Sun, Apr 4, 2010 at 2:52 AM, Jian Zhang wrote: Hey, folk. I

Re: [R] mantel.haenszel.test for trend in S-plus doesn't work i R

2010-04-04 Thread Erich Neuwirth
That is the problem c(,2,3) Error: argument is missing, with no default On 4/4/2010 12:51 PM, Fredrik Lundgren wrote: Dear R'ers, When I used S-plus i wrote a small program for a Mantel-Haenszel test for trend (I think it worked). Unfortunately I can't get it working in R. It appears

[R] How to add a column to dtm showing a part from directory source?

2010-04-04 Thread Melis Mete
Hello Experts, I'm new with R and having troubles doing my graduation project.I have 20 subfolders including almost 2 txt files.What i need to do is to create a dtm and add a column to it showing a class information of the txt files. My directory source is like

Re: [R] tetrachoric correlations

2010-04-04 Thread Ted Harding
This is in response to a query (copied below) from Hakan Demirtas. Since I did not keep the original, I am taking it from the archives. Therefore this may initiate a new thread ... :-( There has been one response so far, which gave no help. On Fri, Apr 2, 2010 at 7:25 PM, HAKAN DEMIRTAS

Re: [R] vector length help using prcomp

2010-04-04 Thread Uwe Ligges
On 02.04.2010 23:37, JRsalvelinus wrote: Hi I am doing PCA using prcomp and when I try to get predicted values for the different PC's the number of data points is always one less than in my original data set. This is a problem because it prevents me from doing any post-hoc analysis due to

Re: [R] Derivative of a smooth function

2010-04-04 Thread Julien Gagneur
Hi Fir, you can alternatively use local regression, implemented in the package locfit, which can also estimate derivatives: library(locfit) attach(cars) # main fit fit - locfit( dist ~ speed ) # fit 1st derivative fitd - locfit( dist ~ speed , deriv =1) # plots... plot(speed, dist ) lines(fit)

Re: [R] Generate Numbers

2010-04-04 Thread jim holtman
Is this close enough? x - runif(10, 452.5, 802.5) quantile(x) 0% 25% 50% 75% 100% 452.5014 539.2777 627.4728 715.2990 802.4815 y - sample(x, 100) On Sun, Apr 4, 2010 at 7:03 AM, kende jan kende...@yahoo.fr wrote: Hello, How can I generate randomly in R a

Re: [R] compare two fingerprint images

2010-04-04 Thread Charles C. Berry
On Sun, 4 Apr 2010, Tal Galili wrote: Hi Jim, Another thing I am wondering is - even if you have a metric for comparing two images (which I admit I didn't come across and I don't know how to approach), would that be enough to decide if two images are close or not? My guess is that no - one

Re: [R] compare two fingerprint images

2010-04-04 Thread Tal Galili
Enlightening and entertaining - Thanks Charles :) Contact Details:--- Contact me: tal.gal...@gmail.com | 972-52-7275845 Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) | www.r-statistics.com (English)

[R] How to split data for NMDS plots

2010-04-04 Thread Trey
I have a data matrix that contains site data for paired infested and control plots. For example: ab ac ad af ag ah 1 .024 x x x x x 2 .9 x x x x x 3 1.5x x x x x 4 2.3x x x x x 5 1.0x x x x x 1c.75 x

Re: [R] How to split data for NMDS plots

2010-04-04 Thread Trey
Here is the code I have used to this point: trba-read.table(c:\\Rdata\\NMDS\\trba.txt,header=T,row.names=1) attach(trba) trba bat-metaMDS(trba) plot(bat, display = c(sites)) Given this simple code and my previous example of the matrix, how would I go about splitting the data out for the

Re: [R] How to split data for NMDS plots

2010-04-04 Thread stephen sefick
I don't know if I understand exactly what you would like to be able to do. But this is how I would go about it if I understand you correctly. I would make a data frame out of the points and the code a dummy variable for the control sites in another column. The I would use ggplot2 to use the

[R] ggplot2 geom_rect(): What am I missing here

2010-04-04 Thread Marshall Feldman
Hi R fans, As a newbie following the five-hour rule (after hitting my head against the wall for five hours, post to this list), I am appealing for some help understanding geom_rect() in ggplot2. What I want to do is very simple. I want to generate a plot of rectangles. Each one represents a

Re: [R] How to split data for NMDS plots

2010-04-04 Thread David Winsemius
On Apr 4, 2010, at 3:50 PM, Trey wrote: I have a data matrix that contains site data for paired infested and control plots. For example: ab ac ad af ag ah 1 .024 x x x x x 2 .9 x x x x x 3 1.5x x x x x 4 2.3x x x x

Re: [R] How to split data for NMDS plots

2010-04-04 Thread Trey
In essence, here is what I'm after: When I plot the NMDS ordination, I get a cloud of points. To make sense of this cloud I need to differentiate the cloud into control and infested sites to see if there is any meaningful separation. The first 5 plots are infested, and the second 5 plots are

Re: [R] ggplot2 geom_rect(): What am I missing here

2010-04-04 Thread David Winsemius
On Apr 4, 2010, at 4:18 PM, Marshall Feldman wrote: Hi R fans, As a newbie following the five-hour rule (after hitting my head against the wall for five hours, post to this list), I am appealing for some help understanding geom_rect() in ggplot2. What I want to do is very simple. I want

[R] R-Python group on LinkedIn

2010-04-04 Thread Harsh
Dear R users, I'd like to invite interested members to join the LinkedIn group for R-Python (RPy). http://www.linkedin.com/e/vgh/2925347/eml-grp-sub/ This group seeks to bring like minded users together, for sharing knowledge\resources to encourage the use of RPy. I apologize if this

Re: [R] How to add a column to dtm showing a part from directory source?

2010-04-04 Thread jim holtman
Here is one way to parse the data. I just took the lines you had in the email to show how to do it. You can do the same thing on your complete object: x - readLines(textConnection(C:\\Program Files\\R\\20news18828/talk.politics.guns/54215 + C:\\Program

Re: [R] ggplot2 geom_rect(): What am I missing here

2010-04-04 Thread Peter Ehlers
Marsh, Your rectangles won't be very tall with ymax=ymin! (I hope that wasn't the cause of the 5 hours.) -Peter Ehlers On 2010-04-04 14:18, Marshall Feldman wrote: Hi R fans, As a newbie following the five-hour rule (after hitting my head against the wall for five hours, post to this list),

Re: [R] ggplot2 geom_rect(): What am I missing here

2010-04-04 Thread David Winsemius
On Apr 4, 2010, at 4:18 PM, Marshall Feldman wrote: Hi R fans, As a newbie following the five-hour rule (after hitting my head against the wall for five hours, post to this list), I am appealing for some help understanding geom_rect() in ggplot2. What I want to do is very simple. I want

[R] [R-pkgs] Major glmnet upgrade on CRAN

2010-04-04 Thread Trevor Hastie
glmnet_1.2 has been uploaded to CRAN. This is a major upgrade, with the following additional features: * poisson family, with dense or sparse x * Cox proportional hazards family, for dense x * wide range of cross-validation features. All models have several criteria for cross-validation.

[R] calculating an interaction statistic from stratified data

2010-04-04 Thread Georg Ehret
Dear R community, I have data on betastandard error (for the main effect of variable x), stratified by sex for my dataset. I wish to calculate the sex-interaction effect (as betase) from these two stratified datasets. Is there a package to do this? If not, any advice how to do it manually?

Re: [R] calculating an interaction statistic from stratified data

2010-04-04 Thread Alvarez, Joann Marie
Hi Georg, Instead of stratifying by sex, use all your data together to fit one model that controls for sex. This gives you more power because of the increased sample size. Also, this way you can add an interaction term, which is what you are looking for. The gender variable should be defined

Re: [R] calculating an interaction statistic from stratified dat

2010-04-04 Thread Ted Harding
On 04-Apr-10 22:01:08, Georg Ehret wrote: Dear R community, I have data on betastandard error (for the main effect of variable x), stratified by sex for my dataset. I wish to calculate the sex-interaction effect (as betase) from these two stratified datasets. Is there a package to do this?

Re: [R] tm package- remove stowords failling

2010-04-04 Thread Welma Pereira
Hi, I just noticed that by inspecting the matrix term that no all stopwords are removed, does someone know how to fix that? library(tm) data(crude) d-tm_map(crude, removeWords, stopwords(language='english')) dt-DocumentTermMatrix(d,control=list(minWordLength=3, minDocFreq=2)) inspect(

Re: [R] How to split data for NMDS plots

2010-04-04 Thread Michael Denslow
Hi Trey, On Sun, Apr 4, 2010 at 4:28 PM, Trey trey3...@hotmail.com wrote: In essence, here is what I'm after:  When I plot the NMDS ordination, I get a cloud of points.  To make sense of this cloud I need to differentiate the cloud into control and infested sites to see if there is any