I have a huge data with many subjects. The data has the following columns:
ID TIME CONC
7030104 2.0 0.536
7030104 2.5 1.320
7030104 3.0 1.460
7030104 4.0 5.070
7030104 5.0 17.300
7030104 6.0 38.600
70304 8.0 0.589
70304 10.0 35.400
70304 12.0 29.400
70304 24.0 10.900
70304 36.0 3.260
70304 48.0 1.290
I would like to draw a separate plot (CONC versus TIME) for each subject ID and automatically save it to the working directory with the ID number of the subject.
I am using simple plotting but I need the help in how I can apply it for all subject IDs and automatically save the plots into my working directory.
setwd("..")
plotobj <- NULL
plotobj <- plot(sub$TIME,sub$CONC,type="b")
i am using RStudio
Your assistance is appreciated!