Thank you, I am new to the community and realised that did not paste through well, so have put the samples into code as below.
I am not sure how to share the data. I have a CSV file and it is public data, but I have done a few steps already to subset it for my needs.
From this
sample1 <- matrix(c(51,43,22,92,28,21,68,22),ncol=4,byrow=TRUE)
colnames(sample1) <- c("2019A","2019B","2018A", "2018B")
rownames(sample1) <- c("24-jun","25-jun")
sample1 <- as.table(sample1)
sample1
2019A 2019B 2018A 2018B
24-jun 51 43 22 92
25-jun 28 21 68 22
To this
sample2 <- matrix(c(51,43,28,21,22,92,68,22),ncol=2,byrow=TRUE)
colnames(sample2) <- c("A","B")
rownames(sample2) <- c("24-june-2019","25-june-2019","24-june-2018","25-june-2018")
sample2 <- as.table(sample2)
sample2
A B
24-june-2019 51 43
25-june-2019 28 21
24-june-2018 22 92
25-june-2018 68 22
Thanks for the reference to DataPasta that is great, I have struggled with this in the past sharing data. This is a sample from the data.
tibble::tribble(
~Day, ~`2019.Natural.Snow.Depth`, ~`2019.Average.depth.in.snow-making.area.(61.ha)`, ~`2018.Natural.Snow.Depth`, ~`2018.Average.depth.in.snow-making.area.(61.ha)`,
"24-Jun", 10L, 45L, 50L, 57L,
"25-Jun", 10L, 45L, 48L, 57L,
"26-Jun", 9L, 46L, 48L, 57L,
"27-Jun", 8L, 46L, 48L, 57L
)