Hello! I'm a newbie and I'm trying to write a function which can read how much replicated conditions there are in an experimental design in a given case. For example, if I have a design (for example an input like a data.frame) like the following:
sample condition
1 C1.sam A
2 C2.sam A
3 C2.sam A
4 Infect1.sam B
5 Infect2.sam B
6 Infect3.sam B
How can I access the number of replicates? (perhaps some function similar to apply?) Cause obviously there are three replicates called "A" and three replicates called "B", but I don´t know how to store this in a variable, so I can work with that information later on the script.
Thanks and sorry for my beginner's English
sample condition
1 C1.sam A
2 C2.sam A
3 C2.sam A
4 Infect1.sam B
5 Infect2.sam B
6 Infect3.sam B
How can I access the number of replicates? (perhaps some function similar to apply?) Cause obviously there are three replicates called "A" and three replicates called "B", but I don´t know how to store this in a variable, so I can work with that information later on the script.
Thanks and sorry for my beginner's English
Comment