[R] Use of different colours in plot

2014-07-18 Thread Stefano Sofia
Dear R list users, I have a data frame called catchment like year season rainfall colour 1953 1 409.5 black 1953 2 145.3 black 1953 3 285.6 red 1953 4 275.0 black 1954 1 273.8 black 1954 2 342.8 blue 1954 3 167.6 black 1954 4 341.1 black 1955 1 182.3 blue 1955 2 211.8 black 1955 3 222.6 black

Re: [R] Model for lm keeps producing an error

2014-07-18 Thread PIKAL Petr
Hi No reproducible example so lust general comments. 1. Your function does not return any value 2. You do not get errors but only warnings 3. In your function you get results only for X1. Is it really your intention? 4. I do not know mclapply but from quick look into help page parameters you use

Re: [R] Use of different colours in plot

2014-07-18 Thread Jim Lemon
On Fri, 18 Jul 2014 07:07:04 AM Stefano Sofia wrote: Dear R list users, I have a data frame called catchment like year season rainfall colour 1953 1 409.5 black 1953 2 145.3 black 1953 3 285.6 red 1953 4 275.0 black 1954 1 273.8 black 1954 2 342.8 blue 1954 3 167.6 black 1954 4 341.1

Re: [R] Use of different colours in plot

2014-07-18 Thread Stefano Sofia
Thank you Jim, perfect. Da: Jim Lemon [j...@bitwrit.com.au] Inviato: venerdì 18 luglio 2014 10.22 A: r-help@r-project.org Cc: Stefano Sofia Oggetto: Re: [R] Use of different colours in plot On Fri, 18 Jul 2014 07:07:04 AM Stefano Sofia wrote: Dear R list

Re: [R] Use of different colours in plot

2014-07-18 Thread João Azevedo Patrício
Em 18-07-2014 08:07, Stefano Sofia escreveu: Dear R list users, I have a data frame called catchment like year season rainfall colour 1953 1 409.5 black 1953 2 145.3 black 1953 3 285.6 red 1953 4 275.0 black 1954 1 273.8 black 1954 2 342.8 blue 1954 3 167.6 black 1954 4 341.1 black 1955 1 182.3

[R] QR code?

2014-07-18 Thread Spencer Graves
Is there an R function to convert text to a QR Code? My search attempts yielded QR decompositions ;-) Thanks, Spencer __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the

Re: [R] Vector of Numbers Not Output to Screen

2014-07-18 Thread Rolf Turner
On 18/07/14 15:00, Dario Strbenac wrote: The example in the question was not inside a user function. Don't be silly. cheers, Rolf Turner -- Rolf Turner Technical Editor ANZJS __ R-help@r-project.org mailing list

Re: [R] Reading SDMX Files in R

2014-07-18 Thread Emmanuel Blondel
Dear Lorenzo, I've just seen one post from you asking for hints to read SDMX data in R. I don't know if you still need to read SDMX datasets in R. In case, you can use the rsdmx package hosted here https://github.com/opensdmx/rsdmx With the OECD sample you mention, you can do as follows:

[R] modifications for ONLY local repository?

2014-07-18 Thread Zadeh, Jenny Drnevich
Hello, We are in the midst of changing our SOP for R on our local cluster. Network access is only available from the head node but we don't want users downloading and compiling packages on the head node. Previously, we asked that all package installations updates be done by the admins on

[R] help with script to get starting date of blooms

2014-07-18 Thread Veronica Andreo
Hi list I have a vector, which are remotely sensed chlorophyll values for a certain pixel in 11 years, then i have a flag or label vector (t_max) that consists of 0 and 1, which tells me where i have the annual peak (one per year, then eleven 1 and all the rest are 0). I'm interested in

[R] Problem with residualPlots with type rstudent

2014-07-18 Thread Muhammad Dogar
I am trying to apply the following command in R Studio but it is giving me error. Can you please leet me know why it is not working with R Studio? residualPlots(our.lm, type=rstudent) Error in match.arg(type) : 'arg' should be one of “working”, “response”, “deviance”,

[R] String comparison, trailing blanks make a difference.

2014-07-18 Thread John McKown
Well, this was a shock to me. And I don't really see any documentation about it, but perhaps I just can't see it. abc == abc [1] FALSE I guess that I thought of strings in R like I do is some other languages where the shorter value is padded with blanks to the length of the longer value, then

Re: [R] String comparison, trailing blanks make a difference.

2014-07-18 Thread William Dunlap
abc == abc [1] FALSE R does no interpretation of strings when doing comparisons so you do have do your own canonicalization. That may involve removing trailing, leading, or all white space or punctuation, converting to lower or upper case, mapping nicknames to official names, trimming to a

Re: [R] String comparison, trailing blanks make a difference.

2014-07-18 Thread Hervé Pagès
Hi John, On 07/18/2014 09:17 AM, John McKown wrote: Well, this was a shock to me. And I don't really see any documentation about it, but perhaps I just can't see it. abc == abc [1] FALSE I guess that I thought of strings in R like I do is some other languages where the shorter value is

[R] understanding the parameters of 'spca' function of 'elasticnet' package

2014-07-18 Thread Adib Shafi
Hi all, i am trying to use the 'spca' function of 'elasticnet' package. But i am confused with the parameter 'para'. Basically the parameter 'para' depends on the parameter 'sparse'. If sparse=penalty, para is a vector of 1-norm penalty parameters. If sparse=varnum, para defines the number of

[R] Problem in installing package ggplot2

2014-07-18 Thread 오건희
Hi.. After I upgraded R from 3.1 to 3.11, I stuck with problem in installing 'ggplot2' package The error message was; Error in loadNamespace(j - i[[1L]], c(lib.loc, .libPaths()), versionCheck = vI[[j]]) : there is no package called ‘Rcpp’ Error: package or namespace load failed for

Re: [R] Problem in installing package ggplot2

2014-07-18 Thread William Dunlap
install.packages(ggplot2,dependencies=T) However, it didn't work, either.. it's so confusing. What does R print when you type the 2 lines install.packages(ggplot2, dependencies=TRUE) libraray(ggplot2) ? (didn't work covers a lot of ground - seeing the entire printed output may tell

Re: [R] Problem in installing package ggplot2

2014-07-18 Thread Jeff Newmiller
The obvious workaround (to me) is to go back and use 3.1 until you figure out how to setup 3.1.1. Re the latter... you have omitted some key information that strongly suggests that you have not read the Posting Guide. You might find reading [1] helpful as well. [1]

[R] Fwd: Plot the means with simultaneous horizontal and vertical error bars

2014-07-18 Thread Ahmed Attia
Dear R users, I would appreciate your help in plotting the means with simultaneous horizontal and vertical error bars. I use the lineplot.CI but it creates the vertical bars only. The attached file has the dataset that I want to graph. The (X) is the x-axis values and (y Lint) is the response

Re: [R] Fwd: Plot the means with simultaneous horizontal and vertical error bars

2014-07-18 Thread Sarah Goslee
You could try plotCI from the plotrix package. Note that most attachments are stripped; dput() is the preferred way to include data. Sarah On Fri, Jul 18, 2014 at 4:41 PM, Ahmed Attia ahmedati...@gmail.com wrote: Dear R users, I would appreciate your help in plotting the means with

[R] setting axis limits and breaks in ggplot2

2014-07-18 Thread Dimitri Liakhovitski
Hello! I want my y axis in this plot to range from 0 to 1 and use as break points 0, 0.1, 0.2 up to 1. Why is my code below not working? Thank you! library(ggplot2) test-data.frame(a=1:4,b=c(0.12,0.5,0.6,0.4)) ggplot(test, aes(x=a, y=b))+geom_line()+ scale_x_continuous(breaks=1:4)+

Re: [R] setting axis limits and breaks in ggplot2

2014-07-18 Thread Sarah Goslee
You need to explicitly specify the limits; see http://docs.ggplot2.org/current/scale_continuous.html library(ggplot2) test-data.frame(a=1:4,b=c(0.12,0.5,0.6,0.4)) ggplot(test, aes(x=a, y=b))+geom_line()+ scale_x_continuous(breaks=1:4)+ scale_y_continuous(breaks=seq(0,1,by=0.1),

Re: [R] setting axis limits and breaks in ggplot2

2014-07-18 Thread Dimitri Liakhovitski
Thank you very much, Sarah! On Fri, Jul 18, 2014 at 5:18 PM, Sarah Goslee sarah.gos...@gmail.com wrote: You need to explicitly specify the limits; see http://docs.ggplot2.org/current/scale_continuous.html library(ggplot2) test-data.frame(a=1:4,b=c(0.12,0.5,0.6,0.4)) ggplot(test,

Re: [R] Fwd: Plot the means with simultaneous horizontal and vertical error bars

2014-07-18 Thread Sarah Goslee
Did you read the help? err: The direction of error bars: x for horizontal, y for vertical (xy would be nice but is not implemented yet; don't know quite how everything would be specified. See examples for composing a plot with simultaneous horizontal

Re: [R] Fwd: Plot the means with simultaneous horizontal and vertical error bars

2014-07-18 Thread Sarah Goslee
On Fri, Jul 18, 2014 at 5:38 PM, Ahmed Attia ahmedati...@gmail.com wrote: Yes, I saw this but I can't translate it to a code. http://svitsrv25.epfl.ch/R-doc/library/Hmisc/html/errbar.html Why are you reading the help for Hmisc::errbar when I suggested (and copied and pasted for you!) the

[R] Fwd: Plot the means with simultaneous horizontal and vertical error bars

2014-07-18 Thread Ahmed Attia
Hi all, I have been also trying the plotCI but it did not work out plotCI(x, y = NULL, uiw, liw = uiw, ui, li, err='y', ylim=NULL, xlim=NULL, type=p, col=par(col), barcol=col, pt.bg = par(bg), sfrac = 0.01, gap=1, lwd=par(lwd), lty=par(lty), labels=FALSE, add=FALSE, xlab,

Re: [R] Fwd: Plot the means with simultaneous horizontal and vertical error bars

2014-07-18 Thread Sarah Goslee
The example given in ?plotCI works just fine for me. You'll need to be more specific about what isn't working, and ideally provide some data with dput(). Notice the add=TRUE argument in the second call to plotCI(). y-runif(10) err.x-runif(10) err.y-runif(10)

Re: [R] Fwd: Plot the means with simultaneous horizontal and vertical error bars

2014-07-18 Thread William Dunlap
Is the original poster having trouble translating the synopsis at the top of the help file to actual code? He should look at the examples at the bottom of the help file, or better, run them with example(plotCI) and see if any of the plots looks close to what he wants. Bill Dunlap TIBCO

[R] Weird but interesting behavior of ggplot2 in a loop

2014-07-18 Thread Dimitri Liakhovitski
Hello and sorry I am not providing an example. However, I hope you'll be able to answer my question. I have a for loop. Inside this loop I build 4 plots using ggplot2. See 2 blocks of code below - I have in total 4 of those: As I step through the loop manually and run all the code inside the

Re: [R] Weird but interesting behavior of ggplot2 in a loop

2014-07-18 Thread Sarah Goslee
Inside a loop or other function you need an explicit print statement. http://cran.r-project.org/doc/FAQ/R-FAQ.html#Why-do-lattice_002ftrellis-graphics-not-work_003f Sarah On Friday, July 18, 2014, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: Hello and sorry I am not providing

Re: [R] Weird but interesting behavior of ggplot2 in a loop

2014-07-18 Thread Dimitri Liakhovitski
Thank you, but if I give my plot a name and then print it, how can I print it with a desired name? png(forname1,width=700,height=450) print( ggplot(result.opt, aes(x=prices, y=demand))+ geom_line(colour='darkblue',size=1.2)+

Re: [R] Weird but interesting behavior of ggplot2 in a loop

2014-07-18 Thread Dimitri Liakhovitski
I meant - the code I just sent doesn't give the file being printed a name... On Fri, Jul 18, 2014 at 7:05 PM, Dimitri Liakhovitski dimitri.liakhovit...@gmail.com wrote: Thank you, but if I give my plot a name and then print it, how can I print it with a desired name?

Re: [R] Weird but interesting behavior of ggplot2 in a loop

2014-07-18 Thread Jeff Newmiller
FAQ 7.16. ... yes, it applies. --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go...

Re: [R] Fwd: Plot the means with simultaneous horizontal and vertical error bars

2014-07-18 Thread Ahmed Attia
My problem is getting x and y into the PlotCI. I do not know how to use the dput(). But below is my data; x x-Water y 150 74.67 75 150 92.2 97 150 138.2 327.5 150 140.2 142.6 150 194.82 333.8 150 226.31 423 150 226.56 590.9 150 240.28 546.6 150 241.55 232.3 150 243.07 454.6 350 252.7

Re: [R] Fwd: Plot the means with simultaneous horizontal and vertical error bars

2014-07-18 Thread Marc Girondot
In the package phenology (in CRAN), I add a function plot_errbar: plot_errbar(..., errbar.x = NULL, errbar.y = NULL, errbar.x.plus = NULL, errbar.x.minus = NULL, errbar.y.plus = NULL, errbar.y.minus = NULL, x.plus = NULL, x.minus = NULL, y.plus = NULL, y.minus = NULL, errbar.tick = 1/50,

Re: [R-es] FW: Selección eficiente de individuos

2014-07-18 Thread Francisco Javier
Hola Carlos, ¿No es posible trabajar con el primer script y ejemplo que me enviaste? El motivo es que no acabo de entender el funcionamiento de este segundo script (he cambiado algún dato), pues creo que presenta 2 inconvenientes (por favor, corrígeme si me equivoco): datos - data.frame(

Re: [R-es] [Grupo de Usuarios R Madrid]: Siguiente reunión el 1-julio... (Agenda disponible)...

2014-07-18 Thread Carlos Ortega
Hola, No sé si os puede interesar el que para empezar y coger un poco más de masa crítica, el abrir un tanto más el alcance del grupo y unir fuerzas a otros colectivos que ya tengan presencia por allí: Periodistas de Datos, BigData, Analytics, etc. A través de Meetup podéis ver si existen

Re: [R-es] FW: Selección eficiente de individuos

2014-07-18 Thread Carlos Ortega
Hola, No, fíjate que en ref he puesto un intervalo mínimo de un día: el fin de año del 2001 (2001-12-31) y el año nuevo del 2002 (2002-01-01). La idea de que este intervalo sea mínimo tiene justamente esta idea de confirmar si el empleado estuvo contratado tanto el 31 como el 1 del

Re: [R-es] [Grupo de Usuarios R Madrid]: Siguiente reunión el 1-julio... (Agenda disponible)...

2014-07-18 Thread Rubén Gómez Antolí
Hola: El 18/07/14 a las #4, Carlos Ortega escribió: Hola, No sé si os puede interesar el que para empezar y coger un poco más de masa crítica, el abrir un tanto más el alcance del grupo y unir fuerzas a otros colectivos que ya tengan presencia por allí: Periodistas de Datos, BigData,

Re: [R-es] FW: Selección eficiente de individuos

2014-07-18 Thread Francisco Javier
Muchas gracias Carlos y Olivier por vuestra paciencia y por vuestra ayuda. ¡Ahora ya sí que funciona! [[alternative HTML version deleted]] ___ R-help-es mailing list R-help-es@r-project.org