Re: [R] How to stop as.integer removing dimenions

2017-02-23 Thread MacQueen, Don
> net1 <- array(0L, dim=c(5,5)) > str(net1) int [1:5, 1:5] 0 0 0 0 0 0 0 0 0 0 ... -- Don MacQueen Lawrence Livermore National Laboratory 7000 East Ave., L-627 Livermore, CA 94550 925-423-1062 On 2/23/17, 3:49 AM, "R-help on behalf of Thomas Chesney" wrote: I have: net1 <- a

Re: [R] How to stop as.integer removing dimenions

2017-02-23 Thread Gerrit Eichner
... or: net1 <- array(0L, dim=c(5,5)) Note the difference between 0 and 0L. Gerrit - Dr. Gerrit Eichner Mathematical Institute, Room 212 gerrit.eich...@math.uni-giessen.de Justus-Liebig-University Giessen

Re: [R] How to stop as.integer removing dimenions

2017-02-23 Thread Gerrit Eichner
Hi, Thomas, maybe mode(net1) <- "integer" does what you want? Hth -- Gerrit - Dr. Gerrit Eichner Mathematical Institute, Room 212 gerrit.eich...@math.uni-giessen.de Justus-Liebig-University Giessen Tel:

[R] How to stop as.integer removing dimenions

2017-02-23 Thread Thomas Chesney
I have: net1 <- array(0, dim=c(5,5)) str(net1) num [1:5, 1:5] 0 0 0 0 0 0 0 0 0 0 ... and what I want is: str(net1) int [1:5, 1:5] 0 0 0 0 0 0 0 0 0 0 ... Neither of the following work: net1 <- as.integer(net1, drop=FALSE) net1 <- as.integer(net1, dim=c(5,5)) Can someone please help? Tha