Añadido Abs como opción para medidas de IVIS en la pestaña Análisis.
This commit is contained in:
+11
-5
@@ -121,12 +121,17 @@ server <- function(input, output) {
|
|||||||
}
|
}
|
||||||
table$Date<-format(table$Date, format="%d/%m/%Y")
|
table$Date<-format(table$Date, format="%d/%m/%Y")
|
||||||
if ("sex" %in% colnames(table)){table<-select(table, -sex)}
|
if ("sex" %in% colnames(table)){table<-select(table, -sex)}
|
||||||
for (i in 1:nrow(table)){
|
if ("Abs" %in% colnames(table)){
|
||||||
long<-as.numeric(gsub(",",".",strsplit(as.character(table[i,"Long"]),"+", fixed = T)[[1]]))
|
table<-rename(table, "Volume"="Abs")
|
||||||
wide<-as.numeric(gsub(",",".",strsplit(as.character(table[i,"Wide"]),"+", fixed = T)[[1]]))
|
}else{
|
||||||
table[i,"Volume"]<-sum(sapply(1:length(long), function(x) (long[x]*wide[x]*wide[x])*(pi/6)))
|
for (i in 1:nrow(table)){
|
||||||
|
long<-as.numeric(gsub(",",".",strsplit(as.character(table[i,"Long"]),"+", fixed = T)[[1]]))
|
||||||
|
wide<-as.numeric(gsub(",",".",strsplit(as.character(table[i,"Wide"]),"+", fixed = T)[[1]]))
|
||||||
|
table[i,"Volume"]<-sum(sapply(1:length(long), function(x) (long[x]*wide[x]*wide[x])*(pi/6)))
|
||||||
|
}
|
||||||
|
table$Volume<-as.numeric(table$Volume)
|
||||||
}
|
}
|
||||||
table$Volume<-as.numeric(table$Volume)
|
|
||||||
if ("Cage" %in% colnames(table)){
|
if ("Cage" %in% colnames(table)){
|
||||||
table$Animal<-paste0(table$Cage, table$Animal)
|
table$Animal<-paste0(table$Cage, table$Animal)
|
||||||
table<-table[,-which(colnames(table) == "Cage")]
|
table<-table[,-which(colnames(table) == "Cage")]
|
||||||
@@ -194,6 +199,7 @@ server <- function(input, output) {
|
|||||||
grafic<-eventReactive(input$goButton,{
|
grafic<-eventReactive(input$goButton,{
|
||||||
df<-dades$taula %>% filter(DayPostInoc == input$day_vol)
|
df<-dades$taula %>% filter(DayPostInoc == input$day_vol)
|
||||||
df<-df[!is.na(df$Volume),]
|
df<-df[!is.na(df$Volume),]
|
||||||
|
print(df)
|
||||||
up_cuttof<-input$upcut
|
up_cuttof<-input$upcut
|
||||||
low_cuttof<-input$lowcut
|
low_cuttof<-input$lowcut
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user