Message-ID: <1344440016268-4639621.post@n4.nabble.com>
Date: 2012-08-08T15:33:36Z
From: Berend Hasselman
Subject: help, please! matrix operations inside 3 nested loops
In-Reply-To: <1344434793385-4639592.post@n4.nabble.com>
Fridolin wrote
>
> hello, this is my script:
>
> #1) read in data:
> daten<-read.table('K:/Analysen/STRUCTURE/input_STRUCTURE_tab_excl_5_282_559.txt',
> header=TRUE, sep="\t")
> daten<-as.matrix(daten)
>
> #2) create empty matrix:
> indxind<-matrix(nrow=617, ncol=617)
> indxind[1:20,1:19]
>
You should at least initialize indxind to 0 with
indxind<-matrix(0,nrow=617, ncol=617)
because the default for matrix is to use NA for data.
Berend
--
View this message in context: http://r.789695.n4.nabble.com/help-please-matrix-operations-inside-3-nested-loops-tp4639592p4639621.html
Sent from the R help mailing list archive at Nabble.com.