If I have 5 different drugs and to see its effect on the paw volume of rats in 5 different days, each group has 6 animals .how to make a data set for R. 5 treatment groups with 6 animals in each and observation taken 5 times .eg. Drug A,B,C,D,E each having 6 members to receive the drug, reading of paw vol taken on day 0,4 8 14 and 21 days and mean of diff group is compared to see which drug works better than the other. How to prepare excel sheet and how to give command in R for my prepared data to see in box plot.
Welcome @Rajlaxmi in this group.
I would not make it more complicated than it is.
Below you see a simple setup for your problem (as I understand it).
Use the functions write.csv
and read.csv
to move the data to and from a csv file (and from there into Excel).
If all your data is available you can use the boxplot
function in R.
Use the help info if need more help with a function: just type ?functionname
.
Enjoy and good luck.
df1= data.frame(
Animal = 1:30,
Drug= rep(c('A','B','C','D','E'),6),
Day0=rep(NA,30),
Day4=rep(NA,30),
Day8=rep(NA,30),
Day14=rep(NA,30),
Day21=rep(NA,30)
)
print(df1)
#> Animal Drug Day0 Day4 Day8 Day14 Day21
#> 1 1 A NA NA NA NA NA
#> 2 2 B NA NA NA NA NA
#> 3 3 C NA NA NA NA NA
#> 4 4 D NA NA NA NA NA
#> 5 5 E NA NA NA NA NA
#> 6 6 A NA NA NA NA NA
#> 7 7 B NA NA NA NA NA
#> 8 8 C NA NA NA NA NA
#> 9 9 D NA NA NA NA NA
#> 10 10 E NA NA NA NA NA
#> 11 11 A NA NA NA NA NA
#> 12 12 B NA NA NA NA NA
#> 13 13 C NA NA NA NA NA
#> 14 14 D NA NA NA NA NA
#> 15 15 E NA NA NA NA NA
#> 16 16 A NA NA NA NA NA
#> 17 17 B NA NA NA NA NA
#> 18 18 C NA NA NA NA NA
#> 19 19 D NA NA NA NA NA
#> 20 20 E NA NA NA NA NA
#> 21 21 A NA NA NA NA NA
#> 22 22 B NA NA NA NA NA
#> 23 23 C NA NA NA NA NA
#> 24 24 D NA NA NA NA NA
#> 25 25 E NA NA NA NA NA
#> 26 26 A NA NA NA NA NA
#> 27 27 B NA NA NA NA NA
#> 28 28 C NA NA NA NA NA
#> 29 29 D NA NA NA NA NA
#> 30 30 E NA NA NA NA NA
Created on 2020-08-01 by the reprex package (v0.3.0)
This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.