Dear R community,
I am completely new to R (not programming in general but the environment & syntax) and I have some troubles resolving the following issue, on which you hopefully could help me.
I have a CSV file that contains multiple rows and columns, whereas the first column is sample-ID, the second one contains time measurements (time series), i.e. 0.5, 1, 2, 5, 10, 20, 30,... minutes and the other columns contain values taken at that specific time (e.g. value X at 10 minutes). The structure of this file is that the sample-ID column contains 10 rows with SAME sample-ID, e.g. ABC, and an associated time measurement column with first row (e.g. = 0.5 minutes, second row = 1 minutes, third row = 2 minutes,...) while still talking about the SAME sample! After the first 10 rows, the next 10 rows come with the second sample XYZ, etc.
What I would like to plot now is the evolution of each sample as a line (in the same plot) along time (minutes, x-axis) and a specific value (third column) at that time on the y-axis.
How can I tell R that each X rows have to be considered "as one sample" (maybe with a for loop?), with a specific time value (X, Y, Z minutes) and plot them as a line across a range of Y-axis values? I only managed to get unreasonable plots so far...
While in Python this is easily solved with e.g. adding "-" to create a line plot and not having so many issues with time series, I might not just be uesd to R (but I would like to get more into it). I have read that I might have to use "data tables" instead of "data frames" in R? However, when I import them as Data Table, I actually get an extra column with each column as a row!? Not sure what kind of sense that would make, though..
I hope I made the problem clear and that you might have a an approach on how to solve it.
Thank you very much!