Re: [R] Second axis on bottom of graph
Thanks Jim, I see you are the author of staxlab. In the second staxlab I have tried line=3.5 like in axis, and top.line=3.5, separately, with no apparent effect. We should have to select the second axis somehow. Hurr -- View this message in context: http://r.789695.n4.nabble.com/Second-axis-on-bottom-of-graph-tp4690696p4690805.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org 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.
[R] converting a matrix to array
Dear Sir/ Madam, I have a problem with converting a matrix (247 rows, 16 columns) to an array in R. Would you please help me in this regard. Thank you, E. Habibi __ R-help@r-project.org 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] Second axis on bottom of graph
On Sun, 18 May 2014 11:12:21 PM Hurr wrote: Thanks Jim, I see you are the author of staxlab. In the second staxlab I have tried line=3.5 like in axis, and top.line=3.5, separately, with no apparent effect. We should have to select the second axis somehow. Hurr You are correct, as I didn't run your code I forgot about the rotation. Here is a revised staxlab function that should correct the problem and will appear in the next version of plotrix. Thanks for alerting me to it. Jim # staxlab produces staggered axis tick labels # note that barplot() tends to mess things up by plotting an X axis # even when axes=FALSE staxlab-function(side=1,at,labels,nlines=2,top.line=0.5, line.spacing=0.8,srt=NA,ticklen=0.03,adj=1,...) { if(missing(labels)) labels-at nlabels-length(labels) if(missing(at)) at-1:nlabels axislim-par(usr)[3:4-2*side%%2] if(any(at axislim[1]) || any(at axislim[2])) warning(Some axis labels are off the plot) if(is.na(srt)) { linepos-rep(top.line,nlines) for(i in 2:nlines) linepos[i]-linepos[i-1]+line.spacing linepos-rep(linepos,ceiling(nlabels/nlines))[1:nlabels] axis(side=side,at=at,labels=rep(,nlabels)) mtext(text=labels,side=side,line=linepos,at=at,...) } else { linewidth-strheight(M) xylim-par(usr) if(side == 1) { xpos-at if(par(ylog)) ypos-10^(xylim[3]-ticklen*(xylim[4]-xylim[3])) else ypos-xylim[3]-ticklen*(xylim[4]-xylim[3])-top.line*linewidth } if(side == 3) { xpos-at if(par(ylog)) ypos-10^(xylim[4]+ticklen*(xylim[4]-xylim[3])) else ypos-xylim[4]+ticklen*(xylim[4]-xylim[3])+top.line*linewidth } if(side == 2) { ypos-at if(par(xlog)) xpos-10^(xylim[1]-ticklen*(xylim[2]-xylim[1])) else xpos-xylim[1]-ticklen*(xylim[2]-xylim[1])-top.line*linewidth } if(side == 4) { ypos-at if(par(xlog)) xpos-10^(xylim[2]+ticklen*(xylim[2]-xylim[1])) else xpos-xylim[2]+ticklen*(xylim[2]-xylim[1])+top.line*linewidth } par(xpd=TRUE) text(xpos,ypos,labels,srt=srt,adj=adj,...) par(xpd=FALSE) } } __ R-help@r-project.org 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] converting a matrix to array
On Sun, 18 May 2014 08:18:18 PM Effat Habibi wrote: Dear Sir/ Madam, I have a problem with converting a matrix (247 rows, 16 columns) to an array in R. Would you please help me in this regard. Hi Effat, A two-dimensional array is the same thing as a matrix. From the help page for array. Jim __ R-help@r-project.org 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] solution for r-help to the problem of yahoo addresses bouncing?
Hi David, thanks for your reply. On 16.05.2014 23:07, David Winsemius wrote: On May 16, 2014, at 2:25 AM, Jannis wrote: Hi R users, I suspect this is due to yahoo recently changing its handling of DMARC policies. Yes. It is due to ISP bounces coming back to the ETHZ server. You do not say what you did with the rest of the message. Did you click on the re-enable hyperlink? About 250 people were recently forcibly unsubscribed on the same day, mostly with yahoo, gmail, or hotmail addresses, because they had failed to re-enable their subscriptions. (This action by the mailserver filled up the mailboxes of all the moderators.) I reenabled the mailadress at least 5 times at different times after the original reminder so I suspect this may not permanently solve the issue. Is there anything I can do from my side to change this? Or is the only solution to change the mail provider? Seek out methods of putting r-help on your whitemail list. Please do not ask me to describe this for you further. That is your and your ISP's responsibility to sort out. There seems to be no indivdual whitelist for yahoo. I am no expert on these issues but as far as i understand it has more to do with the list mails not originating from the senders IP range. You are right that you (or the people hosting the list) are not responsible for all the individual receivers ISP setting, but in the yahoo case the information on these webpages may solve the issue: https://help.yahoo.com/kb/postmaster/SLN3435.html?impressions=true I personally, however, can not fill in these forms. Sorry for the hassle! If this issue prevails I will certainly contact the yahoo people to change the way they deal with mailing lists or just change the ISP. Cheers Jannis __ R-help@r-project.org 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] filename of current device
On 18/05/2014 18:08, Prof Brian Ripley wrote: On 14/05/2014 23:04, Andreas Leha wrote: Hi all, how do I find out about the filename, the currently open (let's say pdf) device is writing to? If I find 'dev.cur()' returning 'pdf 3' when I expect 'nulldevice 1' I would like to know, which file that pdf device is actually targeting. Any help for my poor organization is highly appreciated... You cannot know this for an arbitrary device, at least not from R. Most files in R are opened with the C call fopen() and thereafter referred to by a file handle: the file can be renamed, unlinked ... whilst the handle is open. Some system utilities[*] may be able to tell you what filepaths are/were associated with file handles open in a process, but it cannot be done portably. However, in R-devel there is the possibility of a device recording extra information about itself. See the NEWS item • Graphics devices can add attributes to their description in .Device and .Devices. Several of those included with R use a filepath attribute. AFAIR the pdf() device does: let's see pdf('/tmp/foo.pdf') dev.cur() pdf 2 .Devices [[1]] [1] null device [[2]] [1] pdf attr(,filepath) [1] /tmp/foo.pdf There is at least one exception: for historical reasons locked in by undocumented use in package tkrplot, the win.metafile() device does include the file path in the device 'name'. [*] They have existed at least on Linux, Windows and OS X. Very nice! Thank you for pointing that out. That's exactly what I was hoping to see in R. Good to know that this is already there. Regards, Andreas __ R-help@r-project.org 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.
[R] could I smooth the geom_line output on ggplot2?
hi, I have got some data and draw a line graph with ggplot2 geom_line. The output seems too sharp to me, is there any way to smooth it? I mean smooth the line, NOT ADDING a smooth line. Or there is other functions in ggplot2 can help me out with a smooth line? Thank you. -- Stand Alone Complex [[alternative HTML version deleted]] __ R-help@r-project.org 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] help with xts
Thanks to all for your ideas and inspirations Il 18/05/2014 18.35, Joshua Ulrich ha scritto: Using subset assignment with an array usually doesn't work well with xts/zoo objects. Your case wouldn't even work with a matrix because you have NA in your array. In this case, you can achieve the same result using multiplication: pos.neg.1 - ((cond1 cond2)*-2+1) test - test * pos.neg.1 Best, -- Joshua Ulrich | about.me/joshuaulrich FOSS Trading | www.fosstrading.com On Sun, May 18, 2014 at 9:25 AM, Pete freeri...@gmail.com wrote: I have 3 xts objects: test, cond1, cond2 You can download here: https://dl.dropboxusercontent.com/u/102669/obj.rar My problem is very simple. test [ cond1 cond2] = NA THIS WORKS test [ cond1 cond2] = -test [ cond1 cond2] THIS DOESN'T WORKS Why? My objective is to substitute all values in test (when cond1 cond2) with the corresponding values of test but with negative sign __ R-help@r-project.org 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. . __ R-help@r-project.org 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] dev-lang/R-3.1.0: biocLite(vsn) removes all files in /
On 2014-05-18 20:43, peter dalgaard wrote: On 18 May 2014, at 07:38 , Jeff Newmiller jdnew...@dcn.davis.ca.us wrote: Then you had best not do it again if you don't like that result. 1) This is not the right mailing list for issues having to do with bioconductor. Please go to the bioconductor mailing list for that. Hmm, this is one case where I'd really rather not scare people off R-help. Non-BioC users do use BioC packages from time to time and what Juergen did is what the BioConductor web pages tells new users to do (probably minus the as-root bit). A warn-off on R-help seems entirely warranted. Good to see that Martin Morgan is taking the issue very seriously in his post below. As a non-BioC user using BioC packages I've always wondered why the standard R functionality isn't enough. Can someone, please, tell me why 'biocLite()' should be used? I've always succeeded installing BioC packages using the standard R tools (as indicated by Uwe in his reply). Henric Winell 2) Running random scripts straight from the internet as root without reviewing them is exactly the kind of thing any experienced *nix user would never do. That is why user-level accounts have limits on the things they can do. I doubt you are supposed to be running anything with your current directory set to /, ever, especially not logged in as root. --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/BatteriesO.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --- Sent from my phone. Please excuse my brevity. On May 17, 2014 10:16:46 PM PDT, Juergen Rose r...@rz.uni-potsdam.de wrote: I had the following files in /: root@caiman:/root(8)# ll / total 160301 drwxr-xr-x 2 root root 4096 May 16 12:23 bin/ drwxr-xr-x 6 root root 3072 May 14 13:58 boot/ -rw-r--r-- 1 root root 38673 May 14 14:22 boot_local-d.log lrwxrwxrwx 1 root root11 Jan 22 2011 data - data_caiman/ drwxr-xr-x 7 root root 4096 Mar 9 22:29 data_caiman/ lrwxrwxrwx 1 root root23 Dec 29 13:43 data_impala - /net/impala/data_impala/ lrwxrwxrwx 1 root root21 Jan 27 08:13 data_lynx2 - /net/lynx2/data_lynx2/ drwxr-xr-x 21 root root 4040 May 14 14:40 dev/ drwxr-xr-x 160 root root 12288 May 17 17:14 etc/ -rw--- 1 root root 15687 Dec 26 13:42 grub.cfg_old lrwxrwxrwx 1 root root11 Jan 23 2011 home - home_caiman/ drwxr-xr-x 5 root root 4096 Dec 26 11:31 home_caiman/ lrwxrwxrwx 1 root root23 Dec 29 13:43 home_impala - /net/impala/home_impala/ lrwxrwxrwx 1 root root21 Jan 27 08:13 home_lynx2 - /net/lynx2/home_lynx2/ lrwxrwxrwx 1 root root 5 Mar 30 04:25 lib - lib64/ drwxr-xr-x 3 root root 4096 May 14 04:31 lib32/ drwxr-xr-x 17 root root 12288 May 16 12:23 lib64/ -rw-r--r-- 1 root root 1797418 May 14 14:22 login.log drwx-- 2 root root 16384 Jan 20 2011 lost+found/ drwxr-xr-x 2 root root 0 May 14 14:21 misc/ drwxr-xr-x 10 root root 4096 Nov 4 2013 mnt/ drwxr-xr-x 4 root root 0 May 17 17:38 net/ drwxr-xr-x 13 root root 4096 Feb 13 13:25 opt/ dr-xr-xr-x 270 root root 0 May 14 14:21 proc/ drwx-- 36 root root 4096 May 17 15:00 root/ drwxr-xr-x 30 root root 840 May 16 18:21 run/ drwxr-xr-x 2 root root 12288 May 16 12:23 sbin/ -rw-r--r-- 1 root root 162191459 Jan 13 2011 stage3-amd64-20110113.tar.bz2 dr-xr-xr-x 12 root root 0 May 14 14:21 sys/ drwxrwxrwt 16 root root 1648 May 17 17:14 tmp/ drwxr-xr-x 19 root root 4096 May 6 04:40 usr/ drwxr-xr-x 16 root root 4096 Dec 26 11:17 var/ Then I did as root: R source(http://bioconductor.org/biocLite.R;) biocLite(vsn) Save workspace image? [y/n/c]: n root@caiman:/root(15)# ll / total 93 drwxr-xr-x 2 root root 4096 May 16 12:23 bin/ drwxr-xr-x 6 root root 3072 May 14 13:58 boot/ drwxr-xr-x 7 root root 4096 Mar 9 22:29 data_caiman/ drwxr-xr-x 21 root root 4040 May 14 14:40 dev/ drwxr-xr-x 160 root root 12288 May 17 17:14 etc/ drwxr-xr-x 5 root root 4096 Dec 26 11:31 home_caiman/ drwxr-xr-x 3 root root 4096 May 14 04:31 lib32/ drwxr-xr-x 17 root root 12288 May 16 12:23 lib64/ drwx-- 2 root root 16384 Jan 20 2011 lost+found/ drwxr-xr-x 2 root root 0 May 14 14:21 misc/ drwxr-xr-x 10 root root 4096 Nov 4 2013 mnt/ drwxr-xr-x 2 root root 0 May 17 17:38 net/ drwxr-xr-x 13 root root 4096 Feb 13 13:25 opt/ dr-xr-xr-x 272 root root 0 May 14 14:21 proc/ drwx-- 36 root root 4096 May 17 15:00 root/ drwxr-xr-x 30 root root 840 May 16 18:21
[R] Course: Introduction to GAM and GAMM with R
We would like to announce the following stats course: Course: Introduction to Generalized Additive Models and Generalized Additive Mixed Effects Models with R Where: Deakin University, Melbourne, Australia When: 25 - 29 August, 2014 URL Flyer: http://www.highstat.com/Courses/Flyer2014_08Deakin.pdf Further info: http://www.highstat.com/statscourse.htm Kind regards, Alain -- Dr. Alain F. Zuur First author of: 1. Beginner's Guide to GAMM with R (2014). 2. Beginner's Guide to GLM and GLMM with R (2013). 3. Beginner's Guide to GAM with R (2012). 4. Zero Inflated Models and GLMM with R (2012). 5. A Beginner's Guide to R (2009). 6. Mixed effects models and extensions in ecology with R (2009). 7. Analysing Ecological Data (2007). Highland Statistics Ltd. 9 St Clair Wynd UK - AB41 6DZ Newburgh Tel: 0044 1358 788177 Email: highs...@highstat.com URL: www.highstat.com blog: http://www.highstat.com/wordpress/ __ R-help@r-project.org 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] Second axis on bottom of graph
Thanks again Jim. Sorry, again I'm enclosing incomplete not-runnable code. Modified like this it works with the new staxlab function which I inserted before the second staxlab call. How long before I don't need to insert it? I didn't see a way to select the specific axis, so I used top.line=5. Is that what I should do? axis(1,tick=TRUE,at=horTicLocs,labels=rep(,length(horLabels)),padj=0) staxlab(1,at=horTicLocs,labels=horLabels,srt=90,adj=c(1,0)) nFrqTicInvls=9; frqTicLocs - vector(length=nFrqTicInvls+1); frqLabels - vector(length=nFrqTicInvls+1); frqInvl=(horAxisLims[2]-horAxisLims[1])/nFrqTicInvls for(i in 1:(nFrqTicInvls+1))frqTicLocs[i]=horAxisLims[1]+(i-1)*frqInvl for(i in 1:(nFrqTicInvls+1))frqLabels[i]=.jcall(OuWid,S,sR,frqTicLocs[i],as.integer(4)) for(i in 1:(nFrqTicInvls+1))print(frqLabels[i]) axis(1,tick=TRUE,line=3.5,at=frqTicLocs,labels=rep(,length(frqLabels)),padj=0) staxlab(1,top.line=5,at=frqTicLocs,labels=frqLabels,srt=90) title(xlab=Cycles/Yr,line=6) Hurr -- View this message in context: http://r.789695.n4.nabble.com/Second-axis-on-bottom-of-graph-tp4690696p4690819.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org 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.
[R] extract duplications from list
Hi, I have a list of 40 data.frames. I would like to identify duplicated entries in the whole list, not only in one specific data.frame, but in all 40. Here is my list: myList [[1]] XNAME MEM.SHIP 1 FBgn008 FBgn008 0.9304502 2 FBgn014 FBgn014 1.000 3 FBgn028 FBgn028 1.000 4 FBgn109 FBgn109 1.000 5 FBgn114 FBgn114 0.4839886 6 FBgn120 FBgn120 1.000 [[2]] XNAME MEM.SHIP 1 FBgn251 FBgn251 0.3138650 2 FBgn0001168 FBgn0001168 0.8995011 3 FBgn0001941 FBgn0001941 0.7485548 4 FBgn0003053 FBgn028 0.4426997 5 FBgn0003159 FBgn0003159 0.4843226 6 FBgn120 FBgn0003162 0.6556290 I would like to know whether there are duplicated entries in the first and/or second column of all. In this list I have two duplications one is FBgn120 in both lines Nr. 6 and the second is FBgn028 in line 3 and line 4 in df1 and df2 respectively. Is there a way to do it. With unique I don't get any results. and I cannot convert the list into a data.frame, as the number of items in each df is different. Thanks Assa [[alternative HTML version deleted]] __ R-help@r-project.org 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.
[R] Spatial Quantile Regression: Extracting residuals
Dear R users, Could anyone tell me if there is a way to obtain the residuals from a model fitted by qregspiv(y ~ x,wmat=wmat,inst=NULL,tau=.5,rhomat = seq(-1,1,.01),printsariv=T,silent=F, nboot=300,data=) in McSpatial, using the Chernozhukov and Hansen (2006) method. Many thanks in advance and kind regards, Marie-Line Ph.D. Candidate Institute of Geography and Spatial Planning UNIVERSITÉ DU LUXEMBOURG CAMPUS WALFERDANGE Route de Diekirch / BP 2 L-7201 Walferdange Luxembourg marie-line.glaese...@uni.lumailto:marie-line.glaese...@uni.lu www.geo.ipse.uni.luhttp://www.geo.ipse.uni.lu/ [[alternative HTML version deleted]] __ R-help@r-project.org 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] Second axis on bottom of graph
On Mon, 19 May 2014 05:23:20 AM Hurr wrote: Thanks again Jim. Sorry, again I'm enclosing incomplete not-runnable code. Modified like this it works with the new staxlab function which I inserted before the second staxlab call. How long before I don't need to insert it? I didn't see a way to select the specific axis, so I used top.line=5. Is that what I should do? axis(1,tick=TRUE,at=horTicLocs,labels=rep(,length(horLabels)),padj=0) staxlab(1,at=horTicLocs,labels=horLabels,srt=90,adj=c(1,0)) nFrqTicInvls=9; frqTicLocs - vector(length=nFrqTicInvls+1); frqLabels - vector(length=nFrqTicInvls+1); frqInvl=(horAxisLims[2]-horAxisLims[1])/nFrqTicInvls for(i in 1:(nFrqTicInvls+1))frqTicLocs[i]=horAxisLims[1]+(i-1)*frqInvl for(i in 1: (nFrqTicInvls+1))frqLabels[i]=.jcall(OuWid,S,sR,frqTicLocs[i],as.integ er(4)) for(i in 1:(nFrqTicInvls+1))print(frqLabels[i]) axis(1,tick=TRUE,line=3.5,at=frqTicLocs,labels=rep(,length(frqLabels)),pad j=0) staxlab(1,top.line=5,at=frqTicLocs,labels=frqLabels,srt=90) title(xlab=Cycles/Yr,line=6) Hurr I guess top.line=5 would be almost off the bottom of the plot. I assume that you know how it should look (I don't) and can adjust the top.line value until it looks right. the next version of plotrix will probably be out in a week or two. Jim __ R-help@r-project.org 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.
[R] substring if value starts with a character
Hello togehter, i have a litte problem to convert a data.frame. My data.frame looks like this one A 1 R5000 2 R4800 3 R4700 4 3500 5 3800 I need now a command, which outputs all the numbers, without the character in front. The solution look like this one: A 1 5000 2 4800 3 4700 4 3500 5 3800 Thanks. Best regards. Mat -- View this message in context: http://r.789695.n4.nabble.com/substring-if-value-starts-with-a-character-tp4690823.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org 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] Testing parallel regression assumption
Hello, Take a look at http://stats.stackexchange.com/questions/58772/brant-test-in-r Hope this helps, Rui Barradas Em 19-05-2014 01:40, caoweina escreveu: Dear Rose : I saw your questions about the R function that performs brant test. Have you worked out ? Please give some advice. I need to do the brant test in R . Thank you very much! sincerely! Anna __ R-help@r-project.org 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. __ R-help@r-project.org 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] substring if value starts with a character
Hello, Try the following. dat - read.table(text = A 1 R5000 2 R4800 3 R4700 4 3500 5 3800 , header = TRUE) dat dat2 - dat dat2[] - lapply(dat, function(x) sub(^[[:alpha:]]*(.*$), \\1, x)) dat2 Hope this helps, Rui Barradas Em 19-05-2014 14:00, Mat escreveu: Hello togehter, i have a litte problem to convert a data.frame. My data.frame looks like this one A 1 R5000 2 R4800 3 R4700 4 3500 5 3800 I need now a command, which outputs all the numbers, without the character in front. The solution look like this one: A 1 5000 2 4800 3 4700 4 3500 5 3800 Thanks. Best regards. Mat -- View this message in context: http://r.789695.n4.nabble.com/substring-if-value-starts-with-a-character-tp4690823.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org 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. __ R-help@r-project.org 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] extract duplications from list
Here is one way of doing it: ## files - list(file1 = XNAME MEM.SHIP + 1 FBgn008 FBgn008 0.9304502 + 2 FBgn014 FBgn014 1.000 + 3 FBgn028 FBgn028 1.000 + 4 FBgn109 FBgn109 1.000 + 5 FBgn114 FBgn114 0.4839886 + 6 FBgn120 FBgn120 1.000, + file2 = XNAME MEM.SHIP + 1 FBgn251 FBgn251 0.3138650 + 2 FBgn0001168 FBgn0001168 0.8995011 + 3 FBgn0001941 FBgn0001941 0.7485548 + 4 FBgn0003053 FBgn028 0.4426997 + 5 FBgn0003159 FBgn0003159 0.4843226 + 6 FBgn120 FBgn0003162 0.6556290) # read in all the files (dummies in this case) # append file name allFiles - do.call(rbind, lapply(names(files), function(.name){ + input - read.table(text = files[[.name]], as.is = TRUE) + input$file - .name + input # return value + })) # function to mark all duplicate entries allDup - + function (value) + { + duplicated(value) | duplicated(value, fromLast = TRUE) + } allFiles$col1 - allDup(allFiles$X) allFiles$col2 - allDup(allFiles$NAME) allFiles XNAME MEM.SHIP file col1 col2 1 FBgn008 FBgn008 0.9304502 file1 FALSE FALSE 2 FBgn014 FBgn014 1.000 file1 FALSE FALSE 3 FBgn028 FBgn028 1.000 file1 FALSE TRUE 4 FBgn109 FBgn109 1.000 file1 FALSE FALSE 5 FBgn114 FBgn114 0.4839886 file1 FALSE FALSE 6 FBgn120 FBgn120 1.000 file1 TRUE FALSE 11 FBgn251 FBgn251 0.3138650 file2 FALSE FALSE 21 FBgn0001168 FBgn0001168 0.8995011 file2 FALSE FALSE 31 FBgn0001941 FBgn0001941 0.7485548 file2 FALSE FALSE 41 FBgn0003053 FBgn028 0.4426997 file2 FALSE TRUE 51 FBgn0003159 FBgn0003159 0.4843226 file2 FALSE FALSE 61 FBgn120 FBgn0003162 0.6556290 file2 TRUE FALSE Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you want to do it. On Mon, May 19, 2014 at 8:48 AM, Assa Yeroslaviz fry...@gmail.com wrote: Hi, I have a list of 40 data.frames. I would like to identify duplicated entries in the whole list, not only in one specific data.frame, but in all 40. Here is my list: myList [[1]] XNAME MEM.SHIP 1 FBgn008 FBgn008 0.9304502 2 FBgn014 FBgn014 1.000 3 FBgn028 FBgn028 1.000 4 FBgn109 FBgn109 1.000 5 FBgn114 FBgn114 0.4839886 6 FBgn120 FBgn120 1.000 [[2]] XNAME MEM.SHIP 1 FBgn251 FBgn251 0.3138650 2 FBgn0001168 FBgn0001168 0.8995011 3 FBgn0001941 FBgn0001941 0.7485548 4 FBgn0003053 FBgn028 0.4426997 5 FBgn0003159 FBgn0003159 0.4843226 6 FBgn120 FBgn0003162 0.6556290 I would like to know whether there are duplicated entries in the first and/or second column of all. In this list I have two duplications one is FBgn120 in both lines Nr. 6 and the second is FBgn028 in line 3 and line 4 in df1 and df2 respectively. Is there a way to do it. With unique I don't get any results. and I cannot convert the list into a data.frame, as the number of items in each df is different. Thanks Assa [[alternative HTML version deleted]] __ R-help@r-project.org 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. [[alternative HTML version deleted]] __ R-help@r-project.org 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] substring if value starts with a character
Hi Mat, Try that: gsub([A-Za-z], , df$A) This is a regular expression that looks for all characters (A to Z and a to z) and replaces it with nothing () You will need to convert the column to numeric after this operation. HTH, Ivan -- Ivan Calandra University of Franche-Comté Laboratoire Chrono-Environnement Bureau ATER -107L 16, Route de Gray 25030 Besançon Cedex, France ivan.calan...@univ-fcomte.fr +33 (0) 381 66 20 60 http://chrono-environnement.univ-fcomte.fr/spip.php?article1830 Le 19/05/14 15:00, Mat a écrit : Hello togehter, i have a litte problem to convert a data.frame. My data.frame looks like this one A 1 R5000 2 R4800 3 R4700 4 3500 5 3800 I need now a command, which outputs all the numbers, without the character in front. The solution look like this one: A 1 5000 2 4800 3 4700 4 3500 5 3800 Thanks. Best regards. Mat -- View this message in context: http://r.789695.n4.nabble.com/substring-if-value-starts-with-a-character-tp4690823.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org 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. __ R-help@r-project.org 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.
[R] K-mean Clustering in URL's
Hi , I have some URL's like :- 2 facebook http://www.facebook.com http://www.facebook.com/ http://twitter.com/facebook http://twitter.com/facebook http://en.wikipedia.org/wiki/Facebook http://play.google.com/store/apps/developer?id=Facebookhl=en http://mashable.com/category/facebook http://www.facebookstories.com How to find kmean clusterring of this text URL data? THanks ASHIS [[alternative HTML version deleted]] __ R-help@r-project.org 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.
[R] Boxplots
Hi, I have boxplots by factors for a dataset and trying to include a boxplot to represent the entire dataset. Any idea how this would be done? Thanks -- Shane [[alternative HTML version deleted]] __ R-help@r-project.org 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] dev-lang/R-3.1.0: biocLite(vsn) removes all files in /
On 05/19/2014 01:09 AM, Henric Winell wrote: On 2014-05-18 20:43, peter dalgaard wrote: On 18 May 2014, at 07:38 , Jeff Newmiller jdnew...@dcn.davis.ca.us wrote: Then you had best not do it again if you don't like that result. 1) This is not the right mailing list for issues having to do with bioconductor. Please go to the bioconductor mailing list for that. Hmm, this is one case where I'd really rather not scare people off R-help. Non-BioC users do use BioC packages from time to time and what Juergen did is what the BioConductor web pages tells new users to do (probably minus the as-root bit). A warn-off on R-help seems entirely warranted. Good to see that Martin Morgan is taking the issue very seriously in his post below. As a non-BioC user using BioC packages I've always wondered why the standard R functionality isn't enough. Can someone, please, tell me why 'biocLite()' should be used? I've always succeeded installing BioC packages using the standard R tools (as indicated by Uwe in his reply). Conversely, I've always succeeded in installing CRAN and Bioc packages via source(http://bioconductor.org/biocLite.R;) biocLite(...) and am more-or-less flummoxed by the extra steps I'm asked to perform (to choose and set repositories) when I take that rare foray into install.packages()-land! One point is that http://bioconductor.org actually points to an Amazon CloudFront address, which means that the content comes from a geographically proximate and reliable location (this makes choice of repository mostly irrelevant for normal users, just point to bioconductor.org) Bioconductor has a repository and release schedule that differs from R (Bioconductor has a 'devel' branch to which new packages and updates are introduced, and a stable 'release' branch emitted once every 6 months to which bug fixes but not new features are introduced). A consequences of the mismatch between R and Bioconductor release schedules is that the Bioconductor version identified by Uwe's method is sometimes not the most recent 'release' available. For instance, R 3.1.1 will likely be introduced some months before the next Bioc release. After the Bioc release, 3.1.1 users will be pointed to an out-of-date version of Bioconductor. A consequence of the distinct 'devel' branch is that Uwe's method sometimes points only to the 'release' repository, whereas Bioconductor developers and users wanting leading-edge features wish to access the Bioconductor 'devel' repository. For instance, the next Bioc release will be available for R.3.1.x, so Bioconductor developers and leading-edge users need to be able to install the devel version of Bioconductor packages into the same version (though perhaps different instance or at least library location) of R that currently supports the release version. An indirect consequence of the structured release is that Bioconductor packages generally have more extensive dependencies with one another, both explicitly via the usual package mechanisms and implicitly because the repository, release structure, and Bioconductor community interactions favor re-use of data representations and analysis concepts across packages. There is thus a higher premium on knowing that packages are from the same release, and that all packages are current within the release. These days, the main purpose of source(http://bioconductor.org/biocLite.R;) is to install and attach the 'BiocInstaller' package. In a new installation, the script installs the most recent version of the BiocInstaller package relevant to the version of R in use, regardless of the relative times of R and Bioconductor release cycles. The BiocInstaller package serves as the primary way to identify the version of Bioconductor in use library(BiocInstaller) Bioconductor version 2.14 (BiocInstaller 1.14.2), ?biocLite for help Since new features are often appealing to users, but at the same time require an updated version of Bioconductor, the source() command evaluated in an out-of-date R will nudge users to upgrade, e.g., in R-2.15.3 source(http://bioconductor.org/biocLite.R;) A new version of Bioconductor is available after installing the most recent version of R; see http://bioconductor.org/install The biocLite() function is provided by BiocInstaller. This is a wrapper around install.packages, but with the repository chosen according to the version of Bioconductor in use, rather than to the version relevant at the time of the release of R. biocLite also nudges users to remain current within a release, by default checking for out-of-date packages and asking if the user would like to update biocLite() BioC_mirror: http://bioconductor.org Using Bioconductor version 2.14 (BiocInstaller 1.14.2), R version 3.1.0. Old packages: 'BBmisc', 'genefilter', 'GenomicAlignments', 'GenomicRanges', 'IRanges', 'MASS', 'reshape2', 'Rgraphviz', 'RJSONIO', 'rtracklayer' Update all/some/none?
Re: [R] Boxplots
Read the posting guide, which tells you to provide a minimal reproducible example [1] (there it's more than one way to accomplish what you have done already) and post using plain text (so your R code comes through without being corrupted). [1] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example --- Jeff NewmillerThe . . Go Live... DCN:jdnew...@dcn.davis.ca.usBasics: ##.#. ##.#. Live Go... Live: OO#.. Dead: OO#.. Playing Research Engineer (Solar/BatteriesO.O#. #.O#. with /Software/Embedded Controllers) .OO#. .OO#. rocks...1k --- Sent from my phone. Please excuse my brevity. On May 19, 2014 7:08:00 AM PDT, Shane Carey careys...@gmail.com wrote: Hi, I have boxplots by factors for a dataset and trying to include a boxplot to represent the entire dataset. Any idea how this would be done? Thanks __ R-help@r-project.org 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.
[R] level for confint (nls)
Dear list, I have this nls model and trying to calculate the confidence interval for some parameter. I found if I use the default value level=0.95, confint can calculate a value; when I change the level=0.9, then it return :Error in prof$getProfile() : number of iterations exceeded maximum of 50. The strange thing is if I use level=0.8, it is working again. Why is that? How do I get an CI value for any level? Thanks. Jun Shen [[alternative HTML version deleted]] __ R-help@r-project.org 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.
[R] How to define and calculate volume of 3D polygon?
Hi Folks, I have a set of x,y,z points in 3D space that defines the outline of a tree crown (5 - 15 perimeter points + 1 top bottom point). I would like to calculate the volume of the corresponding 3D polygon based on those points. I have been able to use geometry::convhulln, but I think this isn't the right algorithm, since the polygon needs to pass through each point in order, and not just snap a rubber-band around the outer points. Any suggestions for alternative algorithms and packages would be most welcome! Thanks, Allie seq x yz 11 -1.7310065 2.4502278 11.1 22 -1.9048260 -0.6096212 9.0 33 2.8652209 0.8891057 11.0 44 2.3929514 -3.4516349 11.2 55 -2.6436343 5.2745803 11.7 66 -4.3521504 4.6924180 11.7 77 6.1441732 -4.8051156 11.6 88 -6.2157823 -3.2193244 8.0 99 1.0024961 -2.8275434 9.0 10 10 -3.9656821 3.0452201 8.0 11 11 4.2070518 -1.5970958 11.0 12 12 -0.9461915 1.2902409 9.8 13 13 2.2792265 0.7517491 11.4 __ R-help@r-project.org 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] How to Optimize two functions together in R
I try to use NSGAII function in the mco but I am kind of confusing about the numbers of input and output dimension in the argument. Could you explain a little about this? Thank you. -- View this message in context: http://r.789695.n4.nabble.com/How-to-Optimize-two-functions-together-in-R-tp4690654p4690832.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org 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.
[R] XML pkg. Namespace message
I am getting messages like: Namespace prefix ccd on el-418bd009-f19a-4107-bc7b-2abb83748bbb is not defined Namespace prefix mlhim244 on interval-type is not defined when retrieving nodesets like this: pct - getNodeSet(root, '//ccd:el-6acf3ae9-222c-4f71-8120-76375db84177', nsDEF) nsDEF is defined as: nsDEF - function(){ return(c(ccd='http://www.mlhim.org/ccd',mlhim244=' http://www.mlhim.org/xmlns/mlhim2/2_4_4')) } Which clearly has both namespaces defined and they match the definitions in the XML. The returned nodesets are correct. In fact, when I do not see these messages, I know that I have a namespace problem. So my questions is: Are these normal return messages? They sure look like error messages. Thanks for any clarification. --Tim Timothy Cook LinkedIn Profile:http://www.linkedin.com/in/timothywaynecook MLHIM http://www.mlhim.org [[alternative HTML version deleted]] __ R-help@r-project.org 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] level for confint (nls)
I believe this has to do with numeric issues in nonlinear fitting and interpolation, and is neither concerned with R programming nor trivial to answer. I therefore suggest you post on the stats.stackexchange.com for a fuller discussion of the issues. Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 Data is not information. Information is not knowledge. And knowledge is certainly not wisdom. H. Gilbert Welch On Mon, May 19, 2014 at 7:42 AM, Jun Shen jun.shen...@gmail.com wrote: Dear list, I have this nls model and trying to calculate the confidence interval for some parameter. I found if I use the default value level=0.95, confint can calculate a value; when I change the level=0.9, then it return :Error in prof$getProfile() : number of iterations exceeded maximum of 50. The strange thing is if I use level=0.8, it is working again. Why is that? How do I get an CI value for any level? Thanks. Jun Shen [[alternative HTML version deleted]] __ R-help@r-project.org 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. __ R-help@r-project.org 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] How to define and calculate volume of 3D polygon?
On 19/05/2014, 10:42 AM, Alexander Shenkin wrote: Hi Folks, I have a set of x,y,z points in 3D space that defines the outline of a tree crown (5 - 15 perimeter points + 1 top bottom point). I would like to calculate the volume of the corresponding 3D polygon based on those points. I have been able to use geometry::convhulln, but I think this isn't the right algorithm, since the polygon needs to pass through each point in order, and not just snap a rubber-band around the outer points. Any suggestions for alternative algorithms and packages would be most welcome! If you aren't using the convex hull, you need to specify more information. The vertices of a polyhedron don't have a natural order, so passing through them in order doesn't make sense. One way to specify this information is to specify which triples of vertices form triangular faces, as convhulln does. I don't know of a package containing code to compute the volume, but a description of the algorithm is on this page: http://www.ecse.rpi.edu/~wrf/Research/Short_Notes/volume.html Duncan Murdoch Thanks, Allie seq x yz 11 -1.7310065 2.4502278 11.1 22 -1.9048260 -0.6096212 9.0 33 2.8652209 0.8891057 11.0 44 2.3929514 -3.4516349 11.2 55 -2.6436343 5.2745803 11.7 66 -4.3521504 4.6924180 11.7 77 6.1441732 -4.8051156 11.6 88 -6.2157823 -3.2193244 8.0 99 1.0024961 -2.8275434 9.0 10 10 -3.9656821 3.0452201 8.0 11 11 4.2070518 -1.5970958 11.0 12 12 -0.9461915 1.2902409 9.8 13 13 2.2792265 0.7517491 11.4 __ R-help@r-project.org 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. __ R-help@r-project.org 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] How to Optimize two functions together in R
Use defaul values initially, to see if you got reasonable results. See here for the details of nsga2 http://dx.doi.org/10.1109/4235.996017 On 19 May 2014 16:42, Mingxuan Han han...@purdue.edu wrote: I try to use NSGAII function in the mco but I am kind of confusing about the numbers of input and output dimension in the argument. Could you explain a little about this? Thank you. -- View this message in context: http://r.789695.n4.nabble.com/How-to-Optimize-two-functions-together-in-R-tp4690654p4690832.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org 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. __ R-help@r-project.org 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] extract duplications from list
Hi, You may try: myList - list(structure(list(X = c(FBgn008, FBgn014, FBgn028, FBgn109, FBgn114, FBgn120), NAME = c(FBgn008, FBgn014, FBgn028, FBgn109, FBgn114, FBgn120 ), MEM.SHIP = c(0.9304502, 1, 1, 1, 0.4839886, 1)), .Names = c(X, NAME, MEM.SHIP), class = data.frame, row.names = c(1, 2, 3, 4, 5, 6)), structure(list(X = c(FBgn251, FBgn0001168, FBgn0001941, FBgn0003053, FBgn0003159, FBgn120 ), NAME = c(FBgn251, FBgn0001168, FBgn0001941, FBgn028, FBgn0003159, FBgn0003162), MEM.SHIP = c(0.313865, 0.8995011, 0.7485548, 0.4426997, 0.4843226, 0.655629)), .Names = c(X, NAME, MEM.SHIP), class = data.frame, row.names = c(1, 2, 3, 4, 5, 6))) library(data.table) dt1 - rbindlist(myList) fun1 - function(val){duplicated(val)|duplicated(val,fromLast=TRUE)} dt1[,paste0(Col,1:2):=lapply(.SD, fun1),.SDcols=1:2] dt1 A.K. On Monday, May 19, 2014 8:50 AM, Assa Yeroslaviz fry...@gmail.com wrote: Hi, I have a list of 40 data.frames. I would like to identify duplicated entries in the whole list, not only in one specific data.frame, but in all 40. Here is my list: myList [[1]] X NAME MEM.SHIP 1 FBgn008 FBgn008 0.9304502 2 FBgn014 FBgn014 1.000 3 FBgn028 FBgn028 1.000 4 FBgn109 FBgn109 1.000 5 FBgn114 FBgn114 0.4839886 6 FBgn120 FBgn120 1.000 [[2]] X NAME MEM.SHIP 1 FBgn251 FBgn251 0.3138650 2 FBgn0001168 FBgn0001168 0.8995011 3 FBgn0001941 FBgn0001941 0.7485548 4 FBgn0003053 FBgn028 0.4426997 5 FBgn0003159 FBgn0003159 0.4843226 6 FBgn120 FBgn0003162 0.6556290 I would like to know whether there are duplicated entries in the first and/or second column of all. In this list I have two duplications one is FBgn120 in both lines Nr. 6 and the second is FBgn028 in line 3 and line 4 in df1 and df2 respectively. Is there a way to do it. With unique I don't get any results. and I cannot convert the list into a data.frame, as the number of items in each df is different. Thanks Assa [[alternative HTML version deleted]] __ R-help@r-project.org 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. __ R-help@r-project.org 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] Boxplots
I have boxplots by factors for a dataset and trying to include a boxplot to represent the entire dataset. Have a look at last the example in ?boxplot which plots a second set of values beside a first set. In your case, specifying xlim larger than needed by one and then using boxplot(x, at=n+1) is the kind of thing you'd need to do. S Ellison *** This email and any attachments are confidential. Any use...{{dropped:8}} __ R-help@r-project.org 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] Boxplots
tmp - data.frame(y=c(rnorm(20), rnorm(20), c=rnorm(20)), g=rep(letters[1:3], each=20)) library(lattice) library(latticeExtra) A - bwplot(y ~ g, data=tmp) B - bwplot(y ~ rep(Y,60), data=tmp, horizontal=FALSE) resizePanels(c(Individual=A, All Together=B, layout=c(2,1)), w=c(3,1)) ## for even more options, you can look at the examples in ## the HH package ## install.packages(HH) ## if necessary library(HH) demo(bwplot.examples, package=HH) example(panel.bwplot.superpose, package=HH) ?panel.bwplot.intermediate.hh ?panel.bwplot.superpose On Mon, May 19, 2014 at 10:08 AM, Shane Carey careys...@gmail.com wrote: Hi, I have boxplots by factors for a dataset and trying to include a boxplot to represent the entire dataset. Any idea how this would be done? Thanks -- Shane [[alternative HTML version deleted]] __ R-help@r-project.org 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. __ R-help@r-project.org 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] Is there an easier way than this to list all functions in the global environment?
Thanks. Good suggestion. I completely forgot about the *apply() functions -- a symptom of my R-neophyte status. ;-) From: Peter Alspach peter.alsp...@plantandfood.co.nz ct.org Sent: Sunday, May 18, 2014 4:24 PM Subject: RE: [R] Is there an easier way than this to list all functions in the global environment? Tena koe Byron Many years ago, I came across the following function by Simon Fear: function (splitby = mode, pos = 1, ...) { lsout - ls(pos = pos, ...) tapply(lsout, sapply(lsout, function(x) { splitby(get(x)) }), invisible) } from which one can deduce that, given your obj, the following line could replace your loop: obj[sapply(obj, function(x) mode(get(x))=='function')] For future reference, it can be slow in R to continually append to an object: test - character(0) system.time(for (i in 1:10^5) test - c(test, as.character(i))) # user system elapsed # 47.86 0.02 47.89 test - character(10^5) system.time(for (i in 1:10^5) test[i] - as.character(i)) # user system elapsed # 0.25 0.00 0.25 HTH Peter Alspach -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Byron Dom Sent: Monday, 19 May 2014 10:50 a.m. To: r-help@r-project.org Subject: [R] Is there an easier way than this to list all functions in the global environment? After an unsuccessful search thru several books plus online documentation, I was unable to find a simple way to do this, so I wrote my own function (see below) to do it. I'm relatively new to R however, so I'm guessing that there must be an easier way to do it. I want to list all functions and only the functions (not other objects also) in the global environment. I'm working with several old R workspaces that contain a very large number of objects -- functions, data structures, etc. and I would to be able to easily find out which objects are functions. The function below (listfunc()) works fine. I'm just asking this for future reference. +++ listfunc - function() { # lists names of all function objects in the global environment obj - objects(.GlobalEnv) funclist - character(length = 0) for (i in 1:length(obj)) { if (mode(get(obj[i])) == function) funclist - c(funclist,obj[i]) } return(funclist) } +++ __ R-help@r-project.org 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. The contents of this e-mail are confidential and may be ...{{dropped:16}} __ R-help@r-project.org 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] Is there an easier way than this to list all functions in the global environment?
Thanks. That's the answer I was looking for. It not only lists the function names by also the arguments required. I wonder why I was unable to find that command in all the searching I did (?). - - Byron To: r-help@r-project.org r-help@r-project.org Cc: Peter Alspach peter.alsp...@plantandfood.co.nz; Byron Dom byron_...@yahoo.com Sent: Sunday, May 18, 2014 7:01 PM Subject: Re: [R] Is there an easier way than this to list all functions in the global environment? Hi, You may also check ?lsf.str() c(lsf.str()) A.K. On Sunday, May 18, 2014 7:27 PM, Peter Alspach peter.alsp...@plantandfood.co.nz wrote: Tena koe Byron Many years ago, I came across the following function by Simon Fear: function (splitby = mode, pos = 1, ...) { lsout - ls(pos = pos, ...) tapply(lsout, sapply(lsout, function(x) { splitby(get(x)) }), invisible) } from which one can deduce that, given your obj, the following line could replace your loop: obj[sapply(obj, function(x) mode(get(x))=='function')] For future reference, it can be slow in R to continually append to an object: test - character(0) system.time(for (i in 1:10^5) test - c(test, as.character(i))) # user system elapsed # 47.86 0.02 47.89 test - character(10^5) system.time(for (i in 1:10^5) test[i] - as.character(i)) # user system elapsed # 0.25 0.00 0.25 HTH Peter Alspach -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Byron Dom Sent: Monday, 19 May 2014 10:50 a.m. To: r-help@r-project.org Subject: [R] Is there an easier way than this to list all functions in the global environment? After an unsuccessful search thru several books plus online documentation, I was unable to find a simple way to do this, so I wrote my own function (see below) to do it. I'm relatively new to R however, so I'm guessing that there must be an easier way to do it. I want to list all functions and only the functions (not other objects also) in the global environment. I'm working with several old R workspaces that contain a very large number of objects -- functions, data structures, etc. and I would to be able to easily find out which objects are functions. The function below (listfunc()) works fine. I'm just asking this for future reference. +++ listfunc - function() { # lists names of all function objects in the global environment obj - objects(.GlobalEnv) funclist - character(length = 0) for (i in 1:length(obj)) { if (mode(get(obj[i])) == function) funclist - c(funclist,obj[i]) } return(funclist) } +++ __ R-help@r-project.org 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. The contents of this e-mail are confidential and may be ...{{dropped:11}} __ R-help@r-project.org 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] substring if value starts with a character
Hi, Try: dat - read.table(text=A 1 R5000 2 R4800 3 R4700 4 3500 5 3800,sep=,header=TRUE,stringsAsFactors=FALSE) dat$A - as.numeric(gsub([[:alpha:]]+,,dat$A)) A.K. On Monday, May 19, 2014 9:02 AM, Mat matthias.we...@fnt.de wrote: Hello togehter, i have a litte problem to convert a data.frame. My data.frame looks like this one A 1 R5000 2 R4800 3 R4700 4 3500 5 3800 I need now a command, which outputs all the numbers, without the character in front. The solution look like this one: A 1 5000 2 4800 3 4700 4 3500 5 3800 Thanks. Best regards. Mat -- View this message in context: http://r.789695.n4.nabble.com/substring-if-value-starts-with-a-character-tp4690823.html Sent from the R help mailing list archive at Nabble.com. __ R-help@r-project.org 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. __ R-help@r-project.org 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.
[R] solve scalar linear equation
Readers, The function 'solve' states that it is applicable to a vector or matrix object. Please what is the syntax to solve a very simple equation like: 5x + 1 = 56 The books read so far give explanations for simultaneous linear equations or differential equations, but there have not been able to find a very basic description to solve simple equations (as an initial learning stage). Thanks. __ R-help@r-project.org 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] converting a matrix to array
Hi, If you meant to convert the matrix to a 3D array, check this link: http://stackoverflow.com/questions/9572656/how-to-convert-matrix-into-array A.K. On Monday, May 19, 2014 2:18 AM, Effat Habibi habibi...@gmail.com wrote: Dear Sir/ Madam, I have a problem with converting a matrix (247 rows, 16 columns) to an array in R. Would you please help me in this regard. Thank you, E. Habibi __ R-help@r-project.org 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. __ R-help@r-project.org 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.
[R] R save with encoding...
Hello everybody!! I'm trying to plot a graphic with the title: INTERVALS λ. But the special character λ can't be encoded using ISO8859-1. Which another encoding I need to choose? Att. Alexsandro Cândido de Oliveira Silva ___ --- Este email está limpo de vÃrus e malwares porque a proteção do avast! AntivÃrus está ativa. http://www.avast.com [[alternative HTML version deleted]] __ R-help@r-project.org 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] Boxplots
Great, Thanks everyone :-) On Monday, May 19, 2014, Richard M. Heiberger r...@temple.edu wrote: tmp - data.frame(y=c(rnorm(20), rnorm(20), c=rnorm(20)), g=rep(letters[1:3], each=20)) library(lattice) library(latticeExtra) A - bwplot(y ~ g, data=tmp) B - bwplot(y ~ rep(Y,60), data=tmp, horizontal=FALSE) resizePanels(c(Individual=A, All Together=B, layout=c(2,1)), w=c(3,1)) ## for even more options, you can look at the examples in ## the HH package ## install.packages(HH) ## if necessary library(HH) demo(bwplot.examples, package=HH) example(panel.bwplot.superpose, package=HH) ?panel.bwplot.intermediate.hh ?panel.bwplot.superpose On Mon, May 19, 2014 at 10:08 AM, Shane Carey careys...@gmail.comjavascript:; wrote: Hi, I have boxplots by factors for a dataset and trying to include a boxplot to represent the entire dataset. Any idea how this would be done? Thanks -- Shane [[alternative HTML version deleted]] __ R-help@r-project.org javascript:; 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. -- Shane [[alternative HTML version deleted]] __ R-help@r-project.org 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] solve scalar linear equation
Hello, Try ?uniroot instead. Your equation is equivalent to 5x - 55 = 0, so the instruction would be uniroot(function(x) 5*x - 55, c(0, 20)) Hope this helps, Rui Barradas Em 19-05-2014 14:46, message escreveu: Readers, The function 'solve' states that it is applicable to a vector or matrix object. Please what is the syntax to solve a very simple equation like: 5x + 1 = 56 The books read so far give explanations for simultaneous linear equations or differential equations, but there have not been able to find a very basic description to solve simple equations (as an initial learning stage). Thanks. __ R-help@r-project.org 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. __ R-help@r-project.org 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.
[R] Subsets of a function
Hi all, this is a reoccurring theme in my programming and I need some help with it. When I use a built in function and need to use it on a subset of my data frame, I always end up using the subset function first, but this seems very clunky. For example, if I have years 2003:2013 with season a and b within each year, and I want to create a smooth.spline, I end up creating a subset for each year and season, and then have a smooth spline function for each year and season. Can I do this more efficiently? The subsets are below: size.2003-subset(size,Year==2003Season==a) size.2004-subset(size,Year==2004Season==a) size.2005-subset(size,Year==2005Season==a) size.2006-subset(size,Year==2006Season==a) size.2007-subset(size,Year==2007Season==a) size.2008-subset(size,Year==2008Season==a) size.2009-subset(size,Year==2009Season==a) size.2010-subset(size,Year==2010Season==a) size.2011-subset(size,Year==2011Season==a) size.2012-subset(size,Year==2012Season==a) size.2013-subset(size,Year==2013Season==a) size.2003b-subset(size,Year==2003Season==b) size.2004b-subset(size,Year==2004Season==b) size.2005b-subset(size,Year==2005Season==b) size.2006b-subset(size,Year==2006Season==b) size.2007b-subset(size,Year==2007Season==b) size.2008b-subset(size,Year==2008Season==b) size.2009b-subset(size,Year==2009Season==b) size.2010b-subset(size,Year==2010Season==b) size.2011b-subset(size,Year==2011Season==b) size.2012b-subset(size,Year==2012Season==b) size.2013b-subset(size,Year==2013Season==b) The smooth.spline is below 2003-with(size.2003,smooth.spline(Size,Prop,spar=0.25)) 2004-with(size.2004,smooth.spline(Size,Prop,spar=0.25)) 2005-with(size.2005,smooth.spline(Size,Prop,spar=0.25)) etc. etc. M. Keith Cox, Ph.D. Principal MKConsulting 17105 Glacier Hwy Juneau, AK 99801 U.S. 907.957.4606 [[alternative HTML version deleted]] __ R-help@r-project.org 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] Subsets of a function
Have you read An Introduction to R and sections on indexing (?[) where this is discussed. Have you read about apply type functions there like ?tapply. If not, don't you think you should. If so, read again. Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 Data is not information. Information is not knowledge. And knowledge is certainly not wisdom. H. Gilbert Welch On Mon, May 19, 2014 at 5:34 PM, Marlin Keith Cox marlink...@gmail.com wrote: Hi all, this is a reoccurring theme in my programming and I need some help with it. When I use a built in function and need to use it on a subset of my data frame, I always end up using the subset function first, but this seems very clunky. For example, if I have years 2003:2013 with season a and b within each year, and I want to create a smooth.spline, I end up creating a subset for each year and season, and then have a smooth spline function for each year and season. Can I do this more efficiently? The subsets are below: size.2003-subset(size,Year==2003Season==a) size.2004-subset(size,Year==2004Season==a) size.2005-subset(size,Year==2005Season==a) size.2006-subset(size,Year==2006Season==a) size.2007-subset(size,Year==2007Season==a) size.2008-subset(size,Year==2008Season==a) size.2009-subset(size,Year==2009Season==a) size.2010-subset(size,Year==2010Season==a) size.2011-subset(size,Year==2011Season==a) size.2012-subset(size,Year==2012Season==a) size.2013-subset(size,Year==2013Season==a) size.2003b-subset(size,Year==2003Season==b) size.2004b-subset(size,Year==2004Season==b) size.2005b-subset(size,Year==2005Season==b) size.2006b-subset(size,Year==2006Season==b) size.2007b-subset(size,Year==2007Season==b) size.2008b-subset(size,Year==2008Season==b) size.2009b-subset(size,Year==2009Season==b) size.2010b-subset(size,Year==2010Season==b) size.2011b-subset(size,Year==2011Season==b) size.2012b-subset(size,Year==2012Season==b) size.2013b-subset(size,Year==2013Season==b) The smooth.spline is below 2003-with(size.2003,smooth.spline(Size,Prop,spar=0.25)) 2004-with(size.2004,smooth.spline(Size,Prop,spar=0.25)) 2005-with(size.2005,smooth.spline(Size,Prop,spar=0.25)) etc. etc. M. Keith Cox, Ph.D. Principal MKConsulting 17105 Glacier Hwy Juneau, AK 99801 U.S. 907.957.4606 [[alternative HTML version deleted]] __ R-help@r-project.org 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. __ R-help@r-project.org 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] Subsets of a function
It would have been nice if you at least supplied a subset of the data, but here is a try at it: myList - split(size, list(size$Year, size$Season)) result - lapply(myList, function(.sub){ smooth.spline(.sub$Size, spar = 0.25) }) Jim Holtman Data Munger Guru What is the problem that you are trying to solve? Tell me what you want to do, not how you want to do it. On Mon, May 19, 2014 at 8:34 PM, Marlin Keith Cox marlink...@gmail.comwrote: Hi all, this is a reoccurring theme in my programming and I need some help with it. When I use a built in function and need to use it on a subset of my data frame, I always end up using the subset function first, but this seems very clunky. For example, if I have years 2003:2013 with season a and b within each year, and I want to create a smooth.spline, I end up creating a subset for each year and season, and then have a smooth spline function for each year and season. Can I do this more efficiently? The subsets are below: size.2003-subset(size,Year==2003Season==a) size.2004-subset(size,Year==2004Season==a) size.2005-subset(size,Year==2005Season==a) size.2006-subset(size,Year==2006Season==a) size.2007-subset(size,Year==2007Season==a) size.2008-subset(size,Year==2008Season==a) size.2009-subset(size,Year==2009Season==a) size.2010-subset(size,Year==2010Season==a) size.2011-subset(size,Year==2011Season==a) size.2012-subset(size,Year==2012Season==a) size.2013-subset(size,Year==2013Season==a) size.2003b-subset(size,Year==2003Season==b) size.2004b-subset(size,Year==2004Season==b) size.2005b-subset(size,Year==2005Season==b) size.2006b-subset(size,Year==2006Season==b) size.2007b-subset(size,Year==2007Season==b) size.2008b-subset(size,Year==2008Season==b) size.2009b-subset(size,Year==2009Season==b) size.2010b-subset(size,Year==2010Season==b) size.2011b-subset(size,Year==2011Season==b) size.2012b-subset(size,Year==2012Season==b) size.2013b-subset(size,Year==2013Season==b) The smooth.spline is below 2003-with(size.2003,smooth.spline(Size,Prop,spar=0.25)) 2004-with(size.2004,smooth.spline(Size,Prop,spar=0.25)) 2005-with(size.2005,smooth.spline(Size,Prop,spar=0.25)) etc. etc. M. Keith Cox, Ph.D. Principal MKConsulting 17105 Glacier Hwy Juneau, AK 99801 U.S. 907.957.4606 [[alternative HTML version deleted]] __ R-help@r-project.org 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. [[alternative HTML version deleted]] __ R-help@r-project.org 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] Boxplots
Another method uses the core boxplot() function but replaces the usual call to split() with a variant that puts all the data at the end of the list of splits: splitPlusAll - function(x, ...) c(split(x, ...), list(All=x)) boxplot(with(mtcars, splitPlusAll(wt, list(gear,am), drop=TRUE))) boxplot(with(mtcars, split(wt, list(gear,am), drop=TRUE))) (It helps if you show what you have done when your question arose, as there are several R functions for drawing boxplots.) Bill Dunlap TIBCO Software wdunlap tibco.com On Mon, May 19, 2014 at 2:41 PM, Shane Carey careys...@gmail.com wrote: Great, Thanks everyone :-) On Monday, May 19, 2014, Richard M. Heiberger r...@temple.edu wrote: tmp - data.frame(y=c(rnorm(20), rnorm(20), c=rnorm(20)), g=rep(letters[1:3], each=20)) library(lattice) library(latticeExtra) A - bwplot(y ~ g, data=tmp) B - bwplot(y ~ rep(Y,60), data=tmp, horizontal=FALSE) resizePanels(c(Individual=A, All Together=B, layout=c(2,1)), w=c(3,1)) ## for even more options, you can look at the examples in ## the HH package ## install.packages(HH) ## if necessary library(HH) demo(bwplot.examples, package=HH) example(panel.bwplot.superpose, package=HH) ?panel.bwplot.intermediate.hh ?panel.bwplot.superpose On Mon, May 19, 2014 at 10:08 AM, Shane Carey careys...@gmail.comjavascript:; wrote: Hi, I have boxplots by factors for a dataset and trying to include a boxplot to represent the entire dataset. Any idea how this would be done? Thanks -- Shane [[alternative HTML version deleted]] __ R-help@r-project.org javascript:; 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. -- Shane [[alternative HTML version deleted]] __ R-help@r-project.org 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. __ R-help@r-project.org 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.
[R] How could I graph a special coordinate
hi, I'v got some data attached as apx.csv. It shows the relationship about a kind of enzyme and the temperature. yhf and xbt are 2 kind of cowpea. apx is the kind of enzyme and low means the lowest temperature intraday. date means 1 to 121 days. What I want to show with it is how is apx changes with low on 2 kind of cowpeas. And date is better not missing in graph. I have made one by ggplot2 using apx2.csv (reshaped by melt). apx- read.csv(apx2.csv) p- ggplot(apx, aes(x= dat, y=apx, colour= factor(var))) p + geom_line()+facet_wrap(~var,ncol=1, scales= free_y) The graph is NOT good enough. It is not easy to find the relationship between apx and low. How could I do better? Is it possible to show low data as graph background color changing with date? Thank you. -- Stand Alone Complex __ R-help@r-project.org 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] R save with encoding...
Hi See ?plotmath. Something like this: plot(1, 1, main = expression(paste(INTERVALS , lambda))) Yours sincerely / Med venlig hilsen Frede Aakmann Tøgersen Specialist, M.Sc., Ph.D. Plant Performance Modeling Technology Service Solutions T +45 9730 5135 M +45 2547 6050 fr...@vestas.com http://www.vestas.com Company reg. name: Vestas Wind Systems A/S This e-mail is subject to our e-mail disclaimer statement. Please refer to www.vestas.com/legal/notice If you have received this e-mail in error please contact the sender. -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On Behalf Of Alexsandro Cândido de Oliveira Silva Sent: 19. maj 2014 19:41 To: r-help@r-project.org Subject: [R] R save with encoding... Hello everybody!! I'm trying to plot a graphic with the title: INTERVALS λ. But the special character λ can't be encoded using ISO8859-1. Which another encoding I need to choose? Att. Alexsandro Cândido de Oliveira Silva __ _ --- Este email está limpo de vírus e malwares porque a proteção do avast! Antivírus está ativa. http://www.avast.com [[alternative HTML version deleted]] __ R-help@r-project.org 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] How could I graph a special coordinate
Check out the R Graph Gallery for ideas. http://rgraphgallery.blogspot.com/ Cheers, Bert Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 Data is not information. Information is not knowledge. And knowledge is certainly not wisdom. H. Gilbert Welch On Mon, May 19, 2014 at 5:48 PM, Klot Lee fff200...@gmail.com wrote: hi, I'v got some data attached as apx.csv. It shows the relationship about a kind of enzyme and the temperature. yhf and xbt are 2 kind of cowpea. apx is the kind of enzyme and low means the lowest temperature intraday. date means 1 to 121 days. What I want to show with it is how is apx changes with low on 2 kind of cowpeas. And date is better not missing in graph. I have made one by ggplot2 using apx2.csv (reshaped by melt). apx- read.csv(apx2.csv) p- ggplot(apx, aes(x= dat, y=apx, colour= factor(var))) p + geom_line()+facet_wrap(~var,ncol=1, scales= free_y) The graph is NOT good enough. It is not easy to find the relationship between apx and low. How could I do better? Is it possible to show low data as graph background color changing with date? Thank you. -- Stand Alone Complex __ R-help@r-project.org 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. __ R-help@r-project.org 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-es] Utilizar scripts de PHP en R
Hola Álvaro: Hace años había más programas que relacionaban php y r (en uno u otro sentido), pero acabo de buscar en el CRAN Task View: Web Technologies and Services, y parece que no hay ninguno que haga referencia explícita a php allí: http://cran.r-project.org/web/views/WebTechnologies.html De todas formas, si lo que buscases pudiera ser también lo contrario, como usar un script de R desde PHP, puedes echar una ojeada a como está desarrollado el PluginR de Tiki (hay varios enlaces desde el CRAN Task View citado anteriormente; Tiki está hecho con PHP y JQuery como lenguages de programación, fundamentalmente). Saludos Xavier On 18/05/14 17:34, Alvaro Franquet wrote: Hola a todos, Estoy interesado en usar un Script de PHP desde R y me gustarÃa saber si eso es posible y como se hace. Muchas gracias de antemano por las respuestas. [[alternative HTML version deleted]] ___ R-help-es mailing list R-help-es@r-project.org https://stat.ethz.ch/mailman/listinfo/r-help-es [[alternative HTML version deleted]] ___ R-help-es mailing list R-help-es@r-project.org https://stat.ethz.ch/mailman/listinfo/r-help-es
Re: [R-es] Utilizar bs.data
Buen día a todos. Tengo un problema.Podría ayudarme diciendóme cómo se llama la paquetería para encontrar el comando bs.data, lo he estado buscando para ver como escribir el comando en R y no me aparece una paquetería para ver la descripción. Saludos. [[alternative HTML version deleted]] ___ R-help-es mailing list R-help-es@r-project.org https://stat.ethz.ch/mailman/listinfo/r-help-es
Re: [R-es] Utilizar bs.data
Hola, Prueba con esta búsqueda y sÃrvete tu mismo http://www.rseek.org/?cx=010923144343702598753%3Aboaz1reyxd4q=bs.datasa=Search+functions%2C+lists%2C+and+morecof=FORID%3A11siteurl=rseek.org%2Fref=ss=888j162752j7 Saludos, Carlos Ortega www.qualityexcellence.es El 19 de mayo de 2014, 12:57, Omar Salas Jácome omar_salas...@hotmail.comescribió: Buen dÃa a todos. Tengo un problema.PodrÃa ayudarme diciendóme cómo se llama la paqueterÃa para encontrar el comando bs.data, lo he estado buscando para ver como escribir el comando en R y no me aparece una paqueterÃa para ver la descripción. Saludos. [[alternative HTML version deleted]] ___ R-help-es mailing list R-help-es@r-project.org https://stat.ethz.ch/mailman/listinfo/r-help-es -- Saludos, Carlos Ortega www.qualityexcellence.es [[alternative HTML version deleted]] ___ R-help-es mailing list R-help-es@r-project.org https://stat.ethz.ch/mailman/listinfo/r-help-es