[R] add=TRUE function not working

2009-10-11 Thread Mehdi Khan
Hey everybody, I have a matrix with three columns. I want to plot two columns (independent variable) against one column (the defendant). This is my code and the error associated with it: plot(p, q, data=columns) plot(pprime,q, add=TRUE) Warning messages: 1: In plot.window(...) : add is not a

Re: [R] add=TRUE function not working

2009-10-11 Thread Mehdi Khan
- cuncta stricte discussurus - -Ursprüngliche Nachricht- Von: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] Im Auftrag von Mehdi Khan Gesendet: Sunday, October 11, 2009 8:52 PM An: r-help@r-project.org Betreff: [R

[R] Problems generating image from tiff file

2009-07-16 Thread Mehdi Khan
I imported the attached tiff file and converted the coordinate system to long lat and graphed it: californiatiff- readGDAL(california1.tif) proj4string(californiatiff) rasterprojection - spTransform(californiatiff, CRS(+proj=longlat) however, when using the plot command for rasterprojection, I

Re: [R] Problems generating image from tiff file

2009-07-16 Thread Mehdi Khan
when you post this can you please remove the tiff file? my supervisor doesn't want me to let it out. sorry! On Thu, Jul 16, 2009 at 4:02 PM, Mehdi Khan mwk...@ucdavis.edu wrote: I imported the attached tiff file and converted the coordinate system to long lat and graphed it: californiatiff

Re: [R] Problems generating image from tiff file

2009-07-17 Thread Mehdi Khan
place for your type of questions. I also have some comments inline below. cheers and good luck with your R adventures! Paul Mehdi Khan wrote: I imported the attached tiff file and converted the coordinate system to long lat and graphed it: californiatiff- readGDAL(california1.tif

[R] Searching for specific values in a matrix

2009-07-21 Thread Mehdi Khan
the entire row. How would I accomplish this? Thanks! Mehdi Khan [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

Re: [R] Re gression using age and Duration of disease as a continous factors

2009-07-21 Thread Mehdi Khan
http://www.amazon.com/gp/product/007310874X/ref=pd_lpo_k2_dp_sr_1?pf_rd_p=304485901pf_rd_s=lpo-top-stripe-1pf_rd_t=201pf_rd_i=0256117365pf_rd_m=ATVPDKIKX0DERpf_rd_r=155Y7AP1SHTSJESHM15M This is our textbook for regression analysis. Go through the first 8 or 9 chapters and you're good. Mehdi

Re: [R] Searching for specific values in a matrix

2009-07-21 Thread Mehdi Khan
value in the latter case. I have already converted it to a data frame. Thanks a lot! On Tue, Jul 21, 2009 at 11:34 AM, Steve Lianoglou mailinglist.honey...@gmail.com wrote: On Jul 21, 2009, at 1:47 PM, Mehdi Khan wrote: Hello all, I have a seemingly simple question which I have searched

Re: [R] Re gression using age and Duration of disease as a continous factors

2009-07-21 Thread Mehdi Khan
It was decent, I ended up not going to class and only going to discussions and reading the book, got an A-. On Tue, Jul 21, 2009 at 12:18 PM, Steve Lianoglou mailinglist.honey...@gmail.com wrote: On Jul 21, 2009, at 1:56 PM, Mehdi Khan wrote: http://www.amazon.com/gp/product/007310874X/ref

Re: [R] Searching for specific values in a matrix

2009-07-21 Thread Mehdi Khan
would i do that? How would I find the rows with BC? Thank you for all your help! Mehdi Khan On Tue, Jul 21, 2009 at 12:10 PM, Steve Lianoglou mailinglist.honey...@gmail.com wrote: I am a bit confused as to what the following command does: evens - df$nums %% 2 == 0 It returns a logical

Re: [R] Searching for specific values in a matrix

2009-07-21 Thread Mehdi Khan
thank you VERY much, I have to run now, but I will look at this in the next few days (going on a field trip). I really appreciate it! Mehdi Khan On Tue, Jul 21, 2009 at 12:49 PM, Steve Lianoglou mailinglist.honey...@gmail.com wrote: On Jul 21, 2009, at 3:27 PM, Mehdi Khan wrote: I

Re: [R] Searching for specific values in a matrix

2009-07-27 Thread Mehdi Khan
i am able to return the first column, but anything else returns this: 0 rows (or 0-length row.names) any idea? On Tue, Jul 21, 2009 at 12:49 PM, Steve Lianoglou mailinglist.honey...@gmail.com wrote: On Jul 21, 2009, at 3:27 PM, Mehdi Khan wrote: I understand your explanation about

Re: [R] Searching for specific values in a matrix

2009-07-27 Thread Mehdi Khan
the problem is, it works with the example data i gave. however, it does NOT work with the data set i have, which is 600,000 rows. the class is still a data frame. On Mon, Jul 27, 2009 at 12:15 PM, Steve Lianoglou mailinglist.honey...@gmail.com wrote: On Jul 27, 2009, at 2:54 PM, Mehdi Khan

Re: [R] Searching for specific values in a matrix

2009-07-27 Thread Mehdi Khan
no luck, it's okay, i will figure it out! i might isolate and recombine all the columns, maybe that will work. thanks for the help! On Mon, Jul 27, 2009 at 1:00 PM, Steve Lianoglou mailinglist.honey...@gmail.com wrote: On Jul 27, 2009, at 3:50 PM, Mehdi Khan wrote: the problem

Re: [R] Searching for specific values in a matrix

2009-07-27 Thread Mehdi Khan
it worked! thank you so much!! On Mon, Jul 27, 2009 at 3:16 PM, Steve Lianoglou mailinglist.honey...@gmail.com wrote: Ahh .. On Jul 27, 2009, at 6:01 PM, Mehdi Khan wrote: Even when choosing a value from the first few rows, it doesn't work. okay here it goes: rearranged[1:10, 1:5

Re: [R] Searching for specific values in a matrix

2009-07-27 Thread Mehdi Khan
Even when choosing a value from the first few rows, it doesn't work. okay here it goes: rearranged[1:10, 1:5] xy band1 VSCAT.001 soiltype 1 -124.3949 40.42468NANA CD 2 -124.3463 40.27358NANA CD 3 -124.3357 40.25226NANA

Re: [R] Searching for specific values in a matrix

2009-07-28 Thread Mehdi Khan
Yes this is working quite well. Basically, I am comparing data obtained from GIS to data obtained from R. It's turning out that the latitude and longitude values from GIS are not matching exactly those obtained in R, and therefore I am trying to find the variance in the data. On Tue, Jul 28,

Re: [R] Searching for specific values in a matrix

2009-07-28 Thread Mehdi Khan
Genentech Nonclinical Biostatistics BertG -Original Message- From: BertG r-help-boun...@r-project.org BertG [mailto:r-help-boun...@r-project.org] On Behalf Of BertG Steve Lianoglou Sent: Monday, July 27, 2009 3:17 PM BertG To: Mehdi Khan Cc: r-help@r-project.org Subject

Re: [R] Searching for specific values in a matrix

2009-07-28 Thread Mehdi Khan
, Mehdi Khan mkhan...@gmail.com wrote: all right thank you! this was big help. On Tue, Jul 28, 2009 at 2:22 AM, Martin Maechler maech...@stat.math.ethz.ch wrote: BertG == Bert Gunter gunter.ber...@gene.com on Mon, 27 Jul 2009 15:30:08 -0700 writes: BertG Nothing wrong

[R] Combining two dataframes and specifying tolerance levels

2009-07-29 Thread Mehdi Khan
to the particular station location. I hope this is clear enough. I should probably post this to sig geo, but I figured that since we are dealing with two data frames and matrices, I can push for it to go to this list (since it seems to have a lot more viewers). Thanks a lot!!! Mehdi Khan

Re: [R] Combining two dataframes and specifying tolerance levels

2009-07-29 Thread Mehdi Khan
I do not know if this message got through or not, but please disregard it! Thanks! On Wed, Jul 29, 2009 at 2:57 PM, Mehdi Khan mwk...@ucdavis.edu wrote: Hello everyone, I have two data frames. One is a vector about 780 rows long consisting of lat long data of 780 station locations

[R] Creating a column based on data in another column

2009-07-31 Thread Mehdi Khan
and so on and so forth. How would I do this? Thank you very much! Mehdi Khan [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R

Re: [R] Creating a column based on data in another column

2009-07-31 Thread Mehdi Khan
got it, thank you everyone! On Fri, Jul 31, 2009 at 12:04 PM, Mehdi Khan mwk...@ucdavis.edu wrote: hello all, I have a data frame and I want to create a column which assigns a letter based upon the value in another column. The data column has velocities ranging from 0 to 1000. So

Re: [R] another automation question

2009-08-01 Thread Mehdi Khan
your name is annoying. On Fri, Jul 31, 2009 at 2:01 PM, RR! cwal...@usgs.gov wrote: This code works: x-letters[1:6] ycols-23:28 xcols-rep(c(3,4,5,8),each=length(ycols)) somertime-function(i,j)somers2(Pred_pres_a_indpdt[,i,,], population[,j]) results-mapply(somertime,xcols,ycols)

[R] Redoing axis in a strip plot

2009-08-06 Thread Mehdi Khan
Hello everyone, simple question--the documentation is confusing so i am forced to ask: I have a strip plot, how do create my own axis tick marks and set limits? Thanks! stripplot(jitter(clahanvs30) ~ vs30, data = completetable) Mehdi Khan [[alternative HTML version deleted

Re: [R] Redoing axis in a strip plot

2009-08-06 Thread Mehdi Khan
nevermind, I just looked at Steve's reply to mohsen and it worked! stripplot(jitter(clahanvs30) ~ vs30, data = completetable, ylim=c(0:2000), xlim=c(0:2000)) On Thu, Aug 6, 2009 at 1:54 PM, Mehdi Khan mwk...@ucdavis.edu wrote: Hello everyone, simple question--the documentation is confusing so i

Re: [R] Redoing axis in a strip plot

2009-08-06 Thread Mehdi Khan
Well, the tick marks are at every 200, how do i make them at every 100? On Thu, Aug 6, 2009 at 2:02 PM, Mehdi Khan mwk...@ucdavis.edu wrote: nevermind, I just looked at Steve's reply to mohsen and it worked! stripplot(jitter(clahanvs30) ~ vs30, data = completetable, ylim=c(0:2000), xlim=c(0

Re: [R] Creating a column based on data in another column

2009-08-12 Thread Mehdi Khan
.. Thank you!! On Fri, Jul 31, 2009 at 12:04 PM, Mehdi Khan mwk...@ucdavis.edu wrote: hello all, I have a data frame and I want to create a column which assigns a letter based upon the value in another column. The data column has velocities ranging from 0 to 1000. So for example

Re: [R] Creating a column based on data in another column

2009-08-12 Thread Mehdi Khan
willsclahanstationcut$wills.vs30- recode(willsclahanstationcut$area.VSCAT,c(B=686,C= 464,BC= 724, D=301,CD= 372, D= 800, DE= 1000, WATER=0)) where $vs30 is the column I want to create, $area.VSCAT is the column which contains the labels. On Wed, Aug 12, 2009 at 8:46 PM, Mehdi Khan mwk

Re: [R] REMOVE ME

2009-08-12 Thread Mehdi Khan
You can do it yourself by unsubscribing. On Wed, Aug 12, 2009 at 8:48 PM, Tim Paysen tpay...@sbcglobal.net wrote: This mailing list is too intrusive. Remove my name. [[alternative HTML version deleted]] __ R-help@r-project.org mailing

[R] Unique command not deleting all duplicate rows

2009-08-24 Thread Mehdi Khan
1170 264.57 D 8419 D 9 -115.447 32.773 1170 264.57 D 8419 D 10 -115.447 32.773 1170 264.57 D 8419 D 11 -115.447 32.773 1170 264.57 D 8419 D 12 -115.447 32.773 149 186.21 D 8419 D 13 -115.466 32.855 114 205.63 D 8419 D 14 -115.473 32.8 1121 207.469 D 8419 D Thanks a bunch! Mehdi Khan

Re: [R] Unique command not deleting all duplicate rows

2009-08-24 Thread Mehdi Khan
V1, V2, and V4 should be checked versus R FAQ 7.31. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Don McKenzie Sent: Monday, August 24, 2009 1:35 PM To: Mehdi Khan Cc: r-help@r-project.org Subject: Re: [R] Unique command

[R] Fwd: Overlay on raster loses points when merging with data frame

2009-08-24 Thread Mehdi Khan
7 14 -3254339 3615978 CI MGE68 330 4 15 -3257283 3597678 CI PMD 296 257 3 I am assuming there is no precision error since there are no decimals.. Thanks! Mehdi Khan [[alternative HTML version deleted]] __ R

Re: [R] Problem merging two data frames

2009-08-26 Thread Mehdi Khan
Note: even if I say by=c(LON, LAT), it doesn't work, suggesting that number storage isn't the problem On Wed, Aug 26, 2009 at 6:19 PM, Mehdi Khan mwk...@ucdavis.edu wrote: Hello everyone, Merging two dataframes should be easy. However when I try to merge, R doesn't recognize identical

[R] fitting a linear model line through srip plot

2009-08-27 Thread Mehdi Khan
I am creating a strip plot from the lattice library, and would like the display to also have the linear model line through it. How would I do that? stripplot(jitter(vs30)~tif.vs30, data=rastermodel, xlim=c(150,600), ylim=c(0,1000)) yonglm-lm(vs30~tif.vs30, data=rastermodel) Thanks!

Re: [R] fitting a linear model line through srip plot

2009-08-27 Thread Mehdi Khan
Nevermind, I figured another way through the plot command. thanks :) On Thu, Aug 27, 2009 at 7:16 AM, Mehdi Khan mwk...@ucdavis.edu wrote: I am creating a strip plot from the lattice library, and would like the display to also have the linear model line through it. How would I do