WGCA tutorial related question
1
0
Entering edit mode
wes • 0
@wes-24179
Last seen 4 days ago
Malaysia

By referring to the link of the WGCNA tutorial link given, can anyone tell me what is the function of the following two R code? What is the function of -1 and 1 in the square bracket?Tutorial for the WGCNA package for R

datTraits = allTraits[traitRows, -1];

rownames(datTraits) = allTraits[traitRows, 1];

WGCNA • 126 views
0
Entering edit mode
ATpoint ▴ 860
@atpoint-13662
Last seen 23 hours ago
Germany

-1 removes the first column from that data.frame and 1 selects only that column alone.

0
Entering edit mode

Thanks for the explanation