Re: [R] gridding values in a data frame

2009-04-30 Thread jdeisenberg
dxc13 wrote: > > Hi all, > I have a data frame that looks like such: > LATITUDE LONGITUDE TEMPERATURE TIME > 36.73 -176.4358.32 1 > > and this goes on for a A LOT more records, until time=1200 > > I want to create a 5 degree by 5 degree grid of this data, w

Re: [R] save history only option under Linux

2009-04-27 Thread jdeisenberg
alex lee wrote: > > Is there any options that I can save history only? > The only save option is --save, which saves both data and history. > However I want to restore the history for my next R session.. > > If there is no such option that meets my needs. Is there any other way to > work out, s

Re: [R] first time poster

2009-03-28 Thread jdeisenberg
rilleyel wrote: > > > i am trying to answer the following question, and having no luck: > Focus your analysis on a comparison between respondents labeled “Low” > (coded 1) on attend4 and respondents labeled “High” (coded 4). Then, > examine the variance of distributions. That is, run a command

Re: [R] windows vs. linux code

2009-02-25 Thread jdeisenberg
Sherri Heck wrote: > > i am asking if, in general, r code can be written on a linux-based > system and then run on a windows-based system. > Yes, if you avoid system-dependent calls like, um, system , there should be no problem. For example, normal stuff like t test, correlation, plot, hist,

Re: [R] windows vs. linux code

2009-02-25 Thread jdeisenberg
Sherri Heck wrote: > > I have been given some Rcode that was written using a Linux OS, but I > use Windows-based R. The person that is giving it to me said that it > needs to run on a Linux system. Does anyone have any insight and/or can > verify this. I haven't yet obtained the code, so

Re: [R] array manipulation simple questions

2009-02-23 Thread jdeisenberg
Λεωνίδας Μπαντής wrote: > > 1. Suppose I have a<-c(1:10) (or a<-array(c(1:10),dim=c(1,10))) > > and I want to end up with vector b=[0 0 0 0 0 1 1 1 1 1]. i.e. I want to > substitute alla elements that are <5 with 0 and >5 with 1. > I think you mean >=5, not > 5. In that case, try this:

Re: [R] error bars

2009-02-18 Thread jdeisenberg
Nicole Hackman wrote: > > Hello, I have a very simple data set i imported from excel including 96 > averages in a column along with 96 standard errors associated with those > averages (calculated in excel). I plotted the 95 averages using r and I > am > wondering if it is possible to plot the s

Re: [R] how to make the figure more clearly

2009-02-18 Thread jdeisenberg
Abelian-2 wrote: > > Dear all > when i draw some figures by R, i try to use "jpeg" to display my > result. > However, it isn't still clear as i want. > Especially when i compare the origial figures by R and the ".jpeg" > file > JPEG is designed for photos (the "P" stands for "Photographic"). T

Re: [R] Loop on characters

2009-02-10 Thread jdeisenberg
megh wrote: > > suppose I have three vectors like : > > l1 = 1:4 > l2 = 4:9 > l3 = 16:67 > > now I want to construct a loop like : > > for (i in 1:3) >{ > count1[i] = length(li) # i.e. it will take l1, l2, l3 according to > value of i >} > Try this. There's probably a more ele

Re: [R] How to split a character vector into 3 vectors

2009-02-10 Thread jdeisenberg
kayj wrote: > > Hi , > > > Does any one know how to split a character vector , I have a vector X that > looks like this and each row has 3 characters > > X > ASK > DGH > ASG > AUJ > FRT > > I would like to split the vector into 3 vectors that look like this > > X1X2 X3 > A S

Re: [R] Choosing a random number between x and y

2009-02-09 Thread jdeisenberg
Vie wrote: > > Hi, > > Ive been trying to find a function that will allow me to pull out a number > between a minimum and maximum threshold. > > I want a random decimal number between, for example, 0 and 0.5 or 0 and > 0.7. > I'm no R expert, but this should give you n uniformly distributed