[R] converting character to numeric

2011-06-21 Thread Alina Sheyman
I'm trying to convert data from character to numeric. I've imported data as a csv file, I'm assuming that the import is a database - are all the columns in a database considered "vectors" and that they can be operated on individually Therefore I've tried the following mydata <- as.numeric(myda

Re: [R] importing a file

2011-06-20 Thread Alina Sheyman
that was it, thank you!!! On Mon, Jun 20, 2011 at 5:23 PM, Sarah Goslee wrote: > R is looking for an R object named Wordata1.csv that contains your file > name. > > Instead you want: > mydata <- read.csv ("Wordata1.csv", sep="") > > Sarah > > On

[R] importing a file

2011-06-20 Thread Alina Sheyman
I haven't used R in a couple of years, and now am trying something as simple as importing a csv file and am running into problems right away. * mydata <- read.csv (Wordata1.csv, sep="") Error in read.table(file = file, header = header, sep = sep, quote = quote, : object 'Wordata1.csv' not found

[R] Europe zip code shapefiles

2009-04-07 Thread Alina Sheyman
Hi all, I'm looking for zip code shapefiles for Italy and France.Does anyone know where I might be able to find these? thank you! [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo

[R] model selection using ANOVA

2009-03-31 Thread Alina Sheyman
I've created a number of models using lm and now want to pick one with the smallest standard error or the smallest RSS, I can get a list of RSS using anova function, but is the any way I can then select one with the smallest RSS from the list? [[alternative HTML version deleted]]

[R] target of assignment expands to non-language object

2009-03-31 Thread Alina Sheyman
I'm running the following code numbers <- 1:50 for (i in 1:50) assign(paste("model",numbers[i]),i)<-(lm(temp$Overall.Scaled.Score~temp$raw.score)) where I want R to create 50 different models-1:50, but get the following error message "target of assignment expands to non-language object". I've tr

Re: [R] mapping lat and long with maps package

2009-03-04 Thread Alina Sheyman
text(long, lat, "text") > > # > data(ozone) > map("state", xlim = range(ozone$x), ylim = range(ozone$y)) > text(ozone$x, ozone$y, ozone$median) > box() > > -- > David Winsemius > > > On Mar 4, 2009, at 5:04 PM, Alina Sheyman wrote: > >

[R] mapping lat and long with maps package

2009-03-04 Thread Alina Sheyman
I am trying to overlay a data frame with lat and longitude(which refer to zip codes) on the map of US that I get by using map ("states"). Is there anyway to do this or do I have to resort to using maptools? thank you [[alternative HTML version deleted]] __

[R] colored maps again

2009-02-19 Thread Alina Sheyman
I'm trying to create a colored map that would show the number of students per state. My data frame consists of two columns - state and count. I'm using the following code library(maps) map("usa") library(plotrix) state.col<-color.scale(gre$count,0,0,c(0,1)) map("state",fill=TRUE,col=state.col) I

[R] color maps with counts

2009-02-18 Thread Alina Sheyman
I have yet another question concerning maps. This time I want to create a colored map of number of students by state. Can this be done using palettes in Rcolor brewer, is there some other way? I've been looking through R archives, but am still really at a loss here, so all help will be much apprec

Re: [R] RcolorBrewer

2009-02-18 Thread Alina Sheyman
I figured it out thanks On Wed, Feb 18, 2009 at 3:50 PM, Domenico Vistocco wrote: > Alina Sheyman wrote: > >> I've downloaded the RcolorBrewer package, but when I try to run >> mypalette<-brewer.pal(7,"Greens") >> >> (or any other command with bre

[R] RcolorBrewer

2009-02-18 Thread Alina Sheyman
I've downloaded the RcolorBrewer package, but when I try to run mypalette<-brewer.pal(7,"Greens") (or any other command with brewer.pal) I get the following error message - Error: could not find function "brewer.pal" Does anyone know why that's happening? Is there smth else I need to download?

Re: [R] creating a map

2009-02-17 Thread Alina Sheyman
regory (Greg) L. Snow Ph.D. > Statistical Data Center > Intermountain Healthcare > greg.s...@imail.org > 801.408.8111 > > > > -Original Message- > > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- > > project.org] On Behalf Of Alina Sheyman > > Se

[R] creating a map

2009-02-17 Thread Alina Sheyman
I'm trying to create a fairly basic map using R. What i want to get is the map of the country with circles representing a count of students in each state. What I've done so far is as following - map("state") symbols(data1$count,circles=log(data1$count)*3,fg=col,bg=col,add=T,inches=F) this gives

[R] Replacing dates with consecutive observations

2009-01-21 Thread Alina Sheyman
I am working with a list of dates and I would like to replace each date with the one that comes after, ie. 1/1/07 will become 1/5/07, 1/5/07 will become 1/7/07, etc. The number of days between my dates always varies, so I can't just increase each one by 5 days or so. Does anyone know of a way I ca

[R] occurrence of a weekday in a month

2008-12-04 Thread Alina Sheyman
I'm trying to establish the occurrence of a specific day of the week in a given month. Namely I want to know if a specific Tuesday was the 2nd,3rd Tuesday in a month. Is there a good way to this in R? thank you, Alina Sheyman [[alternative HTML version de

[R] (no subject)

2008-12-04 Thread Alina Sheyman
I'm trying to establish the occurrence of a specific day of the week in a given month. Namely I want to know if a specific Tuesday was the 2nd,3rd Tuesday in a month. Is there a good way to this in R? thank you, Alina Sheyman [[alternative HTML version de

[R] looking for matches

2008-11-17 Thread Alina Sheyman
e with the class name. I was hoping to accomplish this with sapply, but I can't figure out if I can embed an "if statement" with sapply. Does anyone know if that's a legit way to accomplish what I am trying to do or is there some better way? thank you, Alina Sheyman