Hi,

Is there a Julia equivalent of the R function "new"? The documentation of 
the function is 
here: http://stat.ethz.ch/R-manual/R-devel/library/methods/html/new.html

(I'm somewhat new to programming so bear with me). I'm guessing this 
function is similar to the reserved keyword in Java known as "new", which 
creates a new instance of a class or array. Say, for example, I want to 
create a new graph from Graphs.jl. How would I proceed? For a more concrete 
example, I'm trying to translate the R code below: 

nnms <- as.character(seq_p)
  Gobject <-
    if (sum(G) == 0) {
      new("graphNEL", nodes = nnms)
    } else {
      colnames(G) <- rownames(G) <- nnms
      as(G,"graphNEL")
    }

Reply via email to