Re: [R] portable R editor

2009-03-03 Thread Thompson, David (MNR)
Werner, Another alternative is EditPad Pro . DaveT. * Silviculture Data Analyst Ontario Forest Research Institute Ontario Ministry of Natural Resources david.john.thomp...@ontario.ca http://ontario.ca/ofri ***

Re: [R] assign()ing within apply

2008-12-12 Thread Thompson, David (MNR)
From: Jorge Ivan Velez [mailto:jorgeivanve...@gmail.com] Sent: December 12, 2008 11:11 AM To: Thompson, David (MNR) Subject: Re: [R] assign()ing within apply Dear David, Try this: ban.ovs.93[,'spp']<-tolowe

Re: [R] assign()ing within apply

2008-12-12 Thread Thompson, David (MNR)
Any tips? DaveT. >-Original Message- >From: Thompson, David (MNR) >Sent: December 9, 2008 04:03 PM >To: 'r-help@r-project.org' >Subject: assign()ing within apply > >Hello, > >I'm trying to convert a character column in several dataframes &g

[R] assign()ing within apply

2008-12-09 Thread Thompson, David (MNR)
Hello, I'm trying to convert a character column in several dataframes to lower case. ### # # Sample data and 'spp' column summaries: # dput(ban.ovs.1993[sample(row.names(ban.ovs.1993), 20), 1:4]) ban.ovs.93 <- structure(list(oplt = c(43L, 43L, 38L, 26L, 35L, 8L, 39L, 1L, 34L, 50L, 10L, 29L, 31L,

Re: [R] a bit off topic: data for dragsters?

2008-11-17 Thread Thompson, David (MNR)
Roland, I don't know of the specific data you are asking for but the official website of the 'National Hot Rod Assoc' (?) is www.nhra.com. DaveT. * Silviculture Data Analyst Ontario Forest Research Institute Ontario Ministry of Natural Resources [EMAIL PROTECTE

Re: [R] Date classes in ggplot2

2008-10-20 Thread Thompson, David (MNR)
Is not melt part of reshape package, i.e., require(reshape)? DaveT. >-Original Message- >From: stephen sefick [mailto:[EMAIL PROTECTED] >Sent: October 19, 2008 12:12 PM >To: hadley wickham >Cc: R Help >Subject: Re: [R] Date classes in ggplot2 > >well I must have either resolve it without

Re: [R] package Utils Sweave Example Error

2008-10-17 Thread Thompson, David (MNR)
(Question/suggestion inline below) >-Original Message- >From: Duncan Murdoch [mailto:[EMAIL PROTECTED] >Sent: October 16, 2008 02:17 PM >To: [EMAIL PROTECTED] >Cc: [EMAIL PROTECTED] >Subject: Re: [R] package Utils Sweave Example Error > >On 10/16/2008 12:19 PM, Felipe Carrillo wrote: >>

Re: [R] YALAQ - Yet Another LApply Question

2008-10-15 Thread Thompson, David (MNR)
icitly print the results of summary. > >Hope this helps, > >-- >Gregory (Greg) L. Snow Ph.D. >Statistical Data Center >Intermountain Healthcare >[EMAIL PROTECTED] >801.408.8111 > > >> -Original Message- >> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] &g

Re: [R] YALAQ - Yet Another LApply Question

2008-10-15 Thread Thompson, David (MNR)
Please forgive this repost, it's been a week without a squeak. No comments? Original post: https://stat.ethz.ch/pipermail/r-help/2008-October/176340.html Hello, Two lapply questions (system info and sample data below): 1) Why does the first form of command1 add the name of y _after_ the str() o

Re: [R] Fatal error: unable to restore saved data in .RData

2008-10-10 Thread Thompson, David (MNR)
) I decided to do this after reading the help for bindenv {base} and the phrase ". . . experimental interface . . ." JUMPED right out at me. Again, I don't know if this was _actually_ the cause of my problem but, I am underway again. Thanx, DaveT. >-Original Message- &g

[R] Fatal error: unable to restore saved data in .RData

2008-10-10 Thread Thompson, David (MNR)
Hello, I am unable to start an R session by double-clicking on an existing .RData file from the Windoze file explorer. A dialogue appears with the message "Fatal error: unable to restore saved data in .RData", and I notice in the R Console the last few lines are: "Loading required

[R] YALAQ - Yet Another LApply Question

2008-10-09 Thread Thompson, David (MNR)
Hello, Two lapply questions (system info and sample data below): 1) Why does the first form of command1 add the name of y _after_ the str() output rather than before as does the second (preferred) form? # command1 version1 invisible(lapply(ls(pattern='bn'), function(y) cat(y, "\n", str(get(

Re: [R] YAPMQ - Yet Another PlotMath Question

2008-06-19 Thread Thompson, David (MNR)
>-Original Message- >From: Katharine Mullen [mailto:[EMAIL PROTECTED] >Sent: June 19, 2008 04:26 PM >To: Thompson, David (MNR) >Cc: r-help@r-project.org >Subject: Re: [R] YAPMQ - Yet Another PlotMath Question > >by example: > >slope <- 45 >plot(1:10

Re: [R] YAPMQ - Yet Another PlotMath Question

2008-06-19 Thread Thompson, David (MNR)
>-Original Message- >From: Peter Dalgaard [mailto:[EMAIL PROTECTED] >Sent: June 19, 2008 04:23 PM >To: Thompson, David (MNR) >Cc: r-help@r-project.org >Subject: Re: [R] YAPMQ - Yet Another PlotMath Question > >Thompson, David (MNR) wrote: >> Hello, &g

[R] YAPMQ - Yet Another PlotMath Question

2008-06-19 Thread Thompson, David (MNR)
Hello, I'm having trouble finding (remembering) how to pass values into text functions in plots, as demonstrated by: slope <- 45 ; plot(1:10) ; text(2, 7, labels = expression(45~degree)) ; text(2, 5, labels = paste(bquote(.(slope)), expression(degree))) Thanx, DaveT.

[R] echo Rprofile.site on startup

2008-06-17 Thread Thompson, David (MNR)
Hello, I have not been able to find how to have R echo the Rprofile.site contents to the console on start-up. Changing the windoze shortcut to include the '--verbose' option does not show what I am looking for. I would like to see the options and commands listed, in addition to the library() loadi

Re: [R] ggplot questions

2008-06-06 Thread Thompson, David (MNR)
"9", "10"), az = c(0, 360, 57, 94, 96, 152, 182, 185, 227, 264, 332, 354), dist = c(0, 16, 4.09, 2.8, 7.08, 7.09, 3.28, 7.85, 6.12, 1.97, 7.68, 7.9)), .Names = c("oplt", "rplt", "az", "dist"), row.names = c(NA, 12L), class = "dat

Re: [R] ggplot questions

2008-06-06 Thread Thompson, David (MNR)
Thanx Thierry, Suggestion #1 had no effect. I have been playing with variants on #2 along the way. DaveT. >-Original Message- >From: ONKELINX, Thierry [mailto:[EMAIL PROTECTED] >Sent: June 6, 2008 04:02 AM >To: Thompson, David (MNR); hadley wickham >Cc: r-help@r-project.o

Re: [R] ggplot questions

2008-06-05 Thread Thompson, David (MNR)
Thanx Hadley, More questions inline. >-Original Message- >From: hadley wickham [mailto:[EMAIL PROTECTED] >Sent: June 5, 2008 01:09 PM >To: Thompson, David (MNR) >Cc: r-help@r-project.org >Subject: Re: [R] ggplot questions > >On Wed, Jun 4, 2008 at 2:03

[R] ggplot questions

2008-06-04 Thread Thompson, David (MNR)
Hello, A few questions about the following examples: 1. Why do the two plotting versions not produce the same result? 2. Is the 'scale_x_continuous' (or *_y_* or *_*_discrete) geom the best way to setup grids (as in visual guide-lines) in polar (or for that matter, any) coordinate system? 3. Why d

Re: [R] Thank you

2008-05-30 Thread Thompson, David (MNR)
Yes! Again, thank you ALL very, very much. Even simply lurking on the list generates many gems worth collecting. DaveT. >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >I totally agree both of you. This is a super place to mature the R. >I learn a lot from this R heaven! >Chunhao > >Quoting Es

Re: [R] list manipulation

2008-05-07 Thread Thompson, David (MNR)
Beautiful! Thanks Jim. DaveT. >-Original Message- >From: jim holtman [mailto:[EMAIL PROTECTED] >Sent: May 6, 2008 07:33 PM >To: Thompson, David (MNR) >Subject: Re: [R] list manipulation > >The reason for the NULLs is that is the output of the lapply you are >

Re: [R] list manipulation

2008-05-06 Thread Thompson, David (MNR)
UE Which is far cleaner and more compact (which was probably what I was _actually_ looking for) than what I had started with. Thanx, DaveT. >-Original Message- >From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] >Sent: May 6, 2008 02:47 PM >To: Thompson, David (MNR) >Subject:

[R] list manipulation

2008-05-06 Thread Thompson, David (MNR)
Hello, I have a set of one-liners (many thanks to previous responses from this list) that I use to look at newly imported data sets with functions like dim(), names(), str(), etc. within lapply(). Generally, these commands work for me but, I am apparently still missing some aspect of list manipula

[R] Recovering SPlus GraphSheets

2008-04-10 Thread Thompson, David (MNR)
Hello, Is it possible with R to recover the contents of SPlus GraphSheets (*.sgr) without access to SPlus? Also, some of the .sgr files may have multiple pages. Thanx, DaveT. * Silviculture Data Analyst Ontario Forest Research Institute Ontario Ministry of Natu

Re: [R] Changing default plot behaviour

2008-04-09 Thread Thompson, David (MNR)
, 2008 03:16 PM >To: Thompson, David (MNR); r-help@r-project.org >Subject: Re: [R] Changing default plot behaviour > >This may be a bit simple minded but why not change >those commmands into a single function something like >this and run it rather than the actual plot command? &

[R] Changing default plot behaviour

2008-04-09 Thread Thompson, David (MNR)
Hello, How would I make the default behaviour of my plots produce output such as the following (i.e. tick marks inside on all axes, labels only on two (arbitrary?) sides) without needing the five additional commands each time? plot(1:10, axes=FALSE) axis(1, tcl=0.5) axis(2, tcl=0.5) axis(3, tcl=0

Re: [R] Finding Interaction and main effects contrasts for two-way ANOVA

2008-03-07 Thread Thompson, David (MNR)
Dale, Other than the first SAS contrast, does the following demonstrate what your asking for? > summary(twoway) material temp voltage 1:12 50:12 Min. : 20 2:12 65:12 1st Qu.: 70 3:12 80:12 Median :108 Mean :106 3rd Qu.

[R] Summary: Reorder data frame columns by negating list of names

2008-02-12 Thread Thompson, David (MNR)
mes(xxx))]) [1] 2 4 8 1 3 5 6 7 Thanks again, DaveT. ***** Silviculture Data Analyst Ontario Forest Research Institute Ontario Ministry of Natural Resources [EMAIL PROTECTED] http://ofri.mnr.gov.on.ca * - Original Message - From:

[R] Reorder data frame columns by negating list of names

2008-02-12 Thread Thompson, David (MNR)
Hello, I would like to reorder columns in a data frame by their names as demonstrated below: Take this data frame: > xxx <- data.frame(matrix(1:40, ncol=8)) > names(xxx) <- letters[1:8] > xxx a b c d e f g h 1 1 6 11 16 21 26 31 36 2 2 7

[R] Can I index a dataframe with a reference from/to a second dataframe?

2008-02-08 Thread Thompson, David (MNR)
Hello, I am unable to figure out how to code a new column in a data frame based on an existing column that matches a column in a reference data frame, in a relational-db fashion. I would like this to maintain a minimum set of reference tables that may be reused over several similar datasets. Spec

Re: [R] Converting plots to ggplot2

2008-01-18 Thread Thompson, David (MNR)
Hello Hadley, Thank you (and Domenico) for your help. I'm almost there. For convenience, I'll restate the question. With the following data: a <- seq(0, 360, 5)*pi/180 ; a ac <- sin(a + (45*pi/180)) + 1 ; ac s <- seq(5, 45, 10)*pi/180 ; s asc <- lapply(s, function(x) x*cos(ac) + x*

[R] Converting plots to ggplot2

2008-01-17 Thread Thompson, David (MNR)
Hello Hadley, I am trying to reproduce the following with ggplot: a <- seq(0, 360, 5)*pi/180 ; a ac <- sin(a + (45*pi/180)) + 1 ; ac plot(a, ac, type='b', xaxt = "n") axis(1, at=seq(0,6,1), labels=round(seq(0,6,1)*180/pi),1) abline(v=c(45*pi/180, 225*pi/180)) I can get the bas

[R] Solution: Available environment variables

2007-12-21 Thread Thompson, David (MNR)
Thank you Duncan (additional comments below), >-Original Message- >From: Duncan Murdoch [mailto:[EMAIL PROTECTED] >Sent: December 20, 2007 02:36 PM >To: Thompson, David (MNR) >Cc: r-help@r-project.org >Subject: Re: [R] Available environment variables > >On 20/1

[R] Available environment variables

2007-12-20 Thread Thompson, David (MNR)
Hello, I am trying to set my environment to streamline the downloading / updating of packages. I have been through R-intro.html (10.8 Customizing-the-environment), R-FAQ (5.2 How can add-on packages be installed?), rw-FAQ, and help pages for Sys.setenv {base}, download.packages {utils}, etc.,. I

Re: [R] str() options

2007-11-29 Thread Thompson, David (MNR)
Beautiful! Exactly what I was looking for. Thank you, Gabor >-Original Message- >From: Gabor Grothendieck [mailto:[EMAIL PROTECTED] >Sent: November 27, 2007 05:02 PM >To: Thompson, David (MNR) >Subject: Re: [R] str() options > >On Nov 27, 2007 1:55 PM, Thompson,

[R] str() options

2007-11-27 Thread Thompson, David (MNR)
Hello, Is there a way to have str() and ls.str() return all factor levels? Thanx, DaveT. * Silviculture Data Analyst Ontario Forest Research Institute Ontario Ministry of Natural Resources [EMAIL PROTECTED] http://ofri.mnr.gov.on.ca ___

[R] Summary: Process multiple columns of data.frame

2007-11-22 Thread Thompson, David (MNR)
Thank you Jim Holtman and Mark Leeds for your help. Original question: >How do I do the following more concisely? > Bout[is.na(Bout$bd.n), 'bd.n'] <- 0 > Bout[is.na(Bout$ht.n), 'ht.n'] <- 0 > Bout[is.na(Bout$dbh.n), 'dbh.n'] <- 0 >. . . Solution: for (i in c('bd.n', 'ht.n', 'db

Re: [R] Process multiple columns of data.frame

2007-11-20 Thread Thompson, David (MNR)
etained. So, I appear to be on my way again. Thanx again, DaveT. * >-Original Message- >From: jim holtman [mailto:[EMAIL PROTECTED] >Sent: November 20, 2007 04:21 PM >To: Thompson, David (MNR) >Cc: r-help@r-project.org >Subject: Re: [

Re: [R] Process multiple columns of data.frame

2007-11-20 Thread Thompson, David (MNR)
* >-Original Message----- >From: jim holtman [mailto:[EMAIL PROTECTED] >Sent: November 20, 2007 02:25 PM >To: Thompson, David (MNR) >Cc: r-help@r-project.org >Subject: Re: [R] Process multiple columns of data.frame > >It really depends on what you want to set th

[R] Process multiple columns of data.frame

2007-11-20 Thread Thompson, David (MNR)
Hello, How do I do the following more concisely? Bout[is.na(Bout$bd.n), 'bd.n'] <- 0 Bout[is.na(Bout$ht.n), 'ht.n'] <- 0 Bout[is.na(Bout$dbh.n), 'dbh.n'] <- 0 Would the form of such a command be different between numeric, character and factor columns? . . . between data.f