[R] Plotting extrapolation with R like AUTOBOX does

2024-01-14 Thread varin sacha via R-help
Dear R-experts, I write to you to know if somebody is aware of a R package (or function) able to plot graphs for extrapolation. I need to be clear on what extrapolation really is to me. It is when we use the model for X variables outside the range of X variables that were used to construct

Re: [R] Plotting Fitted vs Observed Values in Logistic Regression Model

2023-08-02 Thread Rui Barradas
Às 14:57 de 01/08/2023, Paul Bernal escreveu: Dear friends, I hope this email finds you all well. This is the dataset I am working with: dput(random_mod12_data2) structure(list(Index = c(1L, 5L, 11L, 3L, 2L, 8L, 9L, 4L), x = c(5, 13, 25, 9, 7, 19, 21, 11), n = c(500, 500, 500, 500, 500, 500,

Re: [R] Plotting Fitted vs Observed Values in Logistic Regression Model

2023-08-01 Thread Ben Bolker
logistic_regmod2 <- glm(formula = ratio~x, family = binomial(logit), data = random_mod12_data2, weights =n) plot(ratio ~ x, data = random_mod12_data2) pframe <- data.frame(x = sort(random_mod12_data2$x)) pframe$ratio <- predict(logistic_regmod2, newdata = pframe, type = "response")

[R] Plotting Fitted vs Observed Values in Logistic Regression Model

2023-08-01 Thread Paul Bernal
Dear friends, I hope this email finds you all well. This is the dataset I am working with: dput(random_mod12_data2) structure(list(Index = c(1L, 5L, 11L, 3L, 2L, 8L, 9L, 4L), x = c(5, 13, 25, 9, 7, 19, 21, 11), n = c(500, 500, 500, 500, 500, 500, 500, 500), r = c(100, 211, 391, 147, 122, 310,

Re: [R] Plotting factors in graph panel

2023-07-11 Thread Anupam Tyagi
a.cz/en/personal-data-protection-principles/ >> > <https://www.precheza.cz/en/personal-data-protection-principles/>* >> > >> > *Důvěrnost: *Tento e-mail a jakékoliv k němu připojené dokumenty jsou >> > důvěrné a podléhají tomuto právně závaznému prohlášení

Re: [R] Plotting factors in graph panel

2023-07-11 Thread Deepayan Sarkar
jakékoliv k němu připojené dokumenty jsou > > důvěrné a podléhají tomuto právně závaznému prohlášení o vyloučení > > odpovědnosti: *https://www.precheza.cz/01-dovetek/ > > <https://www.precheza.cz/01-dovetek/>* | This email and any documents > > attached to it may b

Re: [R] Plotting factors in graph panel

2023-07-11 Thread Anupam Tyagi
hed to it may be confidential and are subject to the legally binding > disclaimer: *https://www.precheza.cz/en/01-disclaimer/ > <https://www.precheza.cz/en/01-disclaimer/>* > > > > *From:* Anupam Tyagi > *Sent:* Friday, July 7, 2023 12:48 PM > *To:* PIKAL Petr > *Cc:*

Re: [R] Plotting factors in graph panel

2023-07-07 Thread PIKAL Petr
M To: PIKAL Petr Cc: r-help@r-project.org Subject: Re: [R] Plotting factors in graph panel Thanks! You are correct, the graphs look very similar, except ggplot is scaling the text font to make it more readable. Is there a way to scale down the x-axis labels, so they are readable?

Re: [R] Plotting factors in graph panel

2023-07-07 Thread Anupam Tyagi
; From: R-help On Behalf Of Deepayan Sarkar > > Sent: Thursday, July 6, 2023 3:06 PM > > To: Anupam Tyagi > > Cc: r-help@r-project.org > > Subject: Re: [R] Plotting factors in graph panel > > > > On Thu, 6 Jul 2023 at 15:21, Anupam Tyagi wrote: > > > &

Re: [R] Plotting factors in graph panel

2023-07-07 Thread Anupam Tyagi
Current 2", "Bank Current 2", > > > "Bank Current 2", "Bank Current 2", "Bank Savings 2", "Bank Savings 2", > > > "Bank Savings 2", "Bank Savings 2", "Bank Savings 2", "MF None 3", > &g

Re: [R] Plotting factors in graph panel

2023-07-07 Thread PIKAL Petr
ent: Thursday, July 6, 2023 3:06 PM > To: Anupam Tyagi > Cc: r-help@r-project.org > Subject: Re: [R] Plotting factors in graph panel > > On Thu, 6 Jul 2023 at 15:21, Anupam Tyagi wrote: > > > > Btw, I think "lattice" graphics will provide a better solution than

Re: [R] Plotting factors in graph panel

2023-07-06 Thread Deepayan Sarkar
;, "Bank Current 2", "Bank Current 2", "Bank Current 2", > > "Bank Current 2", "Bank Current 2", "Bank Savings 2", "Bank Savings 2", > > "Bank Savings 2", "Bank Savings 2", "Bank Savings 2

Re: [R] Plotting factors in graph panel

2023-07-06 Thread Anupam Tyagi
ot;Bank Savings 2", "Bank Savings 2", "MF None 3", > "MF None 3", "MF None 3", "MF None 3", "MF None 3", "MF Equity 3", > "MF Equity 3", "MF Equity 3", "MF Equity 3", "MF Equity 3", "MF

Re: [R] Plotting factors in graph panel

2023-07-06 Thread Anupam Tyagi
None 3", "MF None 3", "MF None 3", "MF None 3", "MF None 3", "MF Equity 3", "MF Equity 3", "MF Equity 3", "MF Equity 3", "MF Equity 3", "MF Debt 3", "MF Debt 3", "MF Debt 3&q

Re: [R] Plotting factors in graph panel

2023-07-05 Thread Anupam Tyagi
I am working with Jim's solution, but I am getting some errors. I organized the data in Excel and read into R using the Import option in the menu of R-Studio. For some reason it is telling me my data is a Tibble and not a dataframe. Am I using Tidyverse unknowingly? I thought I was working in

Re: [R] Plotting factors in graph panel

2023-07-03 Thread PIKAL Petr
On Behalf Of Anupam Tyagi > Sent: Monday, July 3, 2023 11:54 AM > To: Jim Lemon > Cc: r-help mailing list > Subject: Re: [R] Plotting factors in graph panel > > Attached is another example plot, that is better than the earlier one. > > On Mon, 3 Jul 2023 at 15:21, Anupam Tya

Re: [R] Plotting factors in graph panel

2023-07-03 Thread Anupam Tyagi
Attached is another example plot, that is better than the earlier one. On Mon, 3 Jul 2023 at 15:21, Anupam Tyagi wrote: > I thought maybe I can share with you how the data looks in Excel, and an > example plot I found on the web that looks similar to what I want to plot. > These are attached to

Re: [R] Plotting factors in graph panel

2023-07-03 Thread Anupam Tyagi
Thanks Jim, thanks everyone. I was caught up with work and moving home, so a delay in response. I tried running the code you provided and it is not running well in my R-Studio setup. It is giving errors and not producing plots. I don't yet understand all the code well yet, so I need to work on it

Re: [R] Plotting factors in graph panel

2023-06-29 Thread Jim Lemon
Okay. Here is a modification that does four single line plots. at_df<-read.table(text= "Income MF MF_None MF_Equity MF_Debt MF_Hybrid Bank_None Bank_Current Bank_Savings Bank_NA $10 1 3.05 29.76 31.18 36.0 46.54 24.75 25.4 3.307 $25 2 2.29 28.79 32.64 36.27 54.01 24.4 18.7 2.891 $40 3 2.24

Re: [R] Plotting factors in graph panel

2023-06-29 Thread John Kane
w > $10 do not make much sense compared to other values. > > I am tired of guessing. > > Tim > > -Original Message- > From: R-help On Behalf Of Anupam Tyagi > Sent: Wednesday, June 28, 2023 11:49 PM > To: r-help@r-project.org > Subject: Re: [R] Plotting f

Re: [R] Plotting factors in graph panel

2023-06-29 Thread Ebert,Timothy Aaron
. The values below $10 do not make much sense compared to other values. I am tired of guessing. Tim -Original Message- From: R-help On Behalf Of Anupam Tyagi Sent: Wednesday, June 28, 2023 11:49 PM To: r-help@r-project.org Subject: Re: [R] Plotting factors in graph panel [External Email

Re: [R] Plotting factors in graph panel

2023-06-29 Thread PIKAL Petr
riable names to fit your needs. Cheers Petr > -Original Message- > From: R-help On Behalf Of Anupam Tyagi > Sent: Thursday, June 29, 2023 5:49 AM > To: r-help@r-project.org > Subject: Re: [R] Plotting factors in graph panel > > Thanks, Pikal and Jim. Yes, it has been

Re: [R] Plotting factors in graph panel

2023-06-28 Thread Anupam Tyagi
Thanks, Pikal and Jim. Yes, it has been a long time Jim. I hope you have been well. Pikal, thanks. Your solution may be close to what I want. I did not know that I was posting in HTML. I just copied the data from Excel and posted in the email in Gmail. The data is still in Excel, because I have

Re: [R] Plotting factors in graph panel

2023-06-28 Thread Jim Lemon
Hi Anupam, Haven't heard from you in a long time. Perhaps you want something like this: at_df<-read.table(text= "Income MF MF_None MF_Equity MF_Debt MF_Hybrid Bank_None Bank_Current Bank_Savings Bank_NA $10 1 3.05 29.76 31.18 36.0 46.54 24.75 25.4 3.307 $25 2 2.29 28.79 32.64 36.27 54.01 24.4

Re: [R] Plotting factors in graph panel

2023-06-28 Thread PIKAL Petr
> -Original Message- > From: R-help On Behalf Of Anupam Tyagi > Sent: Wednesday, June 28, 2023 10:34 AM > To: R-help@r-project.org > Subject: [R] Plotting factors in graph panel > > Hello, > > I want to plot the following kind of data (percentage of respondents f

[R] Plotting factors in graph panel

2023-06-28 Thread Anupam Tyagi
Hello, I want to plot the following kind of data (percentage of respondents from a survey) that varies by Income into many small *line* graphs in a panel of graphs. I want to omit "No Answer" categories. I want to see how each one of the categories (percentages), "None", " Equity", etc. varies by

Re: [R] Plotting directly to memory?

2023-05-28 Thread Jan van der Laan
Perhaps the ragg package? That has an `agg_capture` device "that lets you access the device buffer directly from your R session." https://github.com/r-lib/ragg HTH, Jan On 28-05-2023 13:46, Duncan Murdoch wrote: Is there a way to open a graphics device that plots entirely to an array

Re: [R] Plotting directly to memory?

2023-05-28 Thread Jeroen Ooms
On Sun, May 28, 2023 at 1:46 PM Duncan Murdoch wrote: > > Is there a way to open a graphics device that plots entirely to an array > or raster in memory? I'd prefer it to use base graphics, but grid would > be fine if it makes a difference. > > For an explicit example, I'd like to do the

[R] Plotting directly to memory?

2023-05-28 Thread Duncan Murdoch
Is there a way to open a graphics device that plots entirely to an array or raster in memory? I'd prefer it to use base graphics, but grid would be fine if it makes a difference. For an explicit example, I'd like to do the equivalent of this: filename <- tempfile(fileext = ".png")

[R] Plotting prediction curves and CIs from GAM models

2023-02-14 Thread Adriaan de Jong
Dear List member, My data are from 30 years of opportunistic counting of migratory Eurasian Curlew (Numenius arquata) during the core breeding season when the local population is supposed to be stable. My main objective is the trend in numbers over the years, but information about sighting

Re: [R] Plotting a triangular prism

2022-11-11 Thread Ebert,Timothy Aaron
om: R-help On Behalf Of Erin Hodgess Sent: Thursday, November 10, 2022 8:46 PM To: r-help@r-project.org Subject: [R] Plotting a triangular prism [External Email] Hello! I'm trying to draw a triangular prism. I have used rgl, plot3d, and it's still not working as I would like. Has anyone done th

Re: [R] Plotting a triangular prism

2022-11-11 Thread Erin Hodgess
Great, thank you! Sincerely, Erin On Thu, Nov 10, 2022 at 11:56 PM Jim Lemon wrote: > Hi Erin, > If you want a realistic 3D prism, I would use something like POVRay or > other rendering software. You have to know your geometry, but you can > get a very realistic image. I suspect that you want

Re: [R] Plotting a triangular prism

2022-11-10 Thread Jim Lemon
Hi Erin, If you want a realistic 3D prism, I would use something like POVRay or other rendering software. You have to know your geometry, but you can get a very realistic image. I suspect that you want more than just a picture of a prism, so you can then generate a PNG image and use it as a layer

Re: [R] Plotting a triangular prism

2022-11-10 Thread David Winsemius
One might think that after all these years you would have understood that “it’s not working” is an excessively imprecise description of, well, anything. Also html is deprecated severely on Rhelp. — David. Sent from my iPhone > On Nov 10, 2022, at 5:46 PM, Erin Hodgess wrote: > > Hello!

[R] Plotting a triangular prism

2022-11-10 Thread Erin Hodgess
Hello! I’m trying to draw a triangular prism. I have used rgl, plot3d, and it’s still not working as I would like. Has anyone done this, please? Thanks for any help. Sincerely, Erin -- Erin Hodgess, PhD mailto: erinm.hodg...@gmail.com [[alternative HTML version deleted]]

Re: [R] Plotting proportions

2022-04-03 Thread Jim Lemon
Hi Nick, If you can bear using R base graphics, the plotrix package has a function named "getYmult" that allows you to adjust for the aspect ratio of any plot area. Jim On Sun, Apr 3, 2022 at 11:14 PM Nick Wray wrote: > > Hello If you plot a square in the default R studio window you see a >

Re: [R] Plotting proportions

2022-04-03 Thread Bert Gunter
... and following up on Rui's reply, assuming that the default (in R, not RStudio) "m" is being used, I would assume that the aspect ratio in the RStudio device depends on the layout of your windows. Also, you might do better asking here, https://community.rstudio.com/ , than on this list. Bert

Re: [R] Plotting proportions

2022-04-03 Thread Rui Barradas
Hello, There's a graphics parameter for aspect ratio that you can set asp=1 on a plot by plot basis. But you also need to change pty. From ?par: pty A character specifying the type of plot region to be used; "s" generates a square plotting region and "m" generates the maximal plotting

Re: [R] plotting some rows in different color

2021-09-02 Thread Jim Lemon
Hi Eliza This seems to work: plot(BFA3[,1],BFA3[,4], pch=16, xlab = "", ylab = "",col=(BFA3[,2]==BFA3[,3])+2,axes=FALSE) but I have no idea what you are trying to do with the as.numeric(as.Date(...)) business. Jim On Fri, Sep 3, 2021 at 8:44 AM Eliza Botto wrote: > > Dear useRs, > > For

[R] plotting some rows in different color

2021-09-02 Thread Eliza Botto
Dear useRs, For the following dataset, dput(BFA3) structure(c(17532, 17533, 17534, 17535, 17536, 17537, 17538, 17539, 17540, 17541, 17542, 17543, 17544, 17545, 17546, 17547, 17548, 17549, 17550, 17551, 17552, 17553, 17554, 17555, 17556, 17557, 17558, 17559, 17560, 17561, 17562, 17563, 17564,

Re: [R] Plotting confidence intervals with ggplot, in multiple facets.

2021-08-02 Thread Rolf Turner
On Mon, 2 Aug 2021 17:53:34 +0100 Rui Barradas wrote: > Hello, > > I'm glad it helped. > Here are a couple of ideas for theme. Thanks Rui. The scope of your knowledge and understanding is simply amazing! cheers, Rolf -- Honorary Research Fellow Department of Statistics University of

Re: [R] Plotting confidence intervals with ggplot, in multiple facets.

2021-08-02 Thread Rui Barradas
Hello, I'm glad it helped. Here are a couple of ideas for theme. 1) From ?theme: Theme inheritance Theme elements inherit properties from other theme elements hierarchically. For example, axis.title.x.bottom inherits from axis.title.x which inherits from axis.title, which in turn inherits

Re: [R] Plotting confidence intervals with ggplot, in multiple facets.

2021-08-02 Thread Rolf Turner
I would like to tie off this thread (?!?!) by thanking Jeff Newmiller, Rui Barradas, Avi Gross and Bill Dunlap for their advice and insight. I have attached the code that I finally put together, on the basis of the aforementioned advice, in the file ciPlot.txt. I have also attached the

Re: [R] Plotting confidence intervals with ggplot, in multiple facets.

2021-07-20 Thread Rolf Turner
Thanks to Bill Dunlap and Avi Gross for their clear and helpful answers to my questions. cheers, Rolf Turner -- Honorary Research Fellow Department of Statistics University of Auckland Phone: +64-9-373-7599 ext. 88276 __ R-help@r-project.org

Re: [R] Plotting confidence intervals with ggplot, in multiple facets.

2021-07-19 Thread Avi Gross via R-help
Of Rolf Turner Sent: Monday, July 19, 2021 7:24 PM To: r-help@r-project.org Subject: Re: [R] Plotting confidence intervals with ggplot, in multiple facets. Thanks to Jeff Newmiller, Rui Barradas and Avi Gross for their extremely helpful replies. I have got both Jeff's and Rui's code

Re: [R] Plotting confidence intervals with ggplot, in multiple facets.

2021-07-19 Thread Bill Dunlap
ggplot2::labs() interprets expressions as plotmath. E.g., data.frame(X=1:10,Y=(1:10)^2) %>% ggplot(aes(X,Y)) + geom_point() + labs(x = expression(beta), y = expression(beta^2)) -Bill On Mon, Jul 19, 2021 at 4:24 PM Rolf Turner wrote: > > > Thanks to Jeff Newmiller, Rui Barradas

Re: [R] Plotting confidence intervals with ggplot, in multiple facets.

2021-07-19 Thread Rolf Turner
Thanks to Jeff Newmiller, Rui Barradas and Avi Gross for their extremely helpful replies. I have got both Jeff's and Rui's code to run. I am currently experimenting with Avi's suggestion of producing multiple plots and then putting them together using plotgrid() or grid.arrange(). This idea

Re: [R] Plotting confidence intervals with ggplot, in multiple facets.

2021-07-18 Thread Avi Gross via R-help
error bars being displayed with parts below zero so showing where zero is graphically can be useful. -Original Message- From: R-help On Behalf Of Rolf Turner Sent: Sunday, July 18, 2021 2:17 AM To: r-help@r-project.org Subject: [R] Plotting confidence intervals with ggplot, in multiple f

Re: [R] Plotting confidence intervals with ggplot, in multiple facets.

2021-07-18 Thread Rui Barradas
Hello, Something like this? library(ggplot2) eg <- dget("data/egData.txt") ggplot(eg, aes(Ndat, estimate)) + � geom_errorbar(aes(ymin = lower, ymax = upper), width = 20) + � geom_point(colour = "slateblue", size = 1) + � geom_hline(yintercept = 0, colour = "red") + � facet_grid(param ~ .)

Re: [R] Plotting confidence intervals with ggplot, in multiple facets.

2021-07-18 Thread Jeff Newmiller
ggplot(dta,aes(x=Ndat,y=estimate, ymin=lower,ymax=upper))+ geom_point() + geom_errorbar(width=30) + facet_grid(param~1) + theme_minimal() Width parameter seems odd... play with it I suppose. For facets, you can also use facet_wrap(~param, ncol=1). ggplot is very much about the data and

[R] Plotting confidence intervals with ggplot, in multiple facets.

2021-07-18 Thread Rolf Turner
I have need of creating a plot displaying confidence intervals (for the mean bias in parameter estimates) with one panel or facet for each of the two parameters in question. I can do this in base R graphics, but the result is not as aesthetically pleasing as I would like. I have attached an

Re: [R] Plotting the ASCII character set.

2021-07-07 Thread Rolf Turner
Thanks to Ivan Krylov, David Winsemius and Duncan Murdoch for their informative replies to my cri de coeur. The most complete answer was however provided off-list by Andrew Simmons who wrote a new and carefully structured function plotASCII() to replace my old no-longer functioning plot_ascii()

Re: [R] Plotting the ASCII character set.

2021-07-04 Thread Duncan Murdoch
On 03/07/2021 9:59 p.m., Rolf Turner wrote: ... deletia ... Also note that there is a bit of difference between the results of using Encoding() and the results of using iconv(). E.g. if I do a <- "\x80" b <- iconv(a,"latin1","UTF-8") Encoding(a) <- "latin1" then when I type "a" I get the

Re: [R] Plotting the ASCII character set.

2021-07-04 Thread Ivan Krylov
On Sun, 4 Jul 2021 13:59:49 +1200 Rolf Turner wrote: > a substantial number of the characters are displayed as a wee > rectangle containing a 2 x 2 array of digits such as > > > 0 0 > > 8 0 Interesting. I didn't pay attention to it at first, but now I see that a range of code points,

Re: [R] Plotting the ASCII character set.

2021-07-03 Thread David Winsemius
Sent from my iPhone > On Jul 3, 2021, at 7:00 PM, Rolf Turner wrote: > >  >> On Sat, 3 Jul 2021 09:40:28 +0200 >> Ivan Krylov wrote: >> >> Hello Rolf Turner, >> >> On Sat, 3 Jul 2021 14:02:59 +1200 >> Rolf Turner wrote: >> >>> Can anyone suggest how I might get my plot_ascii() function

Re: [R] Plotting the ASCII character set.

2021-07-03 Thread Rolf Turner
On Sat, 3 Jul 2021 09:40:28 +0200 Ivan Krylov wrote: > Hello Rolf Turner, > > On Sat, 3 Jul 2021 14:02:59 +1200 > Rolf Turner wrote: > > > Can anyone suggest how I might get my plot_ascii() function working > > again? Basically, it seems to me, the question is: how do I > > persuade R to

Re: [R] Plotting the ASCII character set.

2021-07-03 Thread Ivan Krylov
Hello Rolf Turner, On Sat, 3 Jul 2021 14:02:59 +1200 Rolf Turner wrote: > Can anyone suggest how I might get my plot_ascii() function working > again? Basically, it seems to me, the question is: how do I persuade > R to read in "\260" as "\ub0" rather than "\xb0"? Part of the problem is that

[R] Plotting the ASCII character set.

2021-07-02 Thread Rolf Turner
I have (used to have?) a function plot_ascii() which would display the ascii character set in a graphical display. It simply used text() to place the symbols on a 16 x 16 grid. The labels used by text() were taken from a character vector that I called "all.ascii". According to my notes, the

Re: [R] Plotting Coxph model with an interaction.

2021-05-20 Thread Gerrit Eichner
Hi, John, it should work the same way as without interaction (but make sure to use the fitted object "coxfit", not just "fit" in our call of survfit, and note that age*rx already expands to age + rx + age:rx so that age + rx is redundant in your formula): coxfit <- coxph(Surv(futime, fustat) ~

Re: [R] Plotting Coxph model with an interaction.

2021-05-20 Thread Bert Gunter
Perhaps this might be useful: https://rpubs.com/tf_peterson/interactionplotDemo 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" comic strip ) On Thu, May 20, 2021 at 10:29 AM

[R] Plotting Coxph model with an interaction.

2021-05-20 Thread Sorkin, John
Colleagues, I hope someone can tell me how to plot a cox model that contains an interaction term. I know that plot(survfit(. . . . )) can be used to plot a Cox model, i.e.. coxfit <- coxph(Surv(futime, fustat) ~ age+rx, data = ovarian) plot(survfit(fit, newdata=data.frame(age=60,rx=2))) but

Re: [R] Plotting two time series in one graph

2021-05-02 Thread Rui Barradas
Hello, Can you post sample data? For instance, the output of dput(head(dovrez, 20)) dput(head(rqa_df_USD, 20)) Or maybe you could rbind the data.frames with one column telling which of Res or LAM the values come from. Hope this helps, Rui Barradas Às 19:38 de 02/05/21, Baki UNAL via

[R] Plotting two time series in one graph

2021-05-02 Thread Baki UNAL via R-help
Hi I'm trying to plot two time series in one graph. I tried the following code: p = ggplot() +    geom_line(data = dovrez, aes(x = Date, y = Res), color = "blue") +   geom_line(data = rqa_df_USD, aes(x = DATE, y = LAM), color = "red") +   xlab('Dates') +   ylab('Values') print(p) But I got the

Re: [R] Plotting adjusted KM curve

2021-04-09 Thread Göran Broström
On 2021-04-05 03:34, Sorkin, John wrote: Colleagues, I am using the coxph to model survival time. How do I plot an adjusted Kaplan Meir plot resulting from coxph? The code I would like to run would start with: # run cox model fit1Cox <- coxph(surv_object ~age+sex,data=mydata) I have no

Re: [R] Plotting adjusted KM curve

2021-04-09 Thread PIKAL Petr
Hi Google answered https://rdrr.io/bioc/survcomp/man/km.coxph.plot.html Is it what do you want? Cheers Petr > -Original Message- > From: R-help On Behalf Of Sorkin, John > Sent: Monday, April 5, 2021 3:35 AM > To: r-help@r-project.org (r-help@r-project.org) > Subjec

Re: [R] Plotting adjusted KM curve

2021-04-04 Thread John Fox
On 2021-04-04 10:45 p.m., John Fox wrote: Dear John, I think that what you're looking for is plot(survfit(fit1Cox, newdata=data.frame(age=rep(65, 2), sex=factor("female", "male" Whoops, that should be plot(survfit(fit1Cox, newdata=data.frame(age=rep(65, 2), sex=factor(c("female",

Re: [R] Plotting adjusted KM curve

2021-04-04 Thread John Fox
Dear John, I think that what you're looking for is plot(survfit(fit1Cox, newdata=data.frame(age=rep(65, 2), sex=factor("female", "male" assuming, of course, that sex is a factor with levels "female" and "male". I hope this helps, John John Fox, Professor Emeritus McMaster University

[R] Plotting adjusted KM curve

2021-04-04 Thread Sorkin, John
Colleagues, I am using the coxph to model survival time. How do I plot an adjusted Kaplan Meir plot resulting from coxph? The code I would like to run would start with: # run cox model fit1Cox <- coxph(surv_object ~age+sex,data=mydata) I have no idea what would follow. I would like to plot

Re: [R] Plotting world maps with locations.

2021-02-13 Thread Romanus Ejike
Awesome, thanks! I will make corrections and see if it will work. On Sat, Feb 13, 2021 at 6:04 AM David Winsemius wrote: > > > Sent from my iPhone > > > On Feb 12, 2021, at 9:01 PM, David Winsemius > wrote: > > > >  > > > > Sent from my iPhone > > > >> On Feb 12, 2021, at 1:35 PM, Jibrin

Re: [R] Plotting world maps with locations.

2021-02-12 Thread David Winsemius
Sent from my iPhone > On Feb 12, 2021, at 9:01 PM, David Winsemius wrote: > >  > > Sent from my iPhone > >> On Feb 12, 2021, at 1:35 PM, Jibrin Alhassan >> wrote: >> >> Hello Romanus, >> You are to post only the code and the error messages and not all the >> information from your

Re: [R] Plotting world maps with locations.

2021-02-12 Thread David Winsemius
Sent from my iPhone > On Feb 12, 2021, at 1:35 PM, Jibrin Alhassan > wrote: > > Hello Romanus, > You are to post only the code and the error messages and not all the > information from your terminal in R session. That’s not actually the best practice for rhelp questions. More info is

Re: [R] Plotting world maps with locations.

2021-02-12 Thread Jibrin Alhassan
Hello Romanus, You are to post only the code and the error messages and not all the information from your terminal in R session. On Fri, Feb 12, 2021, 4:35 PM Romanus Ejike wrote: > Please, I need help from anyone that can solve this problem. > I wanted to plot a world map with locations and

[R] Plotting world maps with locations.

2021-02-12 Thread Romanus Ejike
Please, I need help from anyone that can solve this problem. I wanted to plot a world map with locations and names of the locations but could not. The codes I have tried are as shown below. ugwoke@ugwoke-HP-ENVY-Laptop-13-aq0xxx:~/Desktop$ R R version 4.0.3 (2020-10-10) -- "Bunny-Wunnies Freak

[R] Plotting shipment routs on a world map

2020-05-27 Thread Bernard McGarvey
I have used the ggplot2 package to create a world map, the png file of the output is attached. The code I use is below: library(ggplot2) library(mapproj) long_Min <- -180.0 long_Max <- 180.0 lat_Min <- -50.0 lat_Max <- 80.0 Width <- 12.0 Height <- 2.0*Width*(lat_Max-lat_Min)/(long_Max-long_Min)

Re: [R] Plotting DMRs (Differentially Methylated Regions) using Gviz package in R

2020-02-07 Thread pooja sinha
Thanks, I'll check it out. On Fri, Feb 7, 2020 at 1:08 PM Martin Morgan wrote: > Probably have more success asking on https://support.bioconductor.org. > > Martin Morgan > > On 2/7/20, 12:57 PM, "R-help on behalf of pooja sinha" < > r-help-boun...@r-project.org on behalf of

Re: [R] Plotting DMRs (Differentially Methylated Regions) using Gviz package in R

2020-02-07 Thread Martin Morgan
Probably have more success asking on https://support.bioconductor.org. Martin Morgan On 2/7/20, 12:57 PM, "R-help on behalf of pooja sinha" wrote: Hi All, I have a file list consisting of Chromosome, Start , End & Methylation Difference in the following format in excel:

[R] Plotting DMRs (Differentially Methylated Regions) using Gviz package in R

2020-02-07 Thread pooja sinha
Hi All, I have a file list consisting of Chromosome, Start , End & Methylation Difference in the following format in excel: Chrom Start End Meth. Diff chr1 38565900 38566000 -0.20276818 chr1 38870400 38870500 -0.342342342 chr1 39469400 39469500 -0.250260552

Re: [R] Plotting confidence intervals

2019-12-08 Thread phil
Thanks so much Jim. Yes, this is giving me what I want. Philip On 2019-12-08 05:00, Jim Lemon wrote: Hi Philip, This may be a starter: attach(airquality) heights <- tapply(Temp,Month,mean) temp_sd<-tapply(Temp,Month,sd) lower <- tapply(Temp,Month,function(v) t.test(v)$conf.int[1]) upper <-

Re: [R] Plotting confidence intervals

2019-12-08 Thread Jim Lemon
Hi Philip, This may be a starter: attach(airquality) heights <- tapply(Temp,Month,mean) temp_sd<-tapply(Temp,Month,sd) lower <- tapply(Temp,Month,function(v) t.test(v)$conf.int[1]) upper <- tapply(Temp,Month,function(v) t.test(v)$conf.int[2]) library(plotrix)

Re: [R] Plotting confidence intervals

2019-12-08 Thread phil
Thanks for these helpful suggestions. These options don't work in my case because I don't know the individual observations (the dots). A statistical agency collects the observations and keeps them confidential. It provides the mean value and the standard deviation, plus the fact that the

Re: [R] Plotting confidence intervals

2019-12-07 Thread Ben Tupper
Hi, Would something like yarrr do the trick? https://ndphillips.github.io/yarrr.html Or gghalves? https://github.com/erocoar/gghalves Cheers, Ben On Sat, Dec 7, 2019 at 9:32 PM wrote: > I want to show little bell curves on my bar chart to illustrate the > confidence ranges. The following

[R] Plotting confidence intervals

2019-12-07 Thread phil
I want to show little bell curves on my bar chart to illustrate the confidence ranges. The following example from Paul Teetor's "R Cookbook" does what I want, but shows I-beams instead of bell curves. The I-beams suggest uniform, rather than normal distributions. So I am looking for a way to

Re: [R] Plotting hclust() results

2019-08-06 Thread Rui Barradas
Hello, I don't know if you want something like this: hc_long <- reshape::melt(hc, id.vars = "Cluster") # convert to long format library(ggplot2) ggplot(hc_long, aes(x = Cluster, y = value, colour = variable)) + geom_point() + geom_line() + coord_flip() + facet_wrap(~ variable) #Data

[R] Plotting hclust() results

2019-08-05 Thread reichmanj
R Help Forum I have output from hierarchal clustering and want to plot the results using the ggplot2 function. Where I have a scatter plot with 5 lines representing the 5 clusters. I assuming I need to transform the data into three columns (like) cluster, variable, and value. Not an issue but was

Re: [R] Plotting in R

2019-07-18 Thread nstefi
ssage- From: Jim Lemon Sent: Thursday, July 18, 2019 5:25 AM To: nst...@gmail.com Cc: r-help mailing list Subject: Re: [R] Plotting in R Hi Steven, I caved in and installed plotly. Not an easy task. When I tried your example, I got a blank HTML page displayed. I then created a plot with

Re: [R] Plotting in R

2019-07-18 Thread Jim Lemon
t;array", > tickangle = 270 > )) > > Any ideas? > > Thanks, > Steven > > -Original Message- > From: nst...@gmail.com > Sent: Tuesday, July 16, 2019 9:55 AM > To: 'Jim Lemon' > Cc: 'r-help mailing list' > Subject: RE: [R] Plottin

Re: [R] Plotting in R

2019-07-16 Thread nstefi
, 2019 9:55 AM To: 'Jim Lemon' Cc: 'r-help mailing list' Subject: RE: [R] Plotting in R OK, I think I got this: For example every 3rd element would be: sydf$monthday[seq(1, length(sydf$monthday), 3)] Thanks, Steven -Original Message- From: nst...@gmail.com Sent: Tuesday, July 16, 2019 9:3

Re: [R] Plotting in R

2019-07-16 Thread nstefi
OK, I think I got this: For example every 3rd element would be: sydf$monthday[seq(1, length(sydf$monthday), 3)] Thanks, Steven -Original Message- From: nst...@gmail.com Sent: Tuesday, July 16, 2019 9:39 AM To: 'Jim Lemon' Cc: 'r-help mailing list' Subject: RE: [R] Plotting in R

Re: [R] Plotting in R

2019-07-16 Thread nstefi
day, July 12, 2019 6:41 PM To: nst...@gmail.com Cc: r-help mailing list Subject: Re: [R] Plotting in R Oh, sorry, I think I see what you have tried to do. You want yearly ticks but month-day labels. These won't mean much unless you also have the year. If you ask for a date with just the year

Re: [R] Plotting in R

2019-07-12 Thread Jim Lemon
= 270 > > )) > > > > But the chart didn't show any tick labels. > > I guess I need to sample sydf$monthday, right? Because that's what I want > > to show as tick labels. But the problem is that monthday is string, and > > can't use a value for "by=",

Re: [R] Plotting in R

2019-07-12 Thread Jim Lemon
em is that monthday is string, and can't > use a value for "by=", maybe I need to sample somehow by the index position. > > Thanks, > Steven > > -Original Message- > From: Jim Lemon > Sent: Thursday, July 11, 2019 10:41 PM > To: nst...@gmail.com >

Re: [R] Plotting in R

2019-07-12 Thread nstefi
somehow by the index position. Thanks, Steven -Original Message- From: Jim Lemon Sent: Thursday, July 11, 2019 10:41 PM To: nst...@gmail.com Cc: r-help mailing list Subject: Re: [R] Plotting in R Hi Steven, Neat solution. With a lot more values on the time axis, you will be better of

Re: [R] Plotting in R

2019-07-11 Thread Jim Lemon
axis lables, and > use that for the "ticktext" parameter. > I thought it must be some variation of the seq(from, to, by= ). Can I use > that with a list of strings? > > Thanks, > Steven > > -Original Message- > From: Jim Lemon > Sent: Thursday,

Re: [R] Plotting in R

2019-07-11 Thread nstefi
e list of x axis lables, and use that for the "ticktext" parameter. I thought it must be some variation of the seq(from, to, by= ). Can I use that with a list of strings? Thanks, Steven -Original Message- From: Jim Lemon Sent: Thursday, July 11, 2019 7:46 PM To: nst...@gmail.com; r-he

Re: [R] Plotting in R

2019-07-11 Thread Jim Lemon
the > values on the x axis to show 05-01 06-01, etc. > Is that possible? > > Thanks, > Steven > > -Original Message- > From: R-help On Behalf Of Jim Lemon > Sent: Sunday, July 7, 2019 2:59 AM > To: Steven Yen ; r-help mailing list > > Subject: Re: [R] Plotting i

Re: [R] Plotting in R

2019-07-11 Thread Bert Gunter
t; but this only changes the title of the x axis to "month-day". I want the > values on the x axis to show 05-01 06-01, etc. > Is that possible? > > Thanks, > Steven > > -Original Message- > From: R-help On Behalf Of Jim Lemon > Sent: Sunday, July 7, 2019 2:59 AM &g

Re: [R] Plotting in R

2019-07-11 Thread David Carlson
,sydf$rate,type="b", > xlab="month-day",ylab="Rate") > > but this only changes the title of the x axis to "month-day". I want the > values on the x axis to show 05-01 06-01, etc. > Is that possible? > > Thanks, > Steven > &g

Re: [R] Plotting in R

2019-07-11 Thread nstefi
ot_ly?" -Original Message- From: nst...@gmail.com Sent: Thursday, July 11, 2019 11:59 AM To: 'Jim Lemon' ; 'Steven Yen' ; 'r-help mailing list' Subject: RE: [R] Plotting in R Hi Jim, Thanks for your email. My question was: how to change the x axis labels without changing the chart. Or is that no

Re: [R] Plotting in R

2019-07-11 Thread nstefi
, etc. Is that possible? Thanks, Steven -Original Message- From: R-help On Behalf Of Jim Lemon Sent: Sunday, July 7, 2019 2:59 AM To: Steven Yen ; r-help mailing list Subject: Re: [R] Plotting in R Hi Steven, A basic plot can be displayed like this: sydf<-read.table(text="year

Re: [R] Plotting in R

2019-07-07 Thread Jim Lemon
Hi Steven, A basic plot can be displayed like this: sydf<-read.table(text="year rate 1993 0.608 1994 0.622 1996 0.623 1998 0.647 2000 0.646 2002 0.625 2004 0.628 2006 0.685 2008 0.679 2010 0.595 2012 0.567 2014 0.599 2016 0.642 2018 0.685", header=TRUE)

  1   2   3   4   5   6   7   8   9   10   >