Re: [R] Best settings for RStudio video recording?

2020-08-17 Thread Ivan Calandra
Thank you again Duncan for the details. Best, Ivan -- Dr. Ivan Calandra TraCEr, laboratory for Traceology and Controlled Experiments MONREPOS Archaeological Research Centre and Museum for Human Behavioural Evolution Schloss Monrepos 56567 Neuwied, Germany +49 (0) 2631 9772-243 https://www.researc

[R] "patternbar_s" : show legend and other issues

2020-08-17 Thread John
Hi Thanks for help from people on this forum. My graph (made with patternbar_s) is attached. (1) How should I place my legend under the graph? I have " ,legend.position="bottom"" in my theme, but it does not seem to work. (2) How may I rotate the y label ("%")? * Code: * x<- factor(df

Re: [R] Error message from "patternbar_s"

2020-08-17 Thread John
Thanks!! PIKAL Petr 於 2020年8月17日 週一 下午8:17寫道: > Hi > > You probably do not have date in your data. Or date in R sense. What > str(df_c_m) tells you about your date. I believe date is factor or > character > variable, which need to be converted do Date variable by appropriate way - > e.g. strptim

Re: [R] install.packages() R vs RStudio

2020-08-17 Thread Abby Spurdle
Duncan Murdoch wrote: > R is designed to be flexible, and to let people change its behaviour. > Using that flexibility is what all users should do. Improving the user > experience is what front-end writers should do. I don't find it > inadvisable at all. Well, that's a big whopping U-turn. Abb

Re: [R] Plot math symbol with string and number

2020-08-17 Thread Paul Murrell
I think that comment is fair *on graphics devices that can handle unicode*. So that is true for Cairo-based graphics devices, but not for the pdf() or postscript() devices, for example. Paul On 18/08/20 9:54 am, Bert Gunter wrote: "Plotmath seems to be the right way to do it." Not sure I

Re: [R] Plot math symbol with string and number

2020-08-17 Thread Bert Gunter
"Plotmath seems to be the right way to do it. " Not sure I agree with that. Paul Murrell put together plotmath around 2000 prior to the widescale development and adoption of the unicode standard (corrections/modifications welcome!). So at the time, there really was no other way to handle this for

Re: [R] Plot math symbol with string and number

2020-08-17 Thread Rasmus Liland
On 2020-08-17 22:14 +0100, cpolw...@chemo.org.uk wrote: | On 2020-08-17 03:13, Rasmus Liland wrote: | | On Sun, Aug 16, 2020 at 3:18 PM Bert wrote: | | | | | | ?plotmath | | | | Dear John, read ?plotmath, it is | | good, I was not aware of its | | existence; then backquote s like | | so: | | P

Re: [R] Plot math symbol with string and number

2020-08-17 Thread cpolwart
On 2020-08-17 03:13, Rasmus Liland wrote: On Sun, Aug 16, 2020 at 3:18 PM Bert wrote: | On Sun, Aug 16, 2020, 14:53 John wrote: | | | | I would like to make plots with | | titles for different data sets and | | different parameters. The first | | title doesn't show sigma as a math | | symbol, whi

Re: [R] [EXT] Re: Plot math symbol with string and number

2020-08-17 Thread John Smith
Thanks David for a quite interesting suggestion: Indeed I didn't know paste0! Best! On Mon, Aug 17, 2020 at 12:26 PM David K Stevens wrote: > John - one more approach > > plot(y,main=parse(text=paste0('data ~~ sigma == ',s))) > > Good luck > > David Stevens > > On 8/17/2020 8:23 AM, John Smith w

Re: [R] install.packages() R vs RStudio

2020-08-17 Thread John Fox
Hi Duncan, What you say is entirely sensible. Yes, it's primarily the silent part that seems problematic to me. Messages about masking are uninteresting until one encounters a problem, and then they may provide an important clue to the source of the problem. As to this specific case: It's no

Re: [R] Reorganize the data (dplyr or other packages?)

2020-08-17 Thread Hadley Wickham
> | but they won't receive any new > | features, and we believe that there > | are now better approaches to solving > | the same problem. > > Is tidyr::pivot_longer this better > solution? It is an easier to understand > version of the now retired and confusing > (for me) tidyr::gather which at le

Re: [R] install.packages() R vs RStudio

2020-08-17 Thread Duncan Murdoch
Hi John. I suspect most good front ends do similar things. For example, on MacOS, R.app messes up "history()". I've never used ESS, but I imagine one could find examples where it acts differently than base R: isn't that the point? One hopes all differences are improvements, but sometimes

Re: [R] Reorganize the data (dplyr or other packages?)

2020-08-17 Thread Rasmus Liland
On 2020-08-17 10:09 -0700, Bert Gunter wrote: | On Mon, Aug 17, 2020 at 9:53 AM Rasmus Liland wrote: | | | | Also, stack is also possible to use: | | | | tab <- structure(list( | | date = c("2019M08", "2019M09", "2019M10"), | | down = c(0.01709827, 0.02094724, 0.01750911), | | uc =

Re: [R] Best settings for RStudio video recording?

2020-08-17 Thread Duncan Murdoch
On 17/08/2020 9:20 a.m., Ivan Calandra wrote: I don't want to relight the fire, but I was wondering about that statement from John C Frain: "If you use RStudio and do not install any of the RStudio packages". I guess you mean that some packages are bundled with RStudio. I had never noticed any o

Re: [R] confidence intervals for the difference between group means

2020-08-17 Thread varin sacha via R-help
Dear Matthias, Many thanks for your response. Best, SV Le mardi 4 août 2020 à 16:22:41 UTC+2, Prof. Dr. Matthias Kohl a écrit : you could try: library(MKinfer) meanDiffCI(a, b, boot = TRUE) Best Matthias Am 04.08.20 um 16:08 schrieb varin sacha via R-help: > Dear R-experts, > > Usin

Re: [R] [EXT] Re: Plot math symbol with string and number

2020-08-17 Thread David K Stevens
John - one more approach plot(y,main=parse(text=paste0('data ~~ sigma == ',s))) Good luck David Stevens On 8/17/2020 8:23 AM, John Smith wrote: Thanks to Dunkan, Rasmus and Bert. Will keep the very useful tips. Best! On Sun, Aug 16, 2020 at 9:13 PM Rasmus Liland wrote: On Sun, Aug 16, 202

Re: [R] Reorganize the data (dplyr or other packages?)

2020-08-17 Thread Bert Gunter
Well, not that there is anything "wrong" with previous suggestions, but it is pretty straightforward just with base R functionality: > nm <- names(tab)[2:4] > with(tab, data.frame(date = rep(date, length(nm)), + direction = rep(nm, e = 3), + percentage = do.

Re: [R] Reorganize the data (dplyr or other packages?)

2020-08-17 Thread Rasmus Liland
Dear John, Op ma 17 aug. 2020 om 09:52 schreef Eric Berger: | On Mon, Aug 17, 2020 at 10:49 AM Thierry Onkelinx wrote: | | | | You are looking for tidyr::pivot_longer() | | Alternatively, melt() from the reshape2 package. | | library(reshape2) | melt(x,id.vars="date",measure.vars=c("down","uc","up

Re: [R] Data With Ordinal Responses: Calculate ICC & Assessing Model Fit

2020-08-17 Thread Bert Gunter
I believe you should post on r-sig-mixed-models, not here. You are more likely to find the interest and expertise you seek there. Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" c

Re: [R] Plot math symbol with string and number

2020-08-17 Thread John Smith
Thanks to Dunkan, Rasmus and Bert. Will keep the very useful tips. Best! On Sun, Aug 16, 2020 at 9:13 PM Rasmus Liland wrote: > On Sun, Aug 16, 2020 at 3:18 PM Bert wrote: > | On Sun, Aug 16, 2020, 14:53 John wrote: > | | > | | I would like to make plots with > | | titles for different data sets

Re: [R] install.packages() R vs RStudio

2020-08-17 Thread John Fox
Dear Duncan, On 2020-08-17 9:03 a.m., Duncan Murdoch wrote: On 17/08/2020 7:54 a.m., Ivan Calandra wrote: Dear useRs, Following the recent activity on the list, I have been made aware of this discussion: https://stat.ethz.ch/pipermail/r-help/2020-May/466788.html I used to install all packages

Re: [R] Best settings for RStudio video recording?

2020-08-17 Thread Ivan Calandra
I don't want to relight the fire, but I was wondering about that statement from John C Frain: "If you use RStudio and do not install any of the RStudio packages". I guess you mean that some packages are bundled with RStudio. I had never noticed any optional packages during the installation of RStu

Re: [R] install.packages() R vs RStudio

2020-08-17 Thread Ivan Calandra
Thank you Duncan for the very detailed and clear answer! Best, Ivan -- Dr. Ivan Calandra TraCEr, laboratory for Traceology and Controlled Experiments MONREPOS Archaeological Research Centre and Museum for Human Behavioural Evolution Schloss Monrepos 56567 Neuwied, Germany +49 (0) 2631 9772-243 ht

Re: [R] install.packages() R vs RStudio

2020-08-17 Thread Duncan Murdoch
On 17/08/2020 7:54 a.m., Ivan Calandra wrote: Dear useRs, Following the recent activity on the list, I have been made aware of this discussion: https://stat.ethz.ch/pipermail/r-help/2020-May/466788.html I used to install all packages in R, but for simplicity (I use RStudio for all purposes), I

Re: [R] Reorganize the data (dplyr or other packages?)

2020-08-17 Thread Hadley Wickham
We previously used the term retired to suggest that the package is taking it easy and relaxing, but isn't dead. This causes a lot of confusion so we now call this state "superseded" — we'll continue to keep reshape2 (and reshape!) on CRAN, but they won't receive any new features, and we believe tha

[R] install.packages() R vs RStudio

2020-08-17 Thread Ivan Calandra
Dear useRs, Following the recent activity on the list, I have been made aware of this discussion: https://stat.ethz.ch/pipermail/r-help/2020-May/466788.html I used to install all packages in R, but for simplicity (I use RStudio for all purposes), I now do it in RStudio. Now I am left wondering wh

Re: [R] Ggplot2 Line Problem

2020-08-17 Thread Stephen P. Molnar
Many thanks. That solved the problem. On 08/17/2020 01:49 AM, Rui Barradas wrote: Hello, This type of problem is almost always a data reshaping problem. ggplot graphics work better if the data is in the long format and you have 3 columns for counts, one column for each category. If you reform

[R] Data With Ordinal Responses: Calculate ICC & Assessing Model Fit

2020-08-17 Thread Sidoti, Salvatore A.
To begin with, I'm not a fan of cross-posting. However, I posted my question on Stack Exchange more than two weeks ago, but I have yet to receive a sufficient answer: https://stats.stackexchange.com/questions/479600/data-with-ordinal-responses-calculate-icc-assessing-model-fit Here's what I've

Re: [R] Reorganize the data (dplyr or other packages?)

2020-08-17 Thread Eric Berger
Thanks for this information Thierry. I was not aware. The author of the packages is Hadley Wickham. He writes on Github that he does plan to make changes necessary to keep the package available on CRAN. On Mon, Aug 17, 2020 at 11:23 AM Thierry Onkelinx wrote: > Yes. However reshape2 is a retir

Re: [R] Reorganize the data (dplyr or other packages?)

2020-08-17 Thread John
Thanks! Thierry Onkelinx 於 2020年8月17日 週一 下午4:23寫道: > Yes. However reshape2 is a retired package. The author recommends to use > his new package tidyr. > > ir. Thierry Onkelinx > Statisticus / Statistician > > Vlaamse Overheid / Government of Flanders > INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RE

Re: [R] Reorganize the data (dplyr or other packages?)

2020-08-17 Thread Thierry Onkelinx via R-help
Yes. However reshape2 is a retired package. The author recommends to use his new package tidyr. ir. Thierry Onkelinx Statisticus / Statistician Vlaamse Overheid / Government of Flanders INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND FOREST Team Biometrie & Kwaliteitszo

Re: [R] Reorganize the data (dplyr or other packages?)

2020-08-17 Thread Eric Berger
Alternatively, melt() from the reshape2 package. library(reshape2) melt(x,id.vars="date",measure.vars=c("down","uc","up"),variable.name ="direction",value.name="percentage") HTH, Eric On Mon, Aug 17, 2020 at 10:49 AM Thierry Onkelinx via R-help < r-help@r-project.org> wrote: > You are looking

Re: [R] Reorganize the data (dplyr or other packages?)

2020-08-17 Thread Thierry Onkelinx via R-help
You are looking for tidyr::pivot_longer() Best regards, ir. Thierry Onkelinx Statisticus / Statistician Vlaamse Overheid / Government of Flanders INSTITUUT VOOR NATUUR- EN BOSONDERZOEK / RESEARCH INSTITUTE FOR NATURE AND FOREST Team Biometrie & Kwaliteitszorg / Team Biometrics & Quality Assuranc

[R] Reorganize the data (dplyr or other packages?)

2020-08-17 Thread John
Is there any quick way (dplyr?) to arrange the data date down uc up 2019M08 0.01709827 0.2653882 0.7175136 2019M09 0.02094724 0.2265797 0.7524731 2019M10 0.01750911 0.2450030 0.7374879 to date direction percentage 2019M08 down 0.01709827 2019M09 down 0.02