working rmd file, removed renv because it messed up my R and could not get it to work

This commit is contained in:
Timon 2024-04-18 16:19:17 +02:00
parent 5886f59bd8
commit b6c576ca57
11 changed files with 12 additions and 2684 deletions

View file

@ -1 +0,0 @@
source("renv/activate.R")

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

View file

@ -1,7 +1,7 @@
# activeer de renv omgeving;
renv::activate('~/smartCane/r_app')
renv::restore()
# renv::activate('~/smartCane/r_app')
# renv::restore()

View file

@ -2,7 +2,7 @@
params:
ref: "word-styles-reference-var1.docx"
output_file: CI_report.docx
report_date: "2023-12-12"
report_date: "2024-04-18"
data_dir: "chemba"
output:
# html_document:
@ -23,8 +23,8 @@ report_date <- params$report_date
#
#
# # Activeer de renv omgeving
renv::activate()
# renv::activate()
# renv::deactivate()
# Optioneel: Herstel de omgeving als dat nodig is
# Je kunt dit commentaar geven als je het normaal niet wilt uitvoeren
# renv::restore()
@ -140,8 +140,8 @@ AllPivots <- merge(AllPivots0, harvesting_data, by = c("Field", "subField")) #%>
#rename(Field = pivot, subField = pivot_quadrant) #%>% select(-pivot.y)
head(AllPivots)
AllPivots_merged <- AllPivots %>%
group_by(Field) #%>% summarise(sub_area = first(sub_area))
AllPivots_merged <- AllPivots %>% #dplyr::select(Field, subField, sub_area) %>% unique() %>%
group_by(Field) %>% summarise(sub_area = first(sub_area))
AllPivots_merged <- st_transform(AllPivots_merged, crs = proj4string(CI))
@ -313,7 +313,7 @@ cum_ci_plot <- function(pivotName){
g <- ggplot(data= data_ci2 %>% filter(season %in% unique_seasons)) +
# facet_wrap(~Year, scales = "free_x") +
geom_line( aes(Date, mean_rolling10, col = Field)) +
geom_line( aes(Date, mean_rolling10, col = subField)) +
# geom_line(data= perfect_pivot, aes(Date , mean_rolling10, col = "Model CI (p5.1 Data 2022, \n date x axis is fictive)"), lty="11",size=1) +
labs(title = paste("14 day rolling MEAN CI rate - Pivot ", pivotName))+
# scale_y_continuous(limits=c(0.5,3), breaks = seq(0.5, 3, 0.5))+
@ -400,13 +400,13 @@ pivots_grouped <- AllPivots_merged %>%
# Iterate over each subgroup
for (subgroup in unique(pivots_grouped$sub_area)) {
cat("\n")
cat("\n # Subgroup: ", subgroup, "\n") # Add a title for the subgroup
cat("# Subgroup: ", subgroup, "\n") # Add a title for the subgroup
subset_data <- filter(pivots_grouped, sub_area == subgroup)
cat("\n")
walk(AllPivots_merged$Field, ~ {
cat('\\pagebreak')
walk(subset_data$Field, ~ {
cat("\n") # Add an empty line for better spacing
ci_plot(.x)
cat("\n")
cat("\n")
cum_ci_plot(.x)
cat("\n")
})

File diff suppressed because it is too large Load diff