En análisis, conversión de formato antiguo a moderno.

This commit is contained in:
2023-02-10 16:04:43 +01:00
parent 633fb5f953
commit fa2c784602
+12
View File
@@ -355,6 +355,18 @@ server <- function(input, output) {
observe({
if (!is.null(input$file_analy)){
table<-read.xlsx(input$file_analy$datapath, sheet = 1, check.names = F, sep.names = " ", detectDates = T)
if("ID animal" %in% colnames(table)){
table<-table %>%
rename(Animal=`ID.animal`, Side=`ID.tumor`)
table<-table %>% gather(DayPostInoc, Value, which(!is.na(as.numeric(colnames(table))))) %>%
relocate(DayPostInoc, .before = Group) %>% spread(DPV, Value) %>%
rename(Long=Major, Wide=Minor) %>%
add_column(Date="", .after = "Animal") %>%
add_column(Weight="", .after="Group") %>%
add_column(Volume="",Observations="") %>%
relocate(Side, .after = "Group")
}
table$Date<-format(table$Date, format="%d/%m/%Y")
if ("sex" %in% colnames(table)){table<-select(table, -sex)}
for (i in 1:nrow(table)){