Re: [R] Fwd: Re: Graph color

2010-01-26 Thread Jim Lemon
On 01/27/2010 06:41 AM, narillosdesan...@gmail.com wrote: No mate, Sorry first of all about my indefinition (I´m Spanish, I´m improving everyday but a long road to the perfection). Sorry pleae. Second, also it is diffcoult sometimes to express what we try (sorry and many thanks just for reading

Re: [R] R Memory Problem

2010-01-26 Thread prem_R
Yes i think this is explanation of the problem faced .Could you please help me to solve this . -- View this message in context: http://n4.nabble.com/R-Memory-Problem-tp1289221p1311291.html Sent from the R help mailing list archive at Nabble.com. _

[R] I just uploaded a photo that I want you to see!

2010-01-26 Thread Roslina Zakaria
Hello! I just uploaded a photo on zroslina's DailyFlog page that I want you to see. Please come and see: http://www.mydailyflog.com/go/invite_register/zroslina/56282492&stc=18 Thanks! Roslina Zakaria Got a digital camera? MyDailyFlog is a personal p

[R] Replacing ' (apostrophe) with "(two apostrophe)

2010-01-26 Thread Steven Kang
Hi all, I am trying to replace a string containing ' (apostrophe) with "(two apostrophes not inverted commas). i.e *asdf'qwer* replaced to *asdf"qwer* Is this feasible? Thanks . -- Steven [[alternative HTML version deleted]] __ R-help@

[R] how to change the tick character of x-axis ?

2010-01-26 Thread Jie TANG
Hello, Now I draw a figure by boxplot ,but I am fail to add the tick information in the axis? How could I ? https://mail.google.com/mail/?ui=2&ik=c88089ec0a&view=att&th=1266e2c8dff41fcb&attid=0.1&disp=attd now I want to add the tick information in the x-axis as Class1 ,Class2,Class3 instead of "

Re: [R] Newton method

2010-01-26 Thread GlenB
your problem is because f is a vector of the same length as runi as a result, the thing you're trying to assign to z[i+1] is also a vector of that length -- View this message in context: http://n4.nabble.com/Newton-method-tp1311057p1311228.html Sent from the R help mailing list archive at Nabbl

[R] adding / modifiying functions in a site-library package ????

2010-01-26 Thread David Lubbers
I want to add just one more function to an already installed, locally developed site-library package. Is there a good tutorial on this laying about? From what I see the new function would touch several files and directories in the existing package. Tools to automate that ? _

Re: [R] (no subject)

2010-01-26 Thread David Winsemius
On Jan 25, 2010, at 1:46 PM, Chuck White wrote: Hello -- I would like to know of a more efficient way of writing the following piece of code. Thanks. options(stringsAsFactors=FALSE) orig <- c(rep('',10),rep('', 20),rep('',30),rep('',40)) orig

Re: [R] Bulk Match/Replace

2010-01-26 Thread Nathan S. Watson-Haigh
I knew it should be simple . but only if you know how!! Thanks, works a treat!! Nathan Dr. Nathan S. Watson-Haigh OCE Post Doctoral Fellow CSIRO Livestock Industries University Drive Townsville, QLD 4810 Australia Tel: +61 (0)7 4753 8

Re: [R] Problem with xyplot when creating a .png graphic

2010-01-26 Thread David Winsemius
On Jan 26, 2010, at 7:33 PM, Harald Hofmann wrote: Hello, I have the following problem. I have created a couple of scripts to create .png graphic files from data plots, using the xyplot (lattice) command. When I refere to the script with source(""), the script will be red but there is no

Re: [R] [ExternalEmail] Bulk Match/Replace

2010-01-26 Thread Bill.Venables
> (id <- with(df, id[match(v,Name)])) [1] 1 2 2 4 2 4 2 2 4 2 1 2 2 1 2 2 1 2 2 From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf Of Nathan S. Watson-Haigh [nathan.watson-ha...@csiro.au] Sent: 27 January 2010 10:31 To: r-help@r-p

Re: [R] Bulk Match/Replace

2010-01-26 Thread Phil Spector
Nathan - One way would be df$id[match(v,df$Name)] - Phil Spector Statistical Computing Facility Department of Statistics

[R] Bulk Match/Replace

2010-01-26 Thread Nathan S. Watson-Haigh
This must be easy to do. I have a vector and a lookup data.frame: > v [1] "5" "234" "234" "42-43" "234" "42-43" "234" "234" "42-43" "234" "5" "234" "234" "5" "234" "234" "5" "234" "234" > df id Name 1 5 12-13 2 2 234 3 4 4

[R] Problem with xyplot when creating a .png graphic

2010-01-26 Thread Harald Hofmann
Hello, I have the following problem. I have created a couple of scripts to create .png graphic files from data plots, using the xyplot (lattice) command. When I refere to the script with source(""), the script will be red but there is no output file. The scripts work well with the regular plot

[R] ordisymbol - changing symbols used in plotting factor levels

2010-01-26 Thread Colin Curry
Hello, I'm trying plot points in an NMDS according to a factor with two levels: fig<-ordiplot(canod.sol, type="none",cex.axis=0.9,cex.lab=0.1,pty="m",tck=-0.01) ordisymbol(fig, y = hab, factor = "habitat", rainbow = T,col = env, legend = F) This gets me part of the way - It produces a plot w

[R] Polygons in Windows metafile

2010-01-26 Thread Steve Taylor
Hi all, I'm producing some pie charts (Yes I know!) and plotting them into a Windows metafile. This is for insertion into a Word document. The circles come out rather jagged when you zoom in on them, the cause of which I have perhaps narrowed down to the way polygon() works in the metafile d

Re: [R] unidentifiable problem..

2010-01-26 Thread Jonathan
Probably as a regular user (good call)... But just now, I uninstalled and reinstalled as administrator, and I'm running as administrator as well, but still getting the same error: browseURL("http://www.r-project.org ") Error in shell.exec(url) : access to 'http://www.

[R] Maptools runs out of memory installing the help files for spCbind-methods

2010-01-26 Thread Anthony Staines
Hi, I'd be grateful for help with the following:- Running R version 2.9.2 (2009-08-24) on Gentoo Linux, on an x86 PC. I am trying to install maptools, (via CRAN from maptools_0.7-29.tar.gz'), for the first time. All runs smoothly until the installation gets to "*** installing help indices" for sp

[R] Newton method

2010-01-26 Thread Roslina Zakaria
Hi r-users,   I hope somebody can help me with this code. I would like to solve for z values using newton iteration method.  I 'm not sure which part of the code is wrong since I'm not very good at programming but would like to learn.  There seem to be some output but what I expected is a vecto

Re: [R] problem with "nls" function

2010-01-26 Thread hammadi jbeli
I have used R formulation style and I found this in some R documentations. On Tue, Jan 26, 2010 at 4:12 AM, Walmes Zeviani wrote: > > I supose you are following the SAS formulation style. R has a different > formulation style, such as: > > da <- expand.grid(A=factor(1:3), x=1:10) > da$y <- as.num

Re: [R] unidentifiable problem..

2010-01-26 Thread Duncan Murdoch
On 26/01/2010 5:32 PM, Jonathan wrote: Hi Duncan, I tried: > browseURL("http://www.r-project.org ") Error in shell.exec(url) : access to 'http://www.r-project.org ' denied As you can see, that elicited a similar error. I'm running R

[R] Fwd: unidentifiable problem..

2010-01-26 Thread Jonathan
Phil, The version of RMySQL you forwarded me installed, though I got the following message: > library(RMySQL) Warning message: package 'RMySQL' was built under R version c(2, 4, 0) and help will not work correctly Please re-install it That being said, I am getting farther along than I did with

[R] Check out this photo on MyDailyFlog!

2010-01-26 Thread Roslina Zakaria
Hello!!! I just uploaded a photo on zroslina's DailyFlog page that I want you to see. Check out: http://www.mydailyflog.com/go/invite_register/zroslina/56282492 Cheers! Got a digital camera? MyDailyFlog is a personal photo-blogging space where you

Re: [R] unidentifiable problem..

2010-01-26 Thread Jonathan
Hi Duncan, I tried: > browseURL("http://www.r-project.org";) Error in shell.exec(url) : access to 'http://www.r-project.org' denied As you can see, that elicited a similar error. I'm running R version 2.10.1 (I uninstalled my old version of R and reinstalled a fresh copy today before emailing

Re: [R] heatmap.2 color range

2010-01-26 Thread evgeny55
also, can you point me to some example of how to omit colors from a palette -- View this message in context: http://n4.nabble.com/heatmap-2-color-range-tp1293498p1311031.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project

Re: [R] heatmap.2 color range

2010-01-26 Thread evgeny55
thanks, I think I got the color ranges down, however, I just realized that the colors don't match the data. When I execute: grad <- ifelse(randMat > 5,yelPal,ifelse(randMat<1.5,redPal,bluPal)) the grad matrix contains the correct hex codes corresponding to the randMat data matrix but when I

Re: [R] library.dynam

2010-01-26 Thread Murat Tasan
to clarify the example a bit, assume that for lib.loc i always want to search the current working directory of the R session (thus forcing the user to have mylib.so sitting in the directory returned by getwd() when loading the package). NOTE: this is not how i will finally implement this package,

[R] library.dynam

2010-01-26 Thread Murat Tasan
hi, i'm having some trouble getting a package to load a shared library object in .onLoad(...) i have a shared object file, say "mylib.so". if i start an R session, and via the CLI specify the actual library via: > dyn.load("mylib.so") everything works quite well (i.e. i can then follow with some

Re: [R] unidentifiable problem..

2010-01-26 Thread Duncan Murdoch
On 26/01/2010 4:54 PM, Jonathan wrote: Hi All, My R installation is acting strangely and I'm hoping somebody might have an idea what's going on: You need to give more details. Which R version? (If less than 2.10.1, install that and try again.) Do you have MySQL installed on that machin

[R] unidentifiable problem..

2010-01-26 Thread Jonathan
Hi All, My R installation is acting strangely and I'm hoping somebody might have an idea what's going on: I can't seem to load the "RMySQL" function. It seems to have installed without a problem, but when I enter: library(RMySQL) R tells me: Error in utils::readRegistry("SOFTWARE\\MySQL AB"

[R] add points to 3D plot using p3d {onion}

2010-01-26 Thread Bradley Christoffersen
Hi, Can anyone guide me as to how I can add points to a p3d() plot from the onion package?  I want to plot points with different colors on the same 3D plot.  Perhaps I can do this without adding points but somehow directing the 'h' parameter to give different color to points based on a factor I as

[R] ANCOVA with measurement error in x and y

2010-01-26 Thread Dylan Beaudette
Hi, I am looking for some tips on how to incorporate known measurement error into the comparison of slopes in an analysis of covariance. Specifically, if I know that each measurement comes with a 5% error, is it possible to 'expand' the confidence intervals around the estimates for the slope of

Re: [R] Install R 2.10.1 on Windows XP Errors

2010-01-26 Thread Uwe Ligges
On 26.01.2010 22:09, steve_fried...@nps.gov wrote: I have just upgraded from 2.9.2 to 2.10.1 on my XP machine. I rec'd the following error message: Error in strsplit(x[ok], "[.-]") : 5 arguments passed to .Internal(strsplit) which requires 6 I also tried update.packages(checkBuilt=TRUE,

Re: [R] Apply a function on an array with the parameter as an array

2010-01-26 Thread jim holtman
You can do something like this: lapply(1:nrow(X), function(.indx, param){ X[.indx,] * param[.indx] # apply param[i] to row i of X }, param=arrayOf Params) On Tue, Jan 26, 2010 at 3:52 PM, anna wrote: > > Ok, I read the entire posting guide and updated my signature. So I come back > on my q

[R] Install R 2.10.1 on Windows XP Errors

2010-01-26 Thread Steve_Friedman
I have just upgraded from 2.9.2 to 2.10.1 on my XP machine. I rec'd the following error message: Error in strsplit(x[ok], "[.-]") : 5 arguments passed to .Internal(strsplit) which requires 6 I also tried update.packages(checkBuilt=TRUE, ask = FALSE) > update.packages(checkBuilt=TRUE, ask=FAL

Re: [R] large integers in R

2010-01-26 Thread Duncan Murdoch
On 26/01/2010 3:25 PM, Blanford, Glenn wrote: Has there been any update on R's handling large integers greater than 10^9 (between 10^9 and 4x10^9) ? as.integer() in R 2.9.2 lists this as a restriction but doesnt list the actual limit or cause, nor if anyone was looking at fixing it. Integers

[R] problems saving an mpfr object into a file

2010-01-26 Thread kayj
Hi All, I have a problem cbind two vectors one is a numeric and the other is an mpfr object and then saving the result into a .csv file. I am unable to save the mpfr vector into .csv file . here is the error that I get Error in as.data.frame.default(x[[i]], optional = TRUE) : cannot coerce c

[R] large integers in R

2010-01-26 Thread Blanford, Glenn
Has there been any update on R's handling large integers greater than 10^9 (between 10^9 and 4x10^9) ? as.integer() in R 2.9.2 lists this as a restriction but doesnt list the actual limit or cause, nor if anyone was looking at fixing it. Glenn D Blanford, PhD

Re: [R] Apply a function on an array with the parameter as an array

2010-01-26 Thread anna
Ok, I read the entire posting guide and updated my signature. So I come back on my question, should I use an apply in an apply to make this? - Anna Lippel -- View this message in context: http://n4.nabble.com/Apply-a-function-on-an-array-with-the-parameter-as-an-array-tp1310834p1310922.html

Re: [R] Strange tick in ggplot geom_area; and ordering, again

2010-01-26 Thread hadley wickham
> > In case you have a temporary workaround, it would be nice to have it. It’s a > show stopper for my report. Bars are not an option, because the curve looks > too jaggy. > I just remember that to work around the problem, you can just manually order the data frame: cf1 <- cf1[with(cf1, order(d

Re: [R] Strange tick in ggplot geom_area; and ordering, again

2010-01-26 Thread hadley wickham
> can you also reproduce the “triangles” problem? Is it just a trivial > corollary of the order-bug? The triangles are there because you have a layer of points (from the qplot default) and layer of areas. Setting geom = "area" in qplot fixes that. Hadley -- http://had.co.nz/

[R] Trouble Highlighting outliers on Time Series Plot

2010-01-26 Thread Idgarad
I am having trouble plotting outliers on time series. Give then following code: # find STL Outliers by weight and append sh2, use Robust # this should allow the initial outliers to be filtered # this section may be commented out. ###

Re: [R] tapply and more than one function, with different arguments

2010-01-26 Thread RINNER Heinrich
Hi Dennis, now that's a very nice function, and this seems to be just what I need! Thanks a lot! -Heinrich. Von: Dennis Murphy [djmu...@gmail.com] Gesendet: Dienstag, 26. Januar 2010 19:44 An: RINNER Heinrich Cc: r-help Betreff: Re: [R] tapply and more than

[R] splitting a factor column into binary columns for each level

2010-01-26 Thread Chuck White
Yesterday I posted the following question (my apologies for not putting a subject line): =question== Hello -- I would like to know of a more efficient way of writing the following piece of code. Thanks. options(stringsAsFactors=FALSE) orig <- c(rep('11

[R] splitting a factor column into binary columns for each factor

2010-01-26 Thread Chuck White
Yesterday I posted the following question (my apologies for not putting a subject line): =question== Hello -- I would like to know of a more efficient way of writing the following piece of code. Thanks. options(stringsAsFactors=FALSE) orig <- c(rep('11

[R] splitting a factor column into binary columns for each factor

2010-01-26 Thread Chuck White
Yesterday I posted the following question (my apologies for not putting a subject line): =question== Hello -- I would like to know of a more efficient way of writing the following piece of code. Thanks. options(stringsAsFactors=FALSE) orig <- c(rep('11

Re: [R] newton method for single nonlinear equation

2010-01-26 Thread Berend Hasselman
Roslina Zakaria wrote: > > newton.inputsingle <- function(pars,n) > {  runi    <- runif(974, min=0, max=1) >    lendt   <- length(runi) >    ## Parameter to estimate >    z <- vector(length=lendt, mode= "numeric") >    z  <- pars[1] >    >    ## Constant value  >    >    alp  <- 2.0165 ; rho

Re: [R] Apply a function on an array with the parameter as an array

2010-01-26 Thread anna
Sorry! I am reading it now! -- View this message in context: http://n4.nabble.com/Apply-a-function-on-an-array-with-the-parameter-as-an-array-tp1310834p1310856.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mail

Re: [R] Apply a function on an array with the parameter as an array

2010-01-26 Thread Bert Gunter
Speaking **only for myself**, if you don't have the time to read and follow the posting guide, I don't have the time to try to help you. Bert Gunter Genentech Nonclinical Biostatistics __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/li

Re: [R] Apply a function on an array with the parameter as an array

2010-01-26 Thread Bert Gunter
I perhaps should have added that the etiquette of this list is to supply your correct name in your signature. This does not necessarily mean that you will be ignored if you fail to do so, but it does increase the likelihood that you will be. Bert Gunter Genentech Nonclinical Biostatistics __

Re: [R] Apply a function on an array with the parameter as an array

2010-01-26 Thread anna
No the posting guide is quite big and I wanted to take time to read it properly, since I have been posting seriously since last wednesday and I work a lot I didn't get time to do it but will do it now ;). So you say that you know exactly what I tried to do can you explain what I tried to do if it'

Re: [R] Apply a function on an array with the parameter as an array

2010-01-26 Thread Bert Gunter
-Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of anna Sent: Tuesday, January 26, 2010 11:48 AM To: r-help@r-project.org Subject: [R] Apply a function on an array with the parameter as an array Hello R buddies, I want to apply a fun

Re: [R] Fwd: Re: Graph color

2010-01-26 Thread baptiste auguie
Hi, Try this, x <- seq(0, 10, len = 100) y <- jitter(sin(x), 1000) old.par <- par() par(bg=grey(0.5)) plot(x, y, new = TRUE, t = "n") lims <- par("usr") plot(x, y, col = 1, panel.first = { rect(lims[1], lims[3], lims[2], lims[4], col = "lightblue") }) HTH, baptiste 2010/1/26 :

[R] Apply a function on an array with the parameter as an array

2010-01-26 Thread anna
Hello R buddies, I want to apply a function on an array but for each element of the array I want to use a different parameter, So here is how I tried to enter the function: apply(as.matrix(X),2, function, parameter1 = arrayOfParameter) I put X as a matrix because it was initially an element of a l

[R] Fwd: Re: Graph color

2010-01-26 Thread narillosdesantos
No mate, Sorry first of all about my indefinition (I´m Spanish, I´m improving everyday but a long road to the perfection). Sorry pleae. Second, also it is diffcoult sometimes to express what we try (sorry and many thanks just for reading of course for helping). Imagine you plot X=[2 4 6 8]

Re: [R] PNG resolution

2010-01-26 Thread Matthew Walker
Dieter Menne wrote: Matthew Walker wrote: I expect that if I change only the resolution of an image, although the image would have more pixels, if viewed in the same physical size, the elements in the image would have the same physical size but with more detail. The sample you p

Re: [R] reading a string vector

2010-01-26 Thread bia.estat
thanks, it was exactly what i needed. -- View this message in context: http://n4.nabble.com/reading-a-string-vector-tp1290289p1310721.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://stat.ethz.

Re: [R] Formatting cgroup and factor level labels in Hmisc latex function

2010-01-26 Thread Dieter Menne
stefan.petersson wrote: > > > I'm trying to typeset at simple crosstable with the Hmisc latex function. > And I have two problems. > > 1. How do I make all columns the same width? The Latex function seems very > unwilling to break the 'cgroup' labels and the factor level labels. Please > have

Re: [R] Large dataset importing, columns merging and splitting

2010-01-26 Thread Tom Short
If you need more aggregations on the stock (I assume that's what the first column is), I'd use the data.table package. It allows fast indexing and merge operations. That's handy if you have other features of a stock (like company size or industry sector) that you'd like to include in the aggregatio

Re: [R] Formatting cgroup and factor level labels in Hmisc latex function

2010-01-26 Thread Dieter Menne
stefan.petersson wrote: > > > I'm trying to typeset at simple crosstable with the Hmisc latex function. > And I have two problems. > > 1. How do I make all columns the same width? The Latex function seems very > unwilling to break the 'cgroup' labels and the factor level labels. Please > have

Re: [R] heatmap.2 color range

2010-01-26 Thread evgeny55
as a followup, I tried using the rainbow function to create the gradients but is there a way to do a "reverse" rainbow, ie. normally if I do: pie(rep(1,6), col=rainbow(6,start=0, end=.07)) I'll get a gradient from dark red to orangish but what if I want it to go the other way thanks -- View t

Re: [R] tapply and more than one function, with different arguments

2010-01-26 Thread Dennis Murphy
Hi: Using the plyr package, we can get the result as follows: > library(plyr) > my.fun <- function(x, mult) mult*sum(x) > dat <- data.frame(x = 1:4, grp = c("a","a","b","b")) > ddply(dat, .(grp), summarize, max = max(x), myfun = my.fun(x, 10)) grp max myfun 1 a 230 2 b 470 HTH,

Re: [R] PNG resolution

2010-01-26 Thread Dieter Menne
Matthew Walker wrote: > > I expect that if I change only the resolution of an image, although the > image would have more pixels, if viewed in the same physical size, the > elements in the image would have the same physical size but with more > detail. > > The sample you provided create f

Re: [R] heatmap.2 color range

2010-01-26 Thread Dieter Menne
evgeny55 wrote: > > I'm trying to create a heatmap with color ranges for different values in > my matrix. For example: > If x > 5 , use orange gradient > if x < 1.5, use red gradient > . > > Right now I have the following: > orgPal<-brewer.pal(3,"Oranges") > bluPal<-brewer.pal(3,"Blues")

[R] sp package coordinates and gridded problems with as.list()

2010-01-26 Thread Rhelp wanted
Dear All I hope that someone can help. I am working with sp pakage and akima library("akima") library(sp) imagine lots of different dataframes, of row = 100 columns = 3 of x and y coordinates with z values I will call these data frames for the sake of this example akima akima<-as.list(1:100)

Re: [R] Strange tick in ggplot geom_area; and ordering, again

2010-01-26 Thread Dieter Menne
Hi, Hadley, In case you have a temporary workaround, it would be nice to have it. It’s a show stopper for my report. Bars are not an option, because the curve looks too jaggy. ‘Dieter From: hadley wickham [via R] [mailto:ml-node+1294703-876505...@n4.nabble.com] Sent: Tuesday,

Re: [R] tapply and more than one function, with different arguments

2010-01-26 Thread Peter Ehlers
Try replacing 'max' with 'mean' and see what you get. Then have a look at ?max and see what max() does with extra arguments. I'm not sure it's relevant, but it might be useful to check what Hmisc::summarize does. -Peter Ehlers RINNER Heinrich wrote: Dear R-users, I am working with R version

Re: [R] (no subject)

2010-01-26 Thread Kyle.
Something along these lines might do the trick: orig <- rep(sapply(seq(from=, to=, by=), as.character), times=c(1, 2, 3, 4)) I've shortened the number of repetitions, so you can test it out and see if it's what you're looking for (just change the values in the vector

Re: [R] Hypothsis simulation

2010-01-26 Thread Greg Snow
You can use the rbinom function to generate the random data. What to feed that function depends on things that you did not state (is this a comparison of 2 groups?, a logistic regression?, etc.). -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.o

[R] newb question: chron and hist()

2010-01-26 Thread kensuguro
Hi all, I'm just getting started in R so bear with my newbness. I am trying to create a very simple histogram of logins by time, with data coming in from a MYSQL query. the raw data looks like this: "id" "user_id" "experience_given" "created_at" "ip_aton" "1" XXX 2445626 0 "2010-01-21 00:00:0

Re: [R] Graph color

2010-01-26 Thread Kyle.
If I understand what you want correctly, you'll probably want to use the "col" argument in whatever base graphics function you're using, rather than changing something in the graphical parameters. For example, if I wanted to add red points to an existing plot, I would use something like poin

Re: [R] [Fwd: Re: question on sqldf syntax]

2010-01-26 Thread Gabor Grothendieck
On Tue, Jan 26, 2010 at 11:55 AM, Seth Falcon wrote: > > That sqldf only works if RMySQL is not attached seems like something worth > investigating and fixing. It should be possible to avoid such conflicts by > proper use of name spaces, but I have not looked into the details of what's > going on.

Re: [R] Strange tick in ggplot geom_area; and ordering, again

2010-01-26 Thread Dieter Menne
Hi, Hadley, can you also reproduce the “triangles” problem? Is it just a trivial corollary of the order-bug? Dieter From: hadley wickham [via R] [mailto:ml-node+1294703-876505...@n4.nabble.com] Sent: Tuesday, January 26, 2010 5:18 PM To: Dieter Menne Subject: Re: [R] Strange t

[R] PNG resolution

2010-01-26 Thread Matthew Walker
Hi, I expect that if I change only the resolution of an image, although the image would have more pixels, if viewed in the same physical size, the elements in the image would have the same physical size but with more detail. However, when I use the "res" parameter of png() this is not what I

Re: [R] [Fwd: Re: question on sqldf syntax]

2010-01-26 Thread Seth Falcon
On 1/26/10 2:11 AM, Christian Schulz wrote: Sorry mistake from me. This was another problem in my mind , but with RMySQL. Christian > library(RMySQL) > library(sqldf) > sqldf("Select * from mtcars") Fehler in mysqlNewConnection(drv, ...) : RS-DBI driver: (Failed to connect to database: Error:

[R] (list) object cannot be coerced to type 'double'

2010-01-26 Thread Muhammad Rahiz
Dear all, My script returns the following error: Error in storage.mode(test) <- "logical" : (list) object cannot be coerced to type 'double' I've looked around and some suggest that it could be the way data have been imported. For my case, I don't think it is such. Rather I think it has to

Re: [R] update.packages on MS Windows with //server/share paths

2010-01-26 Thread Keith Jewell
Thanks Gabor, but expanding on my remark... > I can work around by mapping a drive letter to the '//server/share', but > prefer not to (for local reasons). R is installed on our network, used by others (with readonly access), maintained by me. In 'Renviron.site' I have... R_LIBS_SITE=//Server

[R] tapply and more than one function, with different arguments

2010-01-26 Thread RINNER Heinrich
Dear R-users, I am working with R version 2.10.1. Say I have is a simple function like this: > my.fun <- function(x, mult) mult*sum(x) Now, I want to apply this function along with some other (say 'max') to a simple data.frame, like: > dat <- data.frame(x = 1:4, grp = c("a","a","b","b")) Ide

Re: [R] Large dataset importing, columns merging and splitting

2010-01-26 Thread Gabor Grothendieck
Try this using the development version of read.zoo in zoo (which we source from the R-Forge on the fly). We use "NULL" in colClasses for those columns we don't need but in col.names we still have to include dummy names for them. Of what is left the index is the first three columns (1:3) which we

Re: [R] Strange tick in ggplot geom_area; and ordering, again

2010-01-26 Thread hadley wickham
Hi Dieter, It looks like a bug: Order works fine with bars: qplot(factor(dur),weight=p,data=cf1, fill=score, geom = "bar", order = rev(score)) but not with areas: qplot(dur, p, data=cf1, fill=score, geom = "area", order = rev(score)) I'll add it to my to do list. Hadley On Tue, Jan 26, 2010 a

[R] Strange tick in ggplot geom_area; and ordering, again

2010-01-26 Thread Dieter Menne
In the area plots below, I see 4 triangle ticks at both sides of the bar; I believe these are non-stacked values for p, but they are definitively confusing. In addition, I would like to get the order of the colors in the plot the same as in the legend, and not arranged alphabetically (the factor

[R] heatmap.2 color range

2010-01-26 Thread evgeny55
Hi, I'm trying to create a heatmap with color ranges for different values in my matrix. For example: If x > 5 , use orange gradient if x < 1.5, use red gradient . Right now I have the following: orgPal<-brewer.pal(3,"Oranges") bluPal<-brewer.pal(3,"Blues") redPal<-brewer.pal(3,"Reds") grad

[R] problem with read.genepop function

2010-01-26 Thread Adam Peer
I'm trying to use the package ARES to produce allelic richness estimates with extrapolation beyond the sample size. I've begun by testing the program with the butterfly_borneo data provided with the package, but I seem to be having a problem with the read.genepop function. Below, I've included my

Re: [R] reading a string vector

2010-01-26 Thread Henrique Dallazuanna
Try this: strsplit("atgctctaatcgtcccaacaattatattactaccac", NULL) On Tue, Jan 26, 2010 at 11:08 AM, bia.estat wrote: > > Hi, I need to read a string vector in R which is like this > "atgctctaatcgtcccaacaattatattactaccac", but R seems to understand it as > a unique vector input when I read

[R] hdf files

2010-01-26 Thread karine heerah
hello, I have a problem to open an hdf file. i have downloaded the package 'hdf5' as it was advised on R seek. But when i try to load the file, the R console sends me an eror message: setwd("C:/Documents and Settings/Karine/Bureau/data/") #install.packages('hdf5') library("hdf5") sea_i

[R] Large dataset importing, columns merging and splitting

2010-01-26 Thread Manta
Dear All, I have a large data set that looks like this: CVX 20070201 9 30 51 73.25 81400 0 CVX 20070201 9 30 51 73.25 100 0 CVX 20070201 9 30 51 73.25 100 0 CVX 20070201 9 30 51 73.25 300 0 First, I would like to import it by merging column 3 4 and 5, since that is the timestamp. Then, I would l

Re: [R] Error with toString

2010-01-26 Thread Romain Francois
On 01/26/2010 04:19 PM, anna wrote: Romain, I used the paste for numbers to as you told me and it worked. For the toString() function well I called it from the R console and that's what it returned me... Yes. I understood that the first time. and I asked you to provide more details about your

Re: [R] update.packages on MS Windows with //server/share paths

2010-01-26 Thread Gabor Grothendieck
Try mapping a drive letter to \\Server02 and then use that. For more, google for: map network drive On Tue, Jan 26, 2010 at 10:01 AM, Keith Jewell wrote: > Hi, > >> update.packages(ask='graphics') > >  gives me  multiple warning (one per updated package?) similar to ... > > Warning: unable to mo

Re: [R] Error with toString

2010-01-26 Thread anna
Romain, I used the paste for numbers to as you told me and it worked. For the toString() function well I called it from the R console and that's what it returned me... -- View this message in context: http://n4.nabble.com/Error-with-toString-tp1290327p1293039.html Sent from the R help mailing li

Re: [R] Error with toString

2010-01-26 Thread anna
thanks! I thought it was a concatenator like in vb -- View this message in context: http://n4.nabble.com/Error-with-toString-tp1290327p1292949.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org mailing list https://s

Re: [R] Error with toString

2010-01-26 Thread S Ellison
"name" & toString(20) is from Excel or OpenOffice; & means 'logical and' in R, not string concatenation. paste() is simpler; sprintf() is more precise as to decimal places and format. >>> anna 26/01/2010 14:09:15 >>> Hello there, I want to create a string from strings and numbers, here is m

Re: [R] reading a string vector

2010-01-26 Thread Romain Francois
On 01/26/2010 02:08 PM, bia.estat wrote: Hi, I need to read a string vector in R which is like this "atgctctaatcgtcccaacaattatattactaccac", but R seems to understand it as a unique vector input when I read in like x<- "atgctctaatcgtcccaacaattatattactaccac". How do I unconcatenate it, so I

Re: [R] Error with toString

2010-01-26 Thread jim holtman
?paste "&" is a logical operator, not string concatenation. On Tue, Jan 26, 2010 at 9:09 AM, anna wrote: > > Hello there, I want to create a string from strings and numbers, here is my > code: > str <- "name" & toString(20) > but it returns me this error: > Error in toString(20) : could not find

Re: [R] reading a string vector

2010-01-26 Thread Ista Zahn
Like this? strsplit("atgctctaatcgtcccaacaattatattactaccac", split="") -Ista On Tue, Jan 26, 2010 at 8:08 AM, bia.estat wrote: > > Hi, I need to read a string vector in R which is like this > "atgctctaatcgtcccaacaattatattactaccac", but R seems to understand it as > a unique vector input w

[R] create custom function to annotate a levelplot

2010-01-26 Thread Jaime R. Garcia M.
Dear list users, I modeled the probability of occurrence of one species: "Cyperus dilatatus". I modeled the species using three different approaches: c("random","target","index") What I want to achieve is to make a plot of all prediction maps in a row with to conditional variables, that is, with

[R] reading a string vector

2010-01-26 Thread bia.estat
Hi, I need to read a string vector in R which is like this "atgctctaatcgtcccaacaattatattactaccac", but R seems to understand it as a unique vector input when I read in like x <- "atgctctaatcgtcccaacaattatattactaccac". How do I unconcatenate it, so I can use each of the letters on my readin

[R] update.packages on MS Windows with //server/share paths

2010-01-26 Thread Keith Jewell
Hi, > update.packages(ask='graphics') gives me multiple warning (one per updated package?) similar to ... Warning: unable to move temporary installation '\\Server02\stats\R\library\2.10\file3de56e0d\locfit' to '\\Server02\stats\R\library\2.10\locfit' The final, updated, folders do not end

Re: [R] Error with toString

2010-01-26 Thread Romain Francois
On 01/26/2010 03:09 PM, anna wrote: Hello there, I want to create a string from strings and numbers, here is my code: str<- "name"& toString(20) Where did you get that syntax from ? You need to use paste. > paste( "name", 20 ) [1] "name 20" but it returns me this error: Error in toString(20

[R] Graph color

2010-01-26 Thread Jose Narillos de Santos
Hi all I want to apply different colors on a simple plot: If I type par(br="gray") before a plot it puts all the image in gray but (imagine I run a simple plot) want to let the centrall box (where the dots are plotted) in white or image in lightblue. Can anyone guide me to apply this second step

Re: [R] Formatting cgroup and factor level labels in Hmisc latex function

2010-01-26 Thread Ista Zahn
Hi Stefan, See comments in line below. On Tue, Jan 26, 2010 at 6:21 AM, Stefan Petersson wrote: > > I'm trying to typeset at simple crosstable with the Hmisc latex function. And > I have two problems. > > 1. How do I make all columns the same width? Use cgroup.just="p{} For example, for column

  1   2   >