Message-ID: <20200410161432.GF187643@jrl.uk.to>
Date: 2020-04-10T16:14:32Z
From: Rasmus Liland
Subject: create a r list from dataframe using the first column as list names
In-Reply-To: <268200624.3334981.1586455221416@mail.yahoo.com>
On 2020-04-09 18:00 +0000, aiguo li wrote:
| That is awesome! Thanks.
Dear AiGuo,
I thought: why make this overly
complicated, when this is also
possible:
a <- matrix(LETTERS[1:16], nrow=4)
X <- split(x=a[,-1], f=a[,1])
lapply(X=X, FUN=as.factor)
Best,
Rasmus