HI I am looking to use R studio to take a flat dataset and manipulate it into a crosstab format for use in reporting.
I am working with analytical water chemistry data. So, for example, row headings would be sample names, dates, and matrix. Columns would be analytes (e.g. arsenic, calcium, alkalinity, etc.) and units (e.g. arsenic units = mg/L, calcium units = mg/L, etc). Then, for each unique sample (row heading) and analyte (column heading), the intersecting cell should be the analytical result.
I do not know if this is possible in R and I am probably phrasing this in a confusing manner as I am just learning R and have little data science background. Is anyone able to help? Everything I have found so far only tells you how to calculate percentages, means, etc. in crosstab tables. I do not need to calculate anything, just simply manipulate the data into a reportable format.