Re: [R] print.data.frame : row.name = FALSE not having intended effect

2008-09-23 Thread Vincent Goulet
Le mar. 23 sept. à 22:33, Matthew Pettis a écrit : Thanks Dirk, One more question, then... I looked at the link, but haven't tried all the steps, Well, you should. They're tested and true instructions. but I am worried that the original listings in /etc/apt/sources.list will mask the vers

Re: [R] Generating series of distributions with the same skewness and different kurtosis or with same kurtosis and different skewness?

2008-09-23 Thread Yihui Xie
Well, let's take the Beta distribution for example. See http://en.wikipedia.org/wiki/Beta_distribution for the formulae of skewness and kurtosis. We can fix the skewness at, say, 2 and let alpha = 1, then solve beta from the equation of "skewness = 2", you will get beta = 1.8164966 or 0.1835034 app

[R] DEA question

2008-09-23 Thread John P. Burkett
Trying to learn to use the DEA package in R version 2.7.1 running under Gentoo Linux, I have applied dea.ccr.io.mul() and dea.ccr.oo.mul() to very simple artificial data. dea.ccr.io.mul() has produced exactly the results I expected. In contrast, dea.ccr.oo.mul() produces results that surprise

Re: [R] Bug in "is" ?

2008-09-23 Thread ctu
This is really bothering me! In the Dr. Venables and Dr. Ripley's book "S Programming" Page 105 shows that c(is(10,"integer"),is(10.5,"integer")) [1] T F But I try this in R 2.7.2 it shows c(is(10,"integer"),is(10.5,"integer")) [1] FALSE FALSE Does anyone know what is going on here? Apprec

Re: [R] Bug in "is" ?

2008-09-23 Thread Yihui Xie
Yes, everyone will agree "7" is an integer, but I don't think computers will agree too :-) R thinks it's a double-precision number, except when you explicitly specify it as an integer (say, as.integer()). > class(7) [1] "numeric" > is.double(7) [1] TRUE Regards, Yihui -- Yihui Xie <[EMAIL PROTEC

[R] Bug in "is" ?

2008-09-23 Thread ctu
Hi R users Is there anything wrong in "is" function? (R 2.7.2) I believe that everyone will agree that "7" is an integer, right? but why R shows 7 is not an integer is.integer(7) [1] FALSE is(7,"integer") [1] FALSE is(as.integer(7), "integer") [1] TRUE Thank you very much in advance Chu

Re: [R] How to draw arrows or segment lines in 3 dimensional graph

2008-09-23 Thread Yihui Xie
Hi, You need to converts coordinates from 3D (x, y, z) to 2D-projection (x, y), then use segments or arrows or other 2D low-level plot commands. Such transformation functions are very common in the returned value of a 3D plot function, e.g. scatterplot3d() in the package 'scatterplot3d' (there's a

[R] damaged text output of legend() and plot()

2008-09-23 Thread Alexandre Aguiar
Hi, System: laptop, Turion 64, Kubuntu Linux, Xorg X server 1.4.0.90, KDE 3.5.9, R 2.7.2 compiled with default settings. I recently changed my laptop setup to get better font rendering in the LCD monitor. Some "subpixel" stuff that limits quality of bitmaped fonts. When generating jpegs with R

Re: [R] How to draw the graph of f(x,y) = x * y ?

2008-09-23 Thread Ben Bolker
Paul Smith gmail.com> writes: > > > The function curve() draws the graph of functions from R to R. Is > there some homologous function to curve() to draw functions from R^2 > to R? > > There is a curve3d function in the emdbook package on CRAN. __

[R] Trouble understanding the behaviour of stableFit(fBasics)

2008-09-23 Thread Ted Byers
Can anyone explain such different output: > stableFit(s,alpha = 1.75, beta = 0, gamma = 1, delta = 0, + type = c("q", "mle"), doplot = TRUE, trace = FALSE, title = NULL, + description = NULL) Title: Stable Parameter Estimation Call: .qStableFit(x = x, doplot = doplot, title = title

Re: [R] How to convert backslash to slash?

2008-09-23 Thread Shengqiao Li
On Tue, 23 Sep 2008, Duncan Murdoch wrote: On 23/09/2008 4:00 PM, Shengqiao Li wrote: How to use sub, gsub, etc. to replace "\" in a string to "/"? For example,convert "C:\foo\bar" to "C:/foo/bar". If those are R strings, there are no backslashes in the first one. It has a formfeed and a

Re: [R] print.data.frame : row.name = FALSE not having intended effect

2008-09-23 Thread Matthew Pettis
Thanks Dirk, One more question, then... I looked at the link, but haven't tried all the steps, but I am worried that the original listings in /etc/apt/sources.list will mask the version of r-base-dev I want to install... How do I make sure to point it at the right repository (sorry for asking Ub

Re: [R] print.data.frame : row.name = FALSE not having intended effect

2008-09-23 Thread Dirk Eddelbuettel
On 23 September 2008 at 20:55, Matthew Pettis wrote: | Never mind -- the answer is buried in my own question... I was looking | at documentation for version 2.7.2, and when I looked at the one for | 2.6.2, I see the row.names option isn't in that release. | | Any suggestions on how I can code aro

Re: [R] print.data.frame : row.name = FALSE not having intended effect

2008-09-23 Thread Matthew Pettis
Thanks Rolf, I'm running this on Ubuntu Hardy Heron, and as far as I can tell from http://packages.ubuntu.com/search?keywords=r-base&searchon=names&suite=hardy§ion=all , v2.6.2 is the version they have available. The painless upgrade for me is to use 'aptitude' to get v2.7.x, otherwise I have to

Re: [R] Options for viewing / using results from lm

2008-09-23 Thread Greg Snow
The View function (note the uppercase V) is in the utils package, one of the standard ones that loads automatically. From: Michael Just [EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 2:49 PM To: Greg Snow Cc: r-help@r-project.org; [EMAIL PROTECTED] Subject: Re

Re: [R] print.data.frame : row.name = FALSE not having intendedeffect

2008-09-23 Thread Steven McKinney
Here's the current method for printing a data frame: > print.data.frame function (x, ..., digits = NULL, quote = FALSE, right = TRUE, row.names = TRUE) { n <- length(row.names(x)) if (length(x) == 0L) { cat("NULL data frame with", n, "rows\n") } else if (n == 0L) {

Re: [R] print.data.frame : row.name = FALSE not having intended effect

2008-09-23 Thread Rolf Turner
On 24/09/2008, at 1:55 PM, Matthew Pettis wrote: Never mind -- the answer is buried in my own question... I was looking at documentation for version 2.7.2, and when I looked at the one for 2.6.2, I see the row.names option isn't in that release. Any suggestions on how I can code around that in

Re: [R] print.data.frame : row.name = FALSE not having intended effect

2008-09-23 Thread Matthew Pettis
Never mind -- the answer is buried in my own question... I was looking at documentation for version 2.7.2, and when I looked at the one for 2.6.2, I see the row.names option isn't in that release. Any suggestions on how I can code around that in 2.6.2, so I don't have to upgrade to 2.7.2 just yet?

[R] print.data.frame : row.name = FALSE not having intended effect

2008-09-23 Thread Matthew Pettis
Hi, Does anybody know if row.name = FALSE actually works in v2.6.2? Because it isn't working for me... here is some sample code and output: ++++++++++ > print(x,row.names = FALSE) party_abbr candidate_name votes_candidate 2 DFLAMY K

[R] cannot allocate memory

2008-09-23 Thread DumpsterBear
I am getting "Error: cannot allocate vector of size 197 MB". I know that similar problems were discussed a lot already, but I didn't find any satisfactory answers so far! Details: *** I have XP (32bit) with 4GB ram. At the time when the problem appeared I had 1.5GB of available physical memory. **

Re: [R] Generating series of distributions with the same skewness and different kurtosis or with same kurtosis and different skewness?

2008-09-23 Thread zhijie zhang
Yihui, Could you please show me an example? What u have refered is clear for me, but i think the thing that i donot know how to handle with is to link the relationships between skewness/kurtosis and the distributions? Thanks. On Tue, Sep 23, 2008 at 11:48 PM, Yihui Xie <[EMAIL PROTECTED]> w

Re: [R] paste in xtable

2008-09-23 Thread Charilaos Skiadas
Actually the '\\textbf' specification would work just fine. If you examine test[,1] you'll see it contains the correct thing. The problem is when print.xtable is called. This is because it automatically contains a function that "sanitizes" the character entries to "fix" characters that have

[R] paste in xtable

2008-09-23 Thread Ryan D. Enos
Dear R help: I am trying to use paste(), within an ifelse() statement to insert latex commands into an object that has been created using xtable(). I cannot make the strings behave as I would like, the '\t' is creating a tab, the usual method of '\\t' is not working either - nor is any series

Re: [R] Counting character occurrences in data frame

2008-09-23 Thread Charles C. Berry
See ?ftable ?as.data.frame ?xtabs e.g. ftable( xtabs( ~code+year+month, your.df ), col.vars=1 ) as.data.frame( xtabs(~code+year+month, your.df ) ) HTH, Chuck On Tue, 23 Sep 2008, Hutchinson,David [PYR] wrote: Hi R-Users, I have a data frame contai

Re: [R] Counting character occurrences in data frame

2008-09-23 Thread Henrique Dallazuanna
Try this: with(DF, tapply(code, list(year, month, code), length)) On Tue, Sep 23, 2008 at 8:10 PM, Hutchinson,David [PYR] <[EMAIL PROTECTED]> wrote: > Hi R-Users, > > I have a data frame containing year, month, day, and code columns. The > code column is a unique character of set ('E','A','B') -

[R] Counting character occurrences in data frame

2008-09-23 Thread Hutchinson,David [PYR]
Hi R-Users, I have a data frame containing year, month, day, and code columns. The code column is a unique character of set ('E','A','B') - I am trying to determine an efficient way of summarizing the count of each of these codes by month and year without having to use for...loops and subsets. Do

Re: [R] How to put given values in lower triangle of splom-plot?

2008-09-23 Thread Deepayan Sarkar
On Sun, Sep 21, 2008 at 2:11 AM, Hofert Marius <[EMAIL PROTECTED]> wrote: > Dear R-experts, > > I have found a splom-modification online which is given below. This works > perfectly, but I would like to have a matrix of given correlation values to > be used in the lower triangular part (lower.panel

Re: [R] how to model this

2008-09-23 Thread jim holtman
One way of modeling this is to use discrete event simulation since you want some randomness to the time it takes trucks to travel and therefore be available for the next load. I have used this to model various aspects of loading and routing trucks. On Tue, Sep 23, 2008 at 4:58 PM, senne <[EMAIL P

Re: [R] Can R load a saved workspace from the Internet?

2008-09-23 Thread Paul Smith
On Tue, Sep 23, 2008 at 11:06 PM, Peter Dalgaard <[EMAIL PROTECTED]> wrote: >> Can load() load a saved workspace from an Internet address? I have >> tried it but I am getting errors: >> >> In addition: Warning message: >> In readChar(con, 5L, useBytes = TRUE) : >> cannot open compressed file 'http

Re: [R] Contional

2008-09-23 Thread Peter Alspach
Michael test[!duplicated(paste(test$timestamp, test$user_id)),] should remove the second (and subsequent) occurrences of duplicates. Your example suggests you don't always want to keep the first occurrence, but the rule which determines which occurrence you want to keep is not obvious to me. HT

[R] how to model this

2008-09-23 Thread senne
Dear list, I met with a business case and feel frustrated to model it,scenario is like this 1. logistics department running 2. a lot of customers place orders and goods need to be send to their site (nationwide) 3. order received and then choose from a list of truck carriers to deliver goods,a ch

Re: [R] Can R load a saved workspace from the Internet?

2008-09-23 Thread Peter Dalgaard
Paul Smith wrote: Dear All, Can load() load a saved workspace from an Internet address? I have tried it but I am getting errors: In addition: Warning message: In readChar(con, 5L, useBytes = TRUE) : cannot open compressed file 'http://X/workspace.RData', probable reason 'No such file or d

Re: [R] Proper power computation for one-sided binomial tests.

2008-09-23 Thread Peter Dalgaard
Collin Lynch wrote: Hi, I trying to determine the best way to compute the power for a one-sample one-sided binomial test. Specifically I need to sample a population of individuals and ask whether a sample rate of 0% is compatable with a minimum threshold of 3% and how many samples are needed. I

Re: [R] How to convert backslash to slash?

2008-09-23 Thread Duncan Murdoch
On 23/09/2008 4:00 PM, Shengqiao Li wrote: How to use sub, gsub, etc. to replace "\" in a string to "/"? For example,convert "C:\foo\bar" to "C:/foo/bar". If those are R strings, there are no backslashes in the first one. It has a formfeed and a backspace in it. Duncan Murdoch ___

Re: [R] Contional

2008-09-23 Thread jim holtman
Is this what you want: TRUE marks the ones to be removed > mark <- (head(x$timestamp, -1) == tail(x$timestamp, -1)) & + (head(x$user_id, -1) == tail(x$user_id, -1)) > x$flag <- c(FALSE, mark) > x Source_type timestamp user_id flag 75381 0 07-07-2008-21:03:55 84

[R] Can R load a saved workspace from the Internet?

2008-09-23 Thread Paul Smith
Dear All, Can load() load a saved workspace from an Internet address? I have tried it but I am getting errors: In addition: Warning message: In readChar(con, 5L, useBytes = TRUE) : cannot open compressed file 'http://X/workspace.RData', probable reason 'No such file or directory' Paul ___

Re: [R] Statistical question re assessing fit of distribution functions.

2008-09-23 Thread David Scott
On Tue, 23 Sep 2008, Ted Byers wrote: Thanks Timur While assessing whether or not the best option would be a normal distribution (it won't be, the data in this case LOOKS more poisson, or if I explude the first week of results, a negative exponential; and in my other case, cauchy is more likel

[R] how to model this

2008-09-23 Thread senne
Dear list, I met with a business case and feel frustrated to model it,scenario is like this 1. logistics department running 2. a lot of customers place orders and goods need to be send to their site (nationwide) 3. order received and then choose from a list of truck carriers to deliver goods,a ch

Re: [R] Options for viewing / using results from lm

2008-09-23 Thread Michael Just
Greg, Thanks for the pseudocode and cbind suggestions I think these should be quite helpful. What package is the function 'view' in? As for exporting elsewhere, basically I would to have the values of residuals saved in a spreadsheet in addition to any visualizations created within R. Thanks, M Ju

[R] Contional

2008-09-23 Thread Michael Pearmain
Hi All, I'm having trouble selecting rows to delete, that i can't seem to overcome. Below is some sample data, i am trying to dedup the data based on each user, and simultaneously the timestamp (at the side i have highlighted expected row to be removed) I've looked at the lag function but can't

[R] Proper power computation for one-sided binomial tests.

2008-09-23 Thread Collin Lynch
Hi, I trying to determine the best way to compute the power for a one-sample one-sided binomial test. Specifically I need to sample a population of individuals and ask whether a sample rate of 0% is compatable with a minimum threshold of 3% and how many samples are needed. I have made use of powe

Re: [R] Options for viewing / using results from lm

2008-09-23 Thread Greg Snow
You can do things like this pseudocode: > fit1 <- lm( y ~ x1, data=mydata ) > fit2 <- lm( y ~ x2, data=mydata ) > fit3 <- lm( y ~ x1*x2, data=mydata ) ... > mydata$r1 <- resid(fit1) > mydata$r2 <- resid(fit2) > mydata$r3 <- resid(fit3) Or > mydata <- cbind(mydata, r1=resid(fit1), r2=resid(fit2)

Re: [R] How to convert backslash to slash?

2008-09-23 Thread hadley wickham
Except it's a bit tricker because: s <- "C:\foo\bar" print(s) You'd need to work with encodeString( "C:\foo\bar") but that won't work in general: "c:\xjobs" "c:\" "c:\help" Hadley On Tue, Sep 23, 2008 at 3:00 PM, Shengqiao Li <[EMAIL PROTECTED]> wrote: > > How to use sub, gsub, etc. to repla

Re: [R] Options for viewing / using results from lm

2008-09-23 Thread Michael Just
Hello, >Why do you think it is better done in another program? Keeping it in R saves you from the exporting, which you say you are having trouble with. I think it might be better for viewing capabilities. If I had columns of residuals right next to each other I could spot differences amongst loca

Re: [R] Coloring spaces between lines in xyplot

2008-09-23 Thread Seth W Bigelow
R-listers: I am summarizing input I got on a recent query about creating stacked, colored line plots in xyplot. The only input I got regarding xyplot was to use the polygon() command, but this seemed to require some awkward data manipulation. In contrast, I got several snippets of functional code

Re: [R] How to convert backslash to slash?

2008-09-23 Thread Gabor Grothendieck
This was just posted today: https://stat.ethz.ch/pipermail/r-help/2008-September/174696.html On Tue, Sep 23, 2008 at 4:00 PM, Shengqiao Li <[EMAIL PROTECTED]> wrote: > > How to use sub, gsub, etc. to replace "\" in a string to "/"? > > For example,convert "C:\foo\bar" to "C:/foo/bar". > > Thanks,

[R] How to convert backslash to slash?

2008-09-23 Thread Shengqiao Li
How to use sub, gsub, etc. to replace "\" in a string to "/"? For example,convert "C:\foo\bar" to "C:/foo/bar". Thanks, Shengqiao Li __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide h

Re: [R] How to draw the graph of f(x,y) = x * y ?

2008-09-23 Thread Paul Smith
On Tue, Sep 23, 2008 at 6:32 PM, Duncan Murdoch <[EMAIL PROTECTED]> wrote: >> The function curve() draws the graph of functions from R to R. Is >> there some homologous function to curve() to draw functions from R^2 >> to R? > > No, you would have to write it yourself. The basic idea is to use out

Re: [R] Modifying output to Google Docs

2008-09-23 Thread Barry Rowlingson
2008/9/23 Ajay ohri <[EMAIL PROTECTED]>: > By outputting PDF directly to a Google Doc, it becomes light and portable > for people to view and collaborate on projects in different parts of the > world. > If you extend this to Google spreadsheets this functionality is especially > useful for financ

Re: [R] R2HTML: output from for-loops

2008-09-23 Thread Greg Snow
The problem is probably due to what is considered a top level expression to be evaluated and how R2HTML processes these. A simpler alternative is to use txtStart() or etxtStart() from the TeachingDemos package. These work similar to HTMLStart(), but don't do the html markup (the etxt version d

Re: [R] quantile regression: plotting coefficients on only one variable (rq)

2008-09-23 Thread Mark Difford
Hi Michael, It's in the manual: ?plot.summary.rqs plot(summary(rq(..., tau=c(...)), parm = x1, ...) Regards, Mark. Michael Faye wrote: > > Dear all. > > I have a question on plotting the coefficients from a series of > mutivariate > quantile regressions. The following code plots the coeff

Re: [R] Options for viewing / using results from lm

2008-09-23 Thread Nordlund, Dan (DSHS/RDA)
I haven't seen a response to this yet, so I will give my $0.25US worth (which is not worth that much anymore ). :-) > -Original Message- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Michael Just > Sent: Tuesday, September 23, 2008 11:01 AM > To: r-help@r-project.or

Re: [R] gsub difficulty

2008-09-23 Thread Gabor Grothendieck
Any of these will replace every dot with a space: x <- "a.b.c" gsub("\\.", " ", x) gsub("[.]", " ", x) gsub(".", " ", x, fixed = TRUE) chartr(".", " ", x) See ?regex for more info on regular expressions. On Tue, Sep 23, 2008 at 1:16 PM, Charles Annis, P.E. <[EMAIL PROTECTED]> wrote: > Greetings

Re: [R] gsub difficulty

2008-09-23 Thread Charles Annis, P.E.
Thanks, Jorge, for another alternative. Charles Annis, P.E. [EMAIL PROTECTED] phone: 561-352-9699 eFax: 614-455-3265 http://www.StatisticalEngineering.com _ From: Jorge Ivan Velez [mailto:[EMAIL PROTECTED] Sent

[R] quantile regression: plotting coefficients on only one variable (rq)

2008-09-23 Thread Michael Faye
Dear all. I have a question on plotting the coefficients from a series of mutivariate quantile regressions. The following code plots the coefficients for each RHS variable x1 and x2. Is there a way to plot only the coefficients on x1? In the data I am using, I have a large number of fixed effects

Re: [R] Creating a Legend

2008-09-23 Thread John Fox
Dear Steve, Try legend("topright", title="Land Use Type", cex=0.75, pch=16, col=c("red", "green"), legend=c("Urban", "Rural"), ncol=2) I hope this helps, John -- John Fox, Professor Department of Sociology McMaster University Hamilton, Ontario, Canada web: socser

Re: [R] Modifying output to Google Docs

2008-09-23 Thread Ajay ohri
Usage of Google Docs for this- PDFs especially Graphical PDFs can be a bit heavy. If sending by email to other users, they may find it difficult to open ,download etc (older computers or low bandwidth). By outputting PDF directly to a Google Doc, it becomes light and portable for people to view

[R] Options for viewing / using results from lm

2008-09-23 Thread Michael Just
Hello, I would like to state what I am (trying) to do. I have data set. It has 5749 rows (including the header) and 23 columns. The data contains values related to spatial aspects of the 412 landscapes (over various years). I will be making 2 groups from the data based on spatial extent. I will th

Re: [R] Modifying output to Google Docs

2008-09-23 Thread Ajay ohri
I am India based. Winters aren't long at all. I dont have that hot programming skills in C or R packages so need help. Maybe we can get Google on our side this way . They are supposed to have some good stats package too. Ajay On Tue, Sep 23, 2008 at 10:49 PM, Barry Rowlingson < [EMAIL PROTECTED

Re: [R] gsub difficulty

2008-09-23 Thread Charles Annis, P.E.
Thanks! Charles Annis, P.E. [EMAIL PROTECTED] phone: 561-352-9699 eFax: 614-455-3265 http://www.StatisticalEngineering.com -Original Message- From: Phil Spector [mailto:[EMAIL PROTECTED] Sent: Tuesday, September 23, 2008 1:30 PM To: Charles Annis, P.E. Subject: Re: [R] gsub difficult

Re: [R] gsub difficulty

2008-09-23 Thread Marc Schwartz
on 09/23/2008 12:16 PM Charles Annis, P.E. wrote: > Greetings R-ians: > > I know what doesn’t work but I don’t know why, nor how to remedy things. > > I have a character string containing "." which I want to replace with " " > > gsub(".", " ", file.label) replaces the every character with a blan

Re: [R] How to draw the graph of f(x,y) = x * y ?

2008-09-23 Thread Duncan Murdoch
On 9/23/2008 12:54 PM, Paul Smith wrote: Dear All, The function curve() draws the graph of functions from R to R. Is there some homologous function to curve() to draw functions from R^2 to R? No, you would have to write it yourself. The basic idea is to use outer() to construct a matrix of f

[R] help with large gamm

2008-09-23 Thread Dave Depew
Hi All, I was wondering if anyone has had any experience running gamm(mgcv) with a large spatial data set? I know the gamm help says this is a bad idea, but I wondered if there was a way to use something like filehash to store the matrices that gamm creates? -- David Depew PhD Candidate Depar

[R] Nonparametric multiple comparison with 'npmc'.

2008-09-23 Thread zollin
Hi dear R users, I want to do multiple comparison with 'npmc' package. But I don't understand which tests use in it? What limitations they have? Than they differ from Tukey or Dunnett tests? Or at least where can I find the detailed information on the tests used in 'npmc' (manual from package is

[R] Oja Median will soon be available

2008-09-23 Thread Daniel Vogel
Hello, in reply to the recent discussion about the Oja median, I would like to announce that by the end of this year we will make a package available that offers a routine for calculating the Oja median. This routine will have both, an exact computation as well as a randomized search heuristic, w

Re: [R] Modifying output to Google Docs

2008-09-23 Thread Barry Rowlingson
2008/9/23 Ajay ohri <[EMAIL PROTECTED]>: > Hi List, > Graphical output to PDF's ,RTF ,CSV is known through R. > Can it be modified for outputting to Google Docs (which is basically > uploaded files ,published to become html pages) > > Is there any package on this ? Do you basically mean an R impl

[R] How to draw arrows or segment lines in 3 dimensional graph

2008-09-23 Thread yabado
Hi I have a dataset which is like this: ID X1 Y1 Z1 X2 Y2 Z2 1 32 127 85 31.7121 85 2 37.9153 88 34.6137 90 3 36.8134 88 36.1155 97 4 31.4136 87 29 113 70

[R] bandwidth selection for locpoly

2008-09-23 Thread Chinthaka Kuruwita
Hello All, Is there a local bandwidth selection routine for local polynomial regression (locpoly) ? Thanks Chinthaka Kuruwita __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www

[R] gsub difficulty

2008-09-23 Thread Charles Annis, P.E.
Greetings R-ians: I know what doesn’t work but I don’t know why, nor how to remedy things. I have a character string containing "." which I want to replace with " " gsub(".", " ", file.label) replaces the every character with a blank. However gsub(".xls", " ", file.label) replaces ".xls" with a

[R] R2HTML: output from for-loops

2008-09-23 Thread Werner Wernersen
Hi, I am trying to prepare a report with R2HTML using HTMLStart(outdir="./html", filename="report", echo=T, HTMLframe=F) then, for instance, I want to get the output of a loop: for (i in 1:20) print(summary(rnorm(1000))) but only the first of summaries really ends up in the html file. What am I

Re: [R] superscript text style in axis label in graph

2008-09-23 Thread Jorge Ivan Velez
Dear Benoit, Perhaps plot(1:10,xlab=expression(Ce (mmol/m^3))) See also ?plotmath for more information. HTH, Jorge On Tue, Sep 23, 2008 at 12:57 PM, Benoit Boulinguiez < [EMAIL PROTECTED]> wrote: > Hi all, > > I'd like to use superscript or subscript in the axis label of a graph. Is > that

[R] Creating a Legend

2008-09-23 Thread Steve Murray
Dear all, I'm trying to create a legend for my graph. I hope to have the title as "Land Use Type" and the two elements being "Urban" and "Rural" with a red point and green point respectively. So far I have the following command, but obviously it isn't correct: > legend("topright", title="Land

[R] superscript text style in axis label in graph

2008-09-23 Thread Benoit Boulinguiez
Hi all, I'd like to use superscript or subscript in the axis label of a graph. Is that possible in R? For instance in xlab="Ce (mmol/m3)", I'd need the "3" of cubic meter in superscript. Regards/Cordialement - Benoit Boulinguiez Ph.D Ecole de Chimie de Rennes (ENSCR) Bureau 1.20 E

[R] How to draw the graph of f(x,y) = x * y ?

2008-09-23 Thread Paul Smith
Dear All, The function curve() draws the graph of functions from R to R. Is there some homologous function to curve() to draw functions from R^2 to R? Thanks in advance, Paul __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r

Re: [R] xyplot problem

2008-09-23 Thread hadley wickham
On Tue, Sep 23, 2008 at 8:27 AM, Pascal A. Niklaus <[EMAIL PROTECTED]> wrote: > Hi all, > > I am trying to produce some panels with dots in an X/Y plane where the > diameter of the dots indicates a Z value (like e.g. earthquake maps where dot > sizes indicate magnitudes and X/Y the location). > > T

[R] Modifying output to Google Docs

2008-09-23 Thread Ajay ohri
Hi List, Graphical output to PDF's ,RTF ,CSV is known through R. Can it be modified for outputting to Google Docs (which is basically uploaded files ,published to become html pages) Is there any package on this ? Regards, Ajay -- [[alternative HTML version deleted]] ___

Re: [R] Generating series of distributions with the same skewness and different kurtosis or with same kurtosis and different skewness?

2008-09-23 Thread hadley wickham
On Tue, Sep 23, 2008 at 9:59 AM, zhijie zhang <[EMAIL PROTECTED]> wrote: > Dear R users, > I hope to explain the concepts of skewness and kurtosis by generating > series of distributions with same skewness and different kurtosis or with > same kurtosis and different skewness, but it seems that i

Re: [R] graphing netCDF files

2008-09-23 Thread Paul Hiemstra
Hi Steve, (I'm replying to your e-mail at the mailing list to get it included there also) I've written some stuff on graphs with sp at the R wiki: http://wiki.r-project.org/rwiki/doku.php?id=tips:spatial-data:spatial_data_visualization or have a look at the gallery containing plots with the

Re: [R] xyplot problem

2008-09-23 Thread Deepayan Sarkar
On 9/23/08, Pascal A. Niklaus <[EMAIL PROTECTED]> wrote: > Hi all, > > I am trying to produce some panels with dots in an X/Y plane where the > diameter of the dots indicates a Z value (like e.g. earthquake maps where dot > sizes indicate magnitudes and X/Y the location). > > This works fine wi

Re: [R] Generating series of distributions with the same skewness and different kurtosis or with same kurtosis and different skewness?

2008-09-23 Thread Yihui Xie
Hi, Certainly it's possible. Use any distribution function as long as you can change its skewness and kurtosis, e.g. the Chi-square distribution. The corresponding R functions are p*, q*, d*, and r* - I think you know these functions already (e.g. rchisq()). The only thing that you should be clea

Re: [R] Summing up columns with NA elements in a data frame

2008-09-23 Thread Henrique Dallazuanna
Try this: a$a4 <- rowSums(a, na.rm = T) On Tue, Sep 23, 2008 at 12:20 PM, ravi <[EMAIL PROTECTED]> wrote: > Hi all, > When I try to sum a few columns in a data frame (which has NA's randomly > distributed as elements), I am not able to get the summing operation to > ignore the NA's. > Let me ex

[R] Summing up columns with NA elements in a data frame

2008-09-23 Thread ravi
Hi all, When I try to sum a few columns in a data frame (which has NA’s randomly distributed as elements), I am not able to get the summing operation to ignore the NA’s. Let me explain with the following code :   a<-structure(list(a1 = c(NA, 2, 3, NA, 5, 6, NA, 8,

Re: [R] xyplot problem

2008-09-23 Thread Gabor Grothendieck
xyplot will pass a vector of indices through the subscripts argument to the panel so try this: xyplot(y ~ x | grp, panel = function(x, y, subscripts, ...) { panel.xyplot(x, y, cex = sz[subscripts], ...) } ) On Tue, Sep 23, 2008 at 9:27 AM, Pascal A. Niklaus <[EMAIL PROTECTED]> wrote: > H

[R] Generating series of distributions with the same skewness and different kurtosis or with same kurtosis and different skewness?

2008-09-23 Thread zhijie zhang
Dear R users, I hope to explain the concepts of skewness and kurtosis by generating series of distributions with same skewness and different kurtosis or with same kurtosis and different skewness, but it seems that i cannot find the right functions. I have searched the mailing list, but no answ

Re: [R] R-2.7.2 infected?

2008-09-23 Thread Duncan Murdoch
On 22/09/2008 8:38 PM, Dave DeBarr wrote: I tried downloading R-2.7.2 (http://cran.cnr.berkeley.edu/bin/windows/base/R-2.7.2-win32.exe, both from Berkeley and cran) and both times I got a warning from Computer Associates eTrust Antivirus (version 7.1.710) that the Win32/Adclicker.JO trojan was

Re: [R] xyplot problem

2008-09-23 Thread Richard . Cotton
> I am trying to produce some panels with dots in an X/Y plane where the > diameter of the dots indicates a Z value (like e.g. earthquake maps where dot > sizes indicate magnitudes and X/Y the location). > > This works fine with xyplot, e.g.: > > xyplot(1:3~1:3,cex=1:3,pch=16) > > However, wh

Re: [R] xyplot problem

2008-09-23 Thread Henrique Dallazuanna
Is this what you want? xyplot(y~x | grp, panel = function(x, y, ...){ panel.xyplot(x, y, cex = 1:3, pch = 19, col = 2:5) }) On Tue, Sep 23, 2008 at 10:27 AM, Pascal A. Niklaus <[EMAIL PROTECTED]> wrote: > Hi all, > > I am trying to produce some panels with dots in an X/Y p

Re: [R] Statistical question re assessing fit of distribution functions.

2008-09-23 Thread Ted Byers
Thanks Timur While assessing whether or not the best option would be a normal distribution (it won't be, the data in this case LOOKS more poisson, or if I explude the first week of results, a negative exponential; and in my other case, cauchy is more likely), I really need a test that can be appl

Re: [R] gbm error

2008-09-23 Thread jtf2076
Darrin, what version of R are you using have the same question. I have been using the gbm package without problem with R 2.7.1. but I recently switched computers and downloaded 2.7.2. I used the following code, which works fine on my old computer with 2.7.1 but I get an error with the new versio

[R] xyplot problem

2008-09-23 Thread Pascal A. Niklaus
Hi all, I am trying to produce some panels with dots in an X/Y plane where the diameter of the dots indicates a Z value (like e.g. earthquake maps where dot sizes indicate magnitudes and X/Y the location). This works fine with xyplot, e.g.: xyplot(1:3~1:3,cex=1:3,pch=16) However, when I do th

[R] additional parameters in function called by tapply

2008-09-23 Thread Heidemeier Dr, Joachim
Der R-Gurus, first apologies if this is a FAQ, but I due to lack of R-knowledge and terminology I wasn't able to find it. I have the following problem in aggregating results of a model calculation: The results are yearly values of several parameters with several hierarchical spatial factors take

[R] Problem during porting R-2.7.2 on HP-UP 11.11 PA-Risc

2008-09-23 Thread claus-juergen . neumann
Dear "R"-Team, we had some problem to install R-2.7.2 on HP-UX 11.11 on PA-Risc platform. 1.) i load down the Software and made a extract of the tar-file in a specific Directory. 2.) i follow the instructions on the INSTALL file: ./configure 3.) during "configure" we got a error message se

Re: [R] WG: Problem during porting R-2.7.2 on HP-UP 11.11 PA-Risc

2008-09-23 Thread Martyn Plummer
On Tue, 2008-09-23 at 15:35 +0200, Peter Dalgaard wrote: > [EMAIL PROTECTED] wrote: > > > > Claus-Juergen > > Neumann/BASF-AG/B

Re: [R] WG: Problem during porting R-2.7.2 on HP-UP 11.11 PA-Risc

2008-09-23 Thread Peter Dalgaard
[EMAIL PROTECTED] wrote: > > Claus-Juergen > Neumann/BASF-AG/B > ASF

[R] WG: Problem during porting R-2.7.2 on HP-UP 11.11 PA-Risc

2008-09-23 Thread claus-juergen . neumann
Claus-Juergen Neumann/BASF-AG/B ASF

Re: [R] Coefficients, OR and 95% CL

2008-09-23 Thread Frank E Harrell Jr
Eik Vettorazzi wrote: l.mod<-glm(menarche~age,binomial) you will get odds-ratios by exponentiating the coefficients of this model, so exp(coef(l.mod)) will do this job. You may notice that this will produce an "OR" for the intercept part as well - which is not interpretable. For the confide

Re: [R] Coefficients, OR and 95% CL

2008-09-23 Thread Eik Vettorazzi
l.mod<-glm(menarche~age,binomial) you will get odds-ratios by exponentiating the coefficients of this model, so exp(coef(l.mod)) will do this job. You may notice that this will produce an "OR" for the intercept part as well - which is not interpretable. For the confidence intervals for this

Re: [R] Coefficients, OR and 95% CL

2008-09-23 Thread Nutter, Benjamin
You might also consider ?confint -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Jorge Ivan Velez Sent: Monday, September 22, 2008 5:36 PM To: Luciano La Sala Cc: R mailing list Subject: Re: [R] Coefficients, OR and 95% CL Dear Luciano, See ?logistic.dis

Re: [R] odds ratio: how to create reference

2008-09-23 Thread Frank E Harrell Jr
Philip Twumasi-Ankrah wrote: To select another reference level from the default that R chooses you can use the "relevel" function example; Reorder Levels of Factorwarpbreaks$tension <- relevel(warpbreaks$tension, ref="M") summary(lm(breaks ~ wool + tension, data=warpbreaks)) function findli

Re: [R] odds ratio: how to create reference

2008-09-23 Thread Philip Twumasi-Ankrah
To select another reference level from the default that R chooses you can use the "relevel" function example; Reorder Levels of Factorwarpbreaks$tension <- relevel(warpbreaks$tension, ref="M") summary(lm(breaks ~ wool + tension, data=warpbreaks)) function findlink(pkg, fn) { var Y, link; Y =

  1   2   >