Re: [R] Printing vector

2019-07-22 Thread Rui Barradas
Hello, How could I forgot na.print? Thanks, Bill. This version c no longer has an argument fill and it's the one that behaves more like the OP asks for so far. print0c <- function(x, len = 10, digits = 2){ n <- length(x) x <- round(x, digits = digits) fill <- NA m <- n %/% len remai

Re: [R] Regarding R licensing usage guidance

2019-07-22 Thread Jeff Newmiller
Your internet skills are pathetic. Search Google for "proprietary use gpl" and the first hit is https://opensource.stackexchange.com/questions/7078/is-it-legal-to-use-gpl-code-in-a-proprietary-closed-source-program-by-putting-i Note that there are (at least) three obvious alternatives if there i

Re: [R] Printing vector

2019-07-22 Thread William Dunlap via R-help
By the way, the default print method has the argument 'na.print' that can speciify how to print an NA value. E.g., > print(c(1234/, NA, 1), na.print="n/a") [1] 0.1234123 n/a 1.000 > print(c(1234/, NA, 1), na.print="") [1] 0.1234123 1.000 > print(c(1234/, NA, 1)

Re: [R] Regarding R licensing usage guidance

2019-07-22 Thread Marc Schwartz via R-help
Hi, In addition to Patrick's comments, which are spot on, other versions of the GPL (e.g. 3.0) and other GPL compatible licenses that are or may be relevant to the list of packages that are listed below need to be assessed as well. There are differences, some more nuanced than others, between G

Re: [R] Regarding R licensing usage guidance

2019-07-22 Thread Patrick (Malone Quantitative)
You're in the wrong place. This is for help with R programming. But you shouldn't be asking us either way, as we (at least most of us) aren't lawyers. Get your attorney to study the GNU-GPL-2.0 and tell you what you need to and can do for your purposes. Pat On Mon, Jul 22, 2019 at 1:23 PM ANAMIK

[R] Regarding R licensing usage guidance

2019-07-22 Thread ANAMIKA KUMARI
Hello Team, This mail is in reference to understanding R license and also usage of R language to develop commercialised product. I am working on one product of mine that uses R and python language.I am trying to understand the licensing issue if any related to R, if I am going to commercialise

Re: [R] Printing vector

2019-07-22 Thread William Dunlap via R-help
The following mimics Fortran printing with format F.. print1 <- function (x, perLine = 10, fWidth = 8, fPrecision = 2, fortranStars = TRUE) { format <- paste0("%", fWidth, ".", fPrecision, "f") oldWidth <- getOption("width") on.exit(options(width = oldWidth)) options(width = perLin

Re: [R] Printing vector

2019-07-22 Thread Rui Barradas
Simpler, no loops: print0b <- function(x, len = 10, digits = 2, fill = ""){ n <- length(x) x <- round(x, digits = digits) m <- n %/% len remainder <- n %% len A <- matrix(x[seq_len(len*m)], ncol = len) if(remainder > 0){ A <- rbind(A, c(x[(len*m + 1):n], rep(fill, len*(m + 1) - n