Browse Source

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

master
marcelcosta 1 year ago
parent
commit
fa2c784602
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      invivos/app.R

+ 12
- 0
invivos/app.R

@ -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)){

Loading…
Cancel
Save