Hello. My name is Ana. I?m doing an eology master, and I?m just learning how R works. I have a Mac OS X 10.5.6, and I?m tryng to run just a simple ANOVA nanalyses. I dowloaded R version 2.10.0, and it seems I have problems with the script. I don?t know what to do, I?ve already change the languages, be sure of being working in the correct directory and doesn?t work the script is: #1. example data01<-read.table("ch01.txt",header=T) names(data01) attach(data01) FERTIL<-factor(FERTIL) model01<-(YIELD~FERTIL) summary(model01) anova(model01) all my classmates, even those with a mac operator, wrote the same, and it worked. When copying the script in the R console, it seems that there is a problem with the ~ symbol. this symbol is not in the keyboard, so I select it from spetial characters, and then i selected with shift an <>key, and still, it doesn?t works I attached th file with the data. i hope you can help me!!!!! Ana. -------------- next part -------------- FERTIL YIELD YIELDM VARIETY SEX DBH FLOWERS YIELD2 1 6.27 25.12 1 2 174 234 6.27 1 5.36 17.25 1 1 171 110 5.36 1 6.39 26.42 1 2 212 512 6.39 1 4.85 16.08 1 1 187 133 4.85 1 5.99 22.15 1 2 227 1107 5.99 1 7.14 15.92 1 1 274 624 7.14 1 5.08 40.25 2 2 86 8 5.08 1 4.07 35.25 2 2 161 333 4.07 1 4.35 31.98 2 1 285 637 4.35 1 4.95 36.52 2 1 182 225 4.95 2 3.07 43.32 2 2 225 512 3.07 2 3.29 37.1 2 1 133 47 3.29 2 4.04 18.3 3 2 154 164 4.04 2 4.19 22.6 3 2 71 1 4.19 2 3.41 25.9 3 1 133 36 3.41 2 3.75 15.05 3 1 267 524 3.75 2 4.87 28.05 4 2 166 198 4.87 2 3.94 28.55 4 2 145 225 3.94 2 6.28 33.2 4 2 207 548 NA 2 3.15 31.68 4 1 216 272 3.15 3 4.04 30.32 4 2 157 164 4.04 3 3.79 27.58 4 2 87 5 3.79 3 4.56 NA NA 1 185 133 4.56 3 4.55 NA NA 1 183 133 4.55 3 4.55 NA NA 2 193 419 4.55 3 4.53 NA NA 1 264 442 4.53 3 3.53 NA NA 1 83 3 3.53 3 3.71 NA NA 2 300 1482 3.71 3 7 NA NA 1 242 333 NA 3 4.61 NA NA 2 316 1138 4.61 NA NA NA NA 2 217 561 NA NA NA NA NA 1 235 488 NA NA NA NA NA 2 189 282 NA NA NA NA NA 1 242 536 NA NA NA NA NA 2 84 11 NA NA NA NA NA 2 135 148 NA NA NA NA NA 1 267 512 NA NA NA NA NA 2 122 70 NA NA NA NA NA 2 280 1107 NA NA NA NA NA 2 295 941 NA NA NA NA NA 2 139 89 NA NA NA NA NA 2 165 181 NA NA NA NA NA 2 81 8 NA NA NA NA NA 1 190 173 NA NA NA NA NA 2 68 1 NA NA NA NA NA 2 314 1091 NA NA NA NA NA 1 284 561 NA NA NA NA NA 2 77 3 NA NA NA NA NA 1 228 312 NA NA NA NA NA 2 282 1398 NA
Hello On 11/10/09, Ana Mar?a Prieto <prieto.anamaria at gmail.com> wrote:> When copying the script in the R console, it seems that there is a problem > with the > > ~ symbol. this symbol is not in the keyboard, so I select it from spetial > characters,For what language is your keyboard designed? If it is for English, similar to this one [1], try a British English layout, and then the ~ sign will (possibly) be on the "\" button (press shift+\). I'm on Linux, but I hope it would be similar for Mac. Liviu [1] http://www.mrtotes.co.uk/UK_Mac_Keyboard.jpg
On Nov 10, 2009, at 11:24 AM, Ana Mar?a Prieto wrote:> Hello. > My name is Ana. I?m doing an eology master, and I?m just learning > how R > works. > I have a Mac OS X 10.5.6, and I?m tryng to run just a simple ANOVA > nanalyses. > I dowloaded R version 2.10.0, and it seems I have problems with the > script. > I don?t know what to do, I?ve already change the languages, be sure of > being > working in the correct directory and doesn?t work > > the script is: > > #1. example > > data01<-read.table("ch01.txt",header=T) > > names(data01) > > attach(data01) > > FERTIL<-factor(FERTIL) > > model01<-(YIELD~FERTIL)I suspect that the problem is not with the lack of a tilde ("~") or the misinterpretation of the special character that you seem to have gotten into this mail message, but rather with your failure to type the two letters "lm" thusly: model01 <- lm(YIELD~FERTIL) I have 3 Macs of varying vintages (one desktop and two laptops) and they all have the tilde in the upper left corner just below the escape key. Future submissions to the R-help list should be accompanied by a more informative subject line. That sort of "Subject" is considered rude (some might even say infantile) behavior in this arena. -- David.> > summary(model01) > > anova(model01) > > > all my classmates, even those with a mac operator, wrote the same, > and it > worked. > > When copying the script in the R console, it seems that there is a > problem > with the > > ~ symbol. this symbol is not in the keyboard, so I select it from > spetial > characters, > > and then i selected with shift an <>key, and still, it doesn?t works > > I attached th file with the data. i hope you can help me!!!!! > > > Ana.-- David Winsemius, MD Heritage Laboratories West Hartford, CT
Ana Mar?a Prieto wrote:> > Hello. > My name is Ana. I?m doing an eology master, and I?m just learning how R > works. > I have a Mac OS X 10.5.6, and I?m tryng to run just a simple ANOVA > nanalyses. > I dowloaded R version 2.10.0, and it seems I have problems with the > script. > I don?t know what to do, I?ve already change the languages, be sure of > being > working in the correct directory and doesn?t work > > the script is: > > #1. example > > data01<-read.table("ch01.txt",header=T) > > names(data01) > > attach(data01) > > FERTIL<-factor(FERTIL) > > model01<-(YIELD~FERTIL) > > summary(model01) > > anova(model01) > > > all my classmates, even those with a mac operator, wrote the same, and it > worked. > >Well, the line: model01 <- (YIELD~FERTIL) Creates an object of class "formula", which is not a model. A formula only expresses a relationship between variables, a model consists of a formula that has been fit to a data set. The anova() function has no meaning for formula objects since no data has been fit. If you wanted a linear model, use the lm() function to create it: model01 <- lm( YIELD ~ FERTIL ) Non-linear functions may be fit using nls() and R has plenty of other fitting schemes if you should require them. Ana Mar?a Prieto wrote:> > > When copying the script in the R console, it seems that there is a problem > with the > > ~ symbol. this symbol is not in the keyboard, so I select it from spetial > characters, > > and then i selected with shift an <>key, and still, it doesn?t works > >On my keyboard the '~' character is accessed by pressing SHIFT-backtick, where backtick is the key above the "Tab" key and to the left of the "1" key. You may have a different keyboard. Ana Mar?a Prieto wrote:> > > I attached th file with the data. i hope you can help me!!!!! > > Ana. > >----- Charlie Sharpsteen Undergraduate Environmental Resources Engineering Humboldt State University -- View this message in context: http://old.nabble.com/HEEELP%21%21%21%21-tp26288374p26289075.html Sent from the R help mailing list archive at Nabble.com.
Possibly Parallel Threads
- sensitivity analysis, input factors
- Duda trabajando con nombres de objetos que se reciben como parĂ¡metros
- Heeelp - no idea what''s going wrong.
- Getting the correct factor level as Dunnett control in glht()
- gluster-volgen - syntax for mirroring/distributing across 6 nodes