Entering edit mode
11.1 years ago
robjohn7000
▴
110
I'm sorry to have to ask for help to solve this very basic R problem.
I have a table from which I want to find the maximum values across the first 3 columns:
Col1 Col2 Col3 Col4
2 4 5 3
17 2 30 21
5 4 2 7
8 19 1 0
The max values are outputted in Col1 and bound to Col4 values in a new table thus:
Col1 Col4
5 3
30 21
5 7
19 0
I have tried:
Col1 <- apply(Table1, 1, 'max')
Which did not work exactly as required. Help will be appreciated.
This is a basic R programming question. Please explain its relevance to a bioinformatics research problem.