Search
 
SCRIPT & CODE EXAMPLE
 

R

convert s4 to s3 in r

setGeneric("as.myS3class", function(object) {
    standardGeneric("as.myS3class")
  })

setMethod("as.myS3class", signature(object = "myS4class"), function(object)
  {
    structure(list(a = object@a, b = object@b), class = "myS3class")
  }
)
Comment

PREVIOUS NEXT
Code Example
R :: How to use group_by inside a function? 
R :: exp() function R 
R :: interquartile in r 
R :: L in r 
R :: calculating every column means by dplyr 
R :: arrange rows according to a vector in r 
R :: why is only mean and max infinity in r 
R :: sumif in r 
R :: same plots for every variable together 
R :: print in r 
R :: r rename column 
Rust :: exit program rust 
Rust :: bevy assets image as sprite 
Rust :: assert rust 
Rust :: hello world latex 
Rust :: rust repeat character x times 
Rust :: optional arguments rust 
Rust :: pause rust 
Rust :: rust modulus 
Rust :: rust•armanriazi•borrowchecker•borrow 
Rust :: armanriazi•rust•error•[E0369]: binary operation `=` cannot be applied to type `T` 
Rust :: rust•armanriazi•static•str 
Rust :: rust currying, preset some arguments 
Rust :: armanriazi•rust•function•vs•closure 
Lua :: luau rainbow part 
Lua :: lua pcall 
Lua :: Connect Text Label to Leaderstats 
Lua :: how do you close the lua program 
Lua :: roblox number between 1 and 10 
Lua :: countif excel 
ADD CONTENT
Topic
Content
Source link
Name
3+3 =