Re: [R] merge

2005-07-08 Thread Marc Schwartz
See ?sub for more information. Be cautious in this case, as you will need to coerce any factors to character vectors as I have done above, and then possibly re-coerce to a factor as you may require. HTH, Marc Schwartz On Fri, 2005-07-08 at 20:10 -0400, Gabor Grothendieck wrote: trim in package

Re: [R] Overlying a Normal Dist in a Barplot

2005-07-08 Thread Marc Schwartz
with the bar centers curve(dnorm(x, 2.84 + 0.5, 1.57), add = TRUE) I think that does it. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org

Re: [R] not supressing leading zeros when reading a table?

2005-07-10 Thread Marc Schwartz
rrr hhh 01 str(df) `data.frame': 2 obs. of 3 variables: $ name : chr xx rrr $ surname: chr yyy hhh $ answer : chr 00100 01 See the colClasses argument in ?read.table. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list

Re: [R] help: how to change the size of a window after it has been created

2005-07-14 Thread Marc Schwartz
first using dev.off() before the subsequent plots. However, you lose the current plot as soon as you close it. X11(width = 11, height = 8) plot(1:10) dev.off() X11(width = 5, height = 5) barplot(1:5) dev.off() HTH, Marc Schwartz __ R-help

Re: [R] .gct file

2005-07-19 Thread Marc Schwartz
On Tue, 2005-07-19 at 13:08 -0500, Marc Schwartz (via MN) wrote: For the TAB delimited columns, adjust the 'sep' argument to: read.table(data.gct, skip = 2, header = TRUE, sep = \t) The 'quote' argument is by default: quote = \' which should take care of the quoted strings and bring

Re: [R] Question about 'text'

2005-07-24 Thread Marc Schwartz
and down from the upper left hand corner by 10% of the plot region width/height. One more tweak in the legend() call. Use rep() for the pch characters. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help

Re: [R] Dates are read as factors!

2005-07-27 Thread Marc Schwartz
in date based arithmetic, etc. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] Displaying p-values in latex

2005-07-28 Thread Marc Schwartz
signs in the second line should similarly be surrounded: $-$0.37 I have cc:d Frank here for his clarifications. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] question on graphs and finding area under a curve

2005-08-02 Thread Marc Schwartz
, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] hash code for arbitrary object

2005-08-02 Thread Marc Schwartz
to compute hash(x) should be quite short. Any suggestions welcome thanks Adrian Baddeley Take a look at Dirk Eddelbuettel's digest() function in the package of the same name on CRAN. Be sure to read the details section for caveats regarding collisions. HTH, Marc Schwartz

Re: [R] problem with for()

2005-08-03 Thread Marc Schwartz
2 3 4 5 thank you, simone Nothe indexing of R objects is 1 based. Thus your first loop tried to set i[0], which is a non-existent entry. i - 0:5 i [1] 0 1 2 3 4 5 i[0] numeric(0) i[1] [1] 0 HTH, Marc Schwartz __ R-help

Re: [R] problem with for()

2005-08-03 Thread Marc Schwartz
On Thu, 2005-08-04 at 00:25 +0200, Simone Gabbriellini wrote: how can I have a 0 evaluated in my loop then? it is important for my algorithm do you have any hints? simone Il giorno 03/ago/05, alle ore 23:37, Marc Schwartz ha scritto: On Wed, 2005-08-03 at 23:24 +0200, Simone

Re: [R] Determining physical display dimensions

2005-08-20 Thread Marc Schwartz
per inch HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] help on retrieving output from by( ) for regression

2005-08-25 Thread Marc Schwartz
, Marc Schwartz On Thu, 2005-08-25 at 14:57 +0200, TEMPL Matthias wrote: Look more carefully at ?lm at the See Also section ... X - rnorm(30) Y - rnorm(30) lm(Y~X) summary(lm(Y~X)) Best, Matthias Hi all I used a function qtrregr - by(AB, AB$qtr, function(AB) lm(AB

Re: [R] Matrix oriented computing

2005-08-26 Thread Marc Schwartz
, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] standard deviation in barplots

2005-09-01 Thread Marc Schwartz
, 314.3, 20.1, 204.0, 96.0, 96.0, 115.0, 36.0, 0.0, 0.0) barplot2(xrow, plot.ci = TRUE, ci.l = ci.l, ci.u = ci.u) HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] png scaling problem

2005-09-02 Thread Marc Schwartz
postscript here will also better enable the 50% reduction that is mentioned, given the vector based format here. The key here also is to be sure that the plot looks good in the target format, not on the screen, which includes text size, readability and positioning, etc. HTH, Marc Schwartz On Fri

[R] The Perils of PowerPoint

2005-09-02 Thread Marc Schwartz
registration. The 'Strib site seems to be open for the moment: http://www.startribune.com/stories/1519/5591930.html I thought folks might find it interesting. Best regards, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch

Re: [R] png scaling problem

2005-09-02 Thread Marc Schwartz
mtext(3, line = 2, text = Main Barplot Title, cex = 4) Again, with the above, be sure to check the output in the target format, not on the screen. They will not always be the same. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https

Re: [R] The Perils of PowerPoint

2005-09-02 Thread Marc Schwartz
LOL Ted! That's a great quote for fortune()! On Sat, 2005-09-03 at 01:06 +0100, Ted Harding wrote: On 02-Sep-05 Sean O'Riordain wrote: I can't lay my hands n it at the moment - its around here somewhere, but in Numerical Methods That Work by Forman Acton, the author points out that the

Re: [R] why this postscript didn't work?

2005-09-20 Thread Marc Schwartz
that if you want to create an EPS output file, you would need something like: postscript(foo.ps, width = 6, height = 6, horizontal = FALSE, onefile = FALSE, paper = special) See the Details section of ?postscript and also ?layout. HTH, Marc Schwartz

Re: [R] List Email Statistic

2005-09-30 Thread Marc Schwartz
(which is targeted more to statistics education discussion) has been split off as a gateway to the edstat-L list, which has substantively reduced its daily volume. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman

Re: [R] Multiple expressions, when using substitute()

2005-10-01 Thread Marc Schwartz
'. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] X-Axis Label Overwritten By TickMark Values

2005-10-01 Thread Marc Schwartz
. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] questions about R

2005-10-01 Thread Marc Schwartz
= paste(file, i, .csv, sep = ), row.names = FALSE, col.names = FALSE, sep = ,) } HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R

Re: [R] List Email Statistic

2005-10-01 Thread Marc Schwartz
(http://tinyurl.com/bwha8) ED-STATS (http://lists.psu.edu/archives/edstat-l.html) and a few more http://tinyurl.com/a8wo4 Regards, Adai On Fri, 2005-09-30 at 07:32 -0500, Marc Schwartz wrote: On Thu, 2005-09-29 at 23:47 -0500, José Raul Capablanca wrote: Dear All, How can I can

Re: [R] Y-Axis Label Overwritten By TickMark Values

2005-10-01 Thread Marc Schwartz
On Sat, 2005-10-01 at 16:00 -0500, Paul Roebuck wrote: On Sat, 1 Oct 2005, Marc Schwartz wrote: On Sat, 2005-10-01 at 06:07 -0500, Paul Roebuck wrote: Can someone tell me how to fix the left margin of plot region such that the tick values don't overwrite the x-axis label? I haven't

Re: [R] multiple line plots

2005-10-05 Thread Marc Schwartz
liner R command to do what I want. Any tips would be appreciated. See the examples in ?plot.ts for some approaches. You will need to review ?ts to create time series objects from your data to be used in plot.ts(). Another approach, which is not specific to time series, is ?matplot. HTH, Marc

Re: [R] how to control ticks in plots with yasp or xasp

2005-10-08 Thread Marc Schwartz
with axTicks(), after using 'xaxt = n' and/or 'yaxt = n' in the plot call, depending upon the circumstances. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http

Re: [R] how to control ticks in plots with yasp or xasp

2005-10-08 Thread Marc Schwartz
On Sat, 2005-10-08 at 16:37 +0100, Prof Brian Ripley wrote: On Sat, 8 Oct 2005, Marc Schwartz wrote: On Sat, 2005-10-08 at 09:28 -0400, Denis Chabot wrote: Hi, A few times I tried to control the number and position of tick marks in plots with the yasp or xasp parameters. For example

Re: [R] greek symbols using pch

2005-10-09 Thread Marc Schwartz
on plotting mathematical expressions. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] text(x,y,greek character)

2005-10-10 Thread Marc Schwartz
, alpha, alpha, alpha, alpha, alpha, beta, beta, alpha, alpha) Thus, 'greek' can be used in text() as an expression. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] Writing to a file with fixed precision

2005-10-10 Thread Marc Schwartz
, row.names = FALSE, quote = FALSE) If needed, you can of course change the default delimiter from a to another character in write.table(). See ?write.table and ?sprintf. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https

Re: [R] iterative output to file by row

2005-10-10 Thread Marc Schwartz
to write.table(). See ?subset and ?write.table for more information. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] Writing to a file with fixed precision

2005-10-11 Thread Marc Schwartz
On Tue, 2005-10-11 at 08:42 +0100, Prof Brian Ripley wrote: On Mon, 10 Oct 2005, Marc Schwartz wrote: On Mon, 2005-10-10 at 19:50 -0400, Richard Hedger wrote: Hi, I'm trying to ouput to a filled with a fixed precision: eg. if I have data x=c(1.0,1.4,2.0), I want to be able to ouput

Re: [R] R and SAS pointer/informat functionality

2005-10-11 Thread Marc Schwartz
' argument to skip columns. HTH, Marc Schwartz Greetings from Eden Prairie __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] adding 1 month to a date

2005-10-11 Thread Marc Schwartz
, the date format is consistent with the default. Pay attention to the 'format' argument in as.Date() if your dates should be in other formats. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] bug checking

2005-10-11 Thread Marc Schwartz
, before you post a bug report, as that would avoid a more energetic response. Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] bug checking

2005-10-11 Thread Marc Schwartz
comment better on this. HTH, Marc Schwartz On Tue, 2005-10-11 at 18:02 -1000, Parlamis Franklin wrote: ## Code was long, so I simplified it by creating vectors from scratch so it would run as is. Putative bug is still evidenced on the x axis discount.factors.dates - seq.dates(from=09/30

Re: [R] bug checking

2005-10-12 Thread Marc Schwartz
is operated upon in the same fashion as col. HTH, Marc Schwartz On Tue, 2005-10-11 at 21:06 -1000, Parlamis Franklin wrote: Thanks all for following up. I'll consider the bug filed. I should note for the record that if 'col=red' is replaced in my code by 'col.main=red' the x axis

Re: [R] adding 1 month to a date

2005-10-12 Thread Marc Schwartz
this. -Original Message- From: Marc Schwartz [mailto:[EMAIL PROTECTED] Sent: Tuesday, October 11, 2005 10:16 PM To: t c Cc: r-help@stat.math.ethz.ch Subject: Re: [R] adding 1 month to a date On Tue, 2005-10-11 at 16:26 -0700, t c wrote: Within an R dataset, I have a date

Re: [R] Newbie problem with read.table

2005-10-12 Thread Marc Schwartz
is 'sep = ', which is any whitespace. Hence, if your file is tab delimited, you need to modify your call to: ttbar - read.table(test2.dat, header = TRUE, sep = \t) HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman

Re: [R] Newbie problem with read.table

2005-10-12 Thread Marc Schwartz
On Wed, 2005-10-12 at 14:56 +0200, Roger Bivand wrote: On Wed, 12 Oct 2005, Jan Conrad wrote: Hi R, I have a seemingly simple problem. I have a table in following format (tab seperated) Njets NBjets NElec NMuon Meff HTHT3j HEAplan Plan

Re: [R] shell scripts in R

2005-10-13 Thread Marc Schwartz
on the same page, you would have seen that all three show the use of quotes around the command and indeed two of the three use the 'ls' command specifically. Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] unexpected results

2006-07-21 Thread Marc Schwartz
are indicating that the delimiter is a TAB character, not a comma. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide

Re: [R] Main title of plot

2006-07-26 Thread Marc Schwartz
(maximum gain =,p)) See ?paste for concatenating multiple vectors into a single character vector (string). HTH, Marc Schwartz On Wed, 2006-07-26 at 07:29 -0400, Gabor Grothendieck wrote: This was just discussed yesterday. See the thread: https://www.stat.math.ethz.ch/pipermail/r-help/2006

Re: [R] seq unexpected behavior

2006-07-26 Thread Marc Schwartz
in a negative interval. In the second case, it is slightly greater than 0.1, which is OK. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting

Re: [R] RODBC on linux

2006-07-26 Thread Marc Schwartz
running on RHEL, however Oracle provides the ODBC driver for Linux that can work with the unixODBC facilities. Also, note that there is a R-sig-DB e-mail list: https://stat.ethz.ch/mailman/listinfo/r-sig-db HTH, Marc Schwartz __ R-help

Re: [R] RODBC on linux

2006-07-26 Thread Marc Schwartz
On Wed, 2006-07-26 at 21:38 -0500, Dirk Eddelbuettel wrote: On 26 July 2006 at 20:56, Marc Schwartz wrote: | On Wed, 2006-07-26 at 17:52 -0400, Armstrong, Whit wrote: | Anyone out there using Linux RODBC and unixODBC to connect to a | Microsoft SQL server? [...] | Do you have a Linux ODBC

Re: [R] Problems with RODBC

2006-07-27 Thread Marc Schwartz
source. You did not indicate which Linux distribution you are using, but if you are on an RPM based distribution, you need to install 'unixODBC-devel'. It looks like Debian based distributions use 'unixodbc-devel' (Note lack of capitalization). HTH, Marc Schwartz

Re: [R] deparse(substitute(foo))

2006-07-27 Thread Marc Schwartz
))) Can someone suggest a way to extract the variable names when they are passed as a list via ... ? Thanks, Whit Try this: x - 1:10 y - 10:20 foo - function(...) { sapply(match.call()[-1], deparse) } foo(x, y) [1] x y HTH, Marc Schwartz

Re: [R] string-to-number

2006-08-19 Thread Marc Schwartz
On Sat, 2006-08-19 at 13:30 +0100, Prof Brian Ripley wrote: On Sat, 19 Aug 2006, Marc Schwartz wrote: On Sat, 2006-08-19 at 07:58 -0400, Charles Annis, P.E. wrote: Greetings, Amigos: I have been trying without success to convert a character string, repeated.measures.columns

Re: [R] string-to-number

2006-08-20 Thread Marc Schwartz
an understanding of where the time is spent in the processing by profiling and then consider how to introduce efficiencies, which in some cases may very well require the use of compiled C/FORTRAN as may be appropriate if times become too long. HTH, Marc Schwartz

Re: [R] boxplot order of the levels

2006-08-22 Thread Marc Schwartz
wn k.A. how can i change the order of the boxes bye thomas See the following post from last week: https://stat.ethz.ch/pipermail/r-help/2006-August/111289.html HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch

Re: [R] plot question

2006-08-25 Thread Marc Schwartz
: RSiteSearch(do.points, restrict = functions) will search the online function documentation, bringing up a browser window, where the first link gets you to ?plot.stepfun. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch

Re: [R] for() loop question

2006-08-26 Thread Marc Schwartz
] 0.5 [1] 0.6 for (i in seq(along = x)) {print (x[i])} [1] 0.1 [1] 0.5 [1] 0.6 Which approach you take tends to depends upon what else you are doing within the loop. I would also take a look at ?sapply, depending up what is it you are doing. HTH, Marc Schwartz

Re: [R] Legend box line thickness

2006-08-28 Thread Marc Schwartz
= box.lwd, lty = box.lty) HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self

Re: [R] Axes of a histogram

2006-09-07 Thread Marc Schwartz
, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] barplot: different colors for the bar and the strips

2006-09-07 Thread Marc Schwartz
:5, col = black, density=c(1:5), add = TRUE) Just be sure that any other arguments, such as axis limits, are identical between the two calls. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE

Re: [R] Kendall's tau-c

2006-09-12 Thread Marc Schwartz
, along with other such measures, will eventually find its way into the CrossTable() function in the gmodels CRAN package when time permits (which seems to be in short supply of late...) HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https

Re: [R] hist for two sets

2006-09-14 Thread Marc Schwartz
, ?text and ?format (or ?formatC or ?sprintf). HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented

Re: [R] group bunch of lines in a data.frame, an additional requirement

2006-09-14 Thread Marc Schwartz
Emmanuel, I wouldn't be surprised if Gabor comes up with something, but since aggregate() can only return scalars, you can't do it in one step here. There are possibilities using other functions such as split(), tapply() or by(), but each has it own respective limitations requiring more than one

Re: [R] LARS for generalized linear models

2006-09-15 Thread Marc Schwartz
-help/2006-August/111352.html HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self

Re: [R] Insert R code in LaTeX document

2006-09-17 Thread Marc Schwartz
, then just put it in the body of your main .tex file and you don't have to worry about multiple files or using \input, etc. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting

Re: [R] Thousand separator in format of axis

2006-09-17 Thread Marc Schwartz
) HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.

Re: [R] Cochrans Q Test

2006-09-18 Thread Marc Schwartz
= 23.9298, df = 11, p-value = 0.01303 BTW, a quick Google search shows that the pcochran() function is in the 'outliers' package on CRAN, which also has a cochran.test() function HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https

Re: [R] R data query

2006-09-21 Thread Marc Schwartz
within the environment of the data frame: with(fish3.fis, hist(CPUE)) 4. Use the [ function: hist(fish3.fis[, CPUE]) 5. Use the [[ function: hist(fish3.fis[[CPUE]]) This is covered in An Introduction to R. HTH, Marc Schwartz __ R-help

Re: [R] Print and supressing printing in function

2006-09-24 Thread Marc Schwartz
[1] 10 HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible

Re: [R] Print and supressing printing in function

2006-09-24 Thread Marc Schwartz
On Sun, 2006-09-24 at 14:14 -0500, Sundar Dorai-Raj wrote: Marc Schwartz said the following on 9/24/2006 1:56 PM: On Sun, 2006-09-24 at 11:31 -0700, Jonathan Greenberg wrote: Another newbie question for you all: In a function, say I have: countme - function() { for(i in 1:10

Re: [R] Histogram

2006-09-27 Thread Marc Schwartz
about this: X - c(0, 0.1, 0.4, 0.45, 0.55) Y - c(25, 22, 11, 21) barplot(Y, space = 0, width = diff(X)) axis(1) See ?barplot and ?diff HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Writing Text into Plots

2006-10-05 Thread Marc Schwartz
Also section of ?text HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained

Re: [R] Aggregate Values for All Levels of a Factor

2006-10-05 Thread Marc Schwartz
3.5 2red 6.0 3 green 4.0 4 orange NA HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html

Re: [R] Question about error of non-numeric argument to binary operator

2006-10-10 Thread Marc Schwartz
that process or alternatively, coerce 'x' to numeric: x.num - as.numeric(x) x.num [1] 122.0 126.5 136.0 148.0 147.0 150.5 143.5 x.num / 1 [1] 122.0 126.5 136.0 148.0 147.0 150.5 143.5 HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https

Re: [R] impossible escape?

2006-10-11 Thread Marc Schwartz
character \n will return the cursor to the next line, so that the R prompt is not at the end of the last line output. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide

Re: [R] Question about error of non-numeric argument to binary operator

2006-10-11 Thread Marc Schwartz
Yulei, It would appear that the default mechanism for the function (which appears to be Windows specific) is to read in the data from the current system clipboard as a _character vector_. Thus, perhaps something like: x.num - as.numeric(readClipboard()) would be helpful. With respect to

Re: [R] sending help output to a file

2006-10-12 Thread Marc Schwartz
with: $ uname -a Linux horizons 2.6.17-1.2187_FC5 #1 Mon Sep 11 01:17:06 EDT 2006 i686 i686 i386 GNU/Linux HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http

Re: [R] avoiding a loop?

2006-10-12 Thread Marc Schwartz
,Insp9 paste() is vectorized and note the use of 'collapse' in lieu of 'sep': paste(repeated.measures.FACTOR.names, collapse = ,) [1] Insp1,Insp2,Insp3,Insp4,Insp5,Insp6,Insp7,Insp8,Insp9 HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list

Re: [R] avoiding a loop?

2006-10-12 Thread Marc Schwartz
On Thu, 2006-10-12 at 12:07 -0500, Marc Schwartz wrote: On Thu, 2006-10-12 at 12:43 -0400, Charles Annis, P.E. wrote: I have a vector, (not a list) repeated.measures.FACTOR.names [1] Insp1 Insp2 Insp3 Insp4 Insp5 Insp6 Insp7 Insp8 Insp9 and would like to convert this into a single

Re: [R] Multiple barplots on the same axis

2006-10-13 Thread Marc Schwartz
like: VADeaths See ?barplot for more information. There is also an R Graphics Gallery with code at: http://addictedtor.free.fr/graphiques/index.php and From Data to Graphics at: http://zoonek2.free.fr/UNIX/48_R/03.html Both of which are helpful. HTH, Marc Schwartz

Re: [R] Log-scale in histogramm

2006-10-13 Thread Marc Schwartz
transforming your data. For example: # Generate 100 random values from a log normal dist: x - rlnorm(100) # Now do a histogram on x hist(x, freq = FALSE) # Now use log(x) hist(log(x), freq = FALSE) Does that help? Marc Schwartz __ R-help@stat.math.ethz.ch

Re: [R] nontabular logistic regression

2006-10-13 Thread Marc Schwartz
functions. This avoids the confusion of having multiple copies of the source data set and wondering why changes made can become confusing and problematic. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] Hide line ends behind unfilled circles?

2006-10-15 Thread Marc Schwartz
, yy, pch = 21, bg = col, cex = 3) The unfilled circles in this case are actually solid white or black. So instead of altering the point character (pch), we alter the colors. HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https

Re: [R] BarPlot

2006-10-15 Thread Marc Schwartz
(..., col = cols, ...) See ?ifelse HTH, Marc Schwartz __ R-help@stat.math.ethz.ch mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal

Re: [R] help with plot()

2006-10-16 Thread Marc Schwartz
, as plot.factor() will be used. You should be using: d - read.table(c:/test/sp.txt, header = TRUE) Use: str(d) to review the current structure of your data frame. That should give you some hints. HTH, Marc Schwartz On Mon, 2006-10-16 at 10:54 -0500, tom soyer wrote: Hi David and Duncan, Thanks

Re: [R] using text on the x axis ticks rather than numbers

2004-09-07 Thread Marc Schwartz
, labels = labels, xpd = TRUE) # plot x axis label at line 6 (of 7) mtext(1, text = X Axis Label, line = 6) You can adjust the value of the '0.25' offset as required to move the x axis labels up or down relative to the x axis. HTH, Marc Schwartz

Re: [R] boxplot() from list

2004-09-12 Thread Marc Schwartz
of the four columns in your list matrices. You can then adjust the additional arguments to boxplot() as you require. See ?sapply for more information on accessing list member elements and returning a vector or matrix. HTH, Marc Schwartz __ [EMAIL PROTECTED

Re: [R] boxplot() from list

2004-09-12 Thread Marc Schwartz
On Sun, 2004-09-12 at 11:42, Prof Brian Ripley wrote: On Sun, 12 Sep 2004, Marc Schwartz wrote: On Sun, 2004-09-12 at 10:10, Laura Quinn wrote: I have a list containing 48 objects (each with 30 rows and 4 columns, all numeric), and wish to produce 4 boxplot series (with 48 plots in each

Re: [R] Spare some CPU cycles for testing lme?

2004-09-13 Thread Marc Schwartz
) The backtrace from gdb follows. It would probably make sense to move this thread to r-devel. As you can see, it got through 10,546 runs before segfaulting. cc: to Doug. HTH, Marc Schwartz dump-sapply( 1:5, function(i) { + fm - lme(langPOST ~ IQ.ver.cen + avg.IQ.ver.cen, data = bdf

Re: followup: Re: [R] Issue with predict() for glm models

2004-09-23 Thread Marc Schwartz
2003), in the first example, with a standard linear regression model. HTH, Marc Schwartz __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] using tcltk in R under ESS/XEmacs on Windows

2004-09-24 Thread Marc Schwartz
On Fri, 2004-09-24 at 15:02, Liaw, Andy wrote: Sorry for the cross-post. Not sure where the problem is... A while back I posted an R function to R-help: cd - function (dir = tclvalue(tkchooseDirectory()), saveOld = FALSE, loadNew = TRUE) { stopifnot(require(tcltk)) if

Re: [R] R plot problems

2004-10-15 Thread Marc Schwartz
that other string/character rotation (via argument srt to par) does not affect the axis labels Henric See the new R FAQ: 7.27 How can I create rotated axis labels? HTH, Marc Schwartz __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman

Re: [R] pdf device --- axes labels text disappeared?

2004-10-15 Thread Marc Schwartz
with 64 bit R. Though again, I suspect other 64 bit users would have commented on this already... HTH, Marc Schwartz __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org

Re: [R] displaying sample size in boxplots

2004-09-29 Thread Marc Schwartz
the group names mtext(side = 1, text = S$n, at = 1:length(S$names), line = 2) HTH, Marc Schwartz __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

RE: [R] Boxplot, space to axis

2004-09-30 Thread Marc Schwartz
] 0.00 85.00 -4.379829 3.844485 You can do further adjustments to the x axis range as you require in the call to plot.window(). HTH, Marc Schwartz __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read

Re: [R] Can grid lines color in a plot be specified?

2004-10-01 Thread Marc Schwartz
) HTH, Marc Schwartz __ [EMAIL PROTECTED] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html

Re: [R] Can grid lines color in a plot be specified?

2004-10-01 Thread Marc Schwartz
On Fri, 2004-10-01 at 08:15, Marc Schwartz wrote: On Fri, 2004-10-01 at 07:44, Luis Rideau Cruz wrote: R-help Is there any way to specify the color of grid lines in a simple plot? par(color.tick.marks=c(grey)) plot(rnorm(10),tck=1) Thank you Oknow that I have finished

RE: [R] Can grid lines color in a plot be specified?

2004-10-01 Thread Marc Schwartz
On Fri, 2004-10-01 at 09:31, [EMAIL PROTECTED] wrote: I usually use something like abline(h=seq(...),col=green) abline(v=seq(...),col=green) This allows you to have irregularly spaced grid lines if you want. (Say for futures expiration dates in my case.) Also, as Marc pointed out, you

Re: [R] Lattice .ps graphic is rotated in LaTeX slides

2004-10-01 Thread Marc Schwartz
On Fri, 2004-10-01 at 10:58, Peter Dalgaard wrote: Michael Friendly [EMAIL PROTECTED] writes: ! Package graphics Error: Division by 0. What am I doing wrong, or how could I do it differently so it would work? You might try \usepackage{graphicx} instead. I seem to recall (vaguely)

Re: [R] Lattice .ps graphic is rotated in LaTeX slides - PDF weirdness

2004-10-01 Thread Marc Schwartz
On Fri, 2004-10-01 at 12:54, Peter Dalgaard wrote: Barry Rowlingson [EMAIL PROTECTED] writes: Marc Schwartz wrote: The one advantage of the Beamer package, for those that require it, is that it supports pdflatex, which the others do not. Though, it can be used with dvips/latex

Re: [R] Off-Topic: LaTeX package listings

2004-10-03 Thread Marc Schwartz
{verbatim} In the verbatim environment, all characters are treated literally, rather than interpreted by any special meaning. Outside of that, say in a regular LaTeX document, you can escape the %: \% HTH, Marc Schwartz __ [EMAIL PROTECTED] mailing list

  1   2   3   4   5   6   7   8   9   10   >