Am 30.01.2015 um 12:51 schrieb Duncan Murdoch:

You are mixing up formatting with storage.  Floating point numbers will
be displayed without decimals if they are close enough to whole numbers.

Duncan Murdoch


Ok, I am talking from display

data = matrix(c(1:16),nrow=4,ncol=4) #create matrix
data[4,] = data[4,]/3
data[,4] = data[,4]/3
#why is it displayed without decimals here:
data[1:3,1:3]
#and why is data[1:3,1:3] diplayed with 2 decimals here
data

and what could be the solution to display data[1:3,1:3] part when data is used without decimals, if there are no

Kind regards Knut

______________________________________________
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to