Re: [R] How to access source code

2022-12-08 Thread Martin Morgan
showMethods(LGD, includeDef = TRUE) shows the implementation of all methods on the LGD generic, and can be a useful fast track to getting an overview of what is going on. Martin Morgan From: R-help on behalf of Ivan Krylov Date: Thursday, December 8, 2022 at 11:23 AM To: Christofer Bogaso

[R] How to access source code

2022-12-08 Thread Christofer Bogaso
Hi, I am trying to access the source code from package GCPM, where I am interested to look into the source code of one function called LGD. So I did below > LGD standardGeneric for "LGD" defined from package "GCPM" function (this) standardGeneric("LGD") Methods may be defined for

Re: [R] How to access source code

2022-12-08 Thread Ivan Krylov
В Thu, 8 Dec 2022 20:56:12 +0530 Christofer Bogaso пишет: > > showMethods(LGD) > > Function: LGD (package GCPM) > > this="GCPM" Almost there! Try getMethod(LGD, signature = 'GCPM'). Not sure if this is going to work as written, but if you need to see an S4 method definition, getMethod is

Re: [R] Plot a line using ggplot2

2022-12-08 Thread Ebert,Timothy Aaron
A number of problems. The variable names are not helpful. PointEstx is not a point it is a value. I need an x and a y coordinate for a point. row1 is not defined While there is a function data.frame(), there is no data_frame(). Making this change gives an error that row1 is not defined. I solved

[R] Plot a line using ggplot2

2022-12-08 Thread Sorkin, John
Colleagues, I am trying to plot a simple line using ggplot2. I get the axes, but I don't get the line. Please let me know what my error I am making. Thank you, John # Define x and y values PointEstx <- Estx+1.96*SE PointEsty <- 1 row2 <- cbind(PointEstx,PointEsty) linedata<-

Re: [R] How to access source code

2022-12-08 Thread Uwe Ligges
Or simply get and unpack the package sources. Here you will also find the comments that are typically stripped out otherwise. Best, Uwe Ligges On 08.12.2022 17:26, Martin Morgan wrote: showMethods(LGD, includeDef = TRUE) shows the implementation of all methods on the LGD generic, and can be

Re: [R] Plot a line using ggplot2

2022-12-08 Thread Jeff Newmiller
Please run your code before you send it. Your example is not reproducible. library(ggplot2) linedata<- data.frame( PointEstx = c( 1, 2 ) , PointEsty = c( 1, 1.5 ) ) # make sure we have a data frame str(linedata) #plot the data ggplot( linedata , aes( x = PointEstx , y = PointEsty