Can someone please help me understanding this code.
Why is there a comma before the c and what does the number 5 do? I assume 23:28 takes the number from 23 to 28?
Sorry I'm new at this so I'm kinda lost
Can someone please help me understanding this code.
Why is there a comma before the c and what does the number 5 do? I assume 23:28 takes the number from 23 to 28?
Sorry I'm new at this so I'm kinda lost
Hello and welcome in the forum,
the code you provided selects specific columns, but let's break the code down:
table[...,...]
indicates, that you want to subset the table (here Mouse
) by first rows and second columnsc(5,23:28)
creates a vector: (5,23,24,25,26,27,28)
combining everything yields to a subset of your Mouse
table, with all rows and the columns of the specified vector, namely 5 and the columns 23 to 28.
Hope this helps you to understand some of the basics in R
Kind regards
Thanks!!!
If you have time I have another issue due to Fat_protein colonne isn't nummeric.
I have tried to fix it by using as.factor but it doesn't work....
Code:
Since this is a (completely) different question, you should open up a new request in the forum and provide at least the following:
dput(mydata)
and pasted into the forum)This way you help the forum members to understand your request and find suitable solutions. Try to avoid screenshots, since it's considered bad practice.
Kind regards
This topic was automatically closed 42 days after the last reply. New replies are no longer allowed.
If you have a query related to it or one of the replies, start a new topic and refer back with a link.