[R] Calculate area under a curve
Hi, I want to know the area under a curve, which is not given as a function, but as values in a time series. It is not a smooth curve, but switches often between positive values and zero (the values describe the moisture in the soil over a year, one entry is one day). I already tried area.between.curves, but got only 0 as result. I guess, it doesn't work because of these multiple changes between 0 and positive values (most of the time, the values are 0 and in the certain case I tested, the positive values were only on single days; but for other values positive values last longer) I hope, someone can help me! THank you! -- View this message in context: http://r.789695.n4.nabble.com/Calculate-area-under-a-curve-tp2275283p2275283.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] Calculate area under a curve
Thank you, seems to be the right thing for me. But what is this "n" for? The number of iteration steps as mentioned on other pages for the simpson rule? "number of divisions" as said on the help page I don't understand. ("a" and "b" can be ignored, if I got it right?!). Thanks again! stephen sefick wrote: > > simp() in the StreamMetabolism package may do the trick. I have used > this on time series of chemical constituent masses. > hth, > > Stephen Sefick > -- View this message in context: http://r.789695.n4.nabble.com/Calculate-area-under-a-curve-tp2275283p2275512.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] Tutorial Tinn-R
Hi, does anyone know a tutorial for Tinn-R? During all my search I only found R-Tutorials... The problem now is: I would like to make Tinn-R an autosave. But since I had several questions before concerning Tinn-R (for example, how to have Tinn-R and R in one window or how do the new versions work), I think it is easier to have a tutorial instead of asking here everything. Thank you! -- View this message in context: http://r.789695.n4.nabble.com/Tutorial-Tinn-R-tp2300451p2300451.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] Fill pattern for Boxplots?
Is it possible to fill the boxes of a boxplot with filling patterns/texture instead of colours? Or both mixed? (for example white, grey, left diagonal striped, right diagonal striped) How can I do that? I searched here, but didn't find an answer. Thank you! -- View this message in context: http://r.789695.n4.nabble.com/Fill-pattern-for-Boxplots-tp4639698.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] subscript with comma
Hi, I want to write a word with subscript in a graph. Unfortunately, the subscript contains a comma, so all my trials didn't work and I didn't find how to do it. I want to write "sm" as normal text and "w,grass" in the subscript. Can anybody help me? And a more general question: I read the help to "plotmath", but I still didn't understand, how it works. Is there a good documentation, book,... which explains all this stuff? Thanks in advance! -- View this message in context: http://r.789695.n4.nabble.com/subscript-with-comma-tp4261579p4261579.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] subscript with comma
Thank you! It works now. But I still don't understand, how all these expressions, "", paste, group, eval... have to be used together. (For example, I first tried expression(sm[w,grass]) but it didn't work, and I couldn't find, why (and when) commas are interpreted here differently). So: Is there somewhere an introduction (rather than examples) to this? Books, documents etc. -- View this message in context: http://r.789695.n4.nabble.com/subscript-with-comma-tp4261579p4261931.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] subscript with comma
David Winsemius wrote > > The insight that > allowed me to get a significantly higher frequency of success was > realizing that the correct separators between separate expressions > were "*" and "~" rather than or . Inside an expression > a comma will signal a new expression element. A space without a > plotmath operator intervening just throws an error > Thanks, this helps. I guess my problem was that I thought that the problem with the comma occurred because of the [] around. I didn't think that comma itself was the problem. -- View this message in context: http://r.789695.n4.nabble.com/subscript-with-comma-tp4261579p4265308.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.