Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| d14c5603f0 | |||
| be29b3309d | |||
| 11f3a57014 |
+9
-2
@@ -323,9 +323,9 @@ server <- function(input, output) {
|
|||||||
|
|
||||||
template<-data.frame(
|
template<-data.frame(
|
||||||
Cage=rep(LETTERS[1:ncages], each=nrat_cage*as.numeric(input$ntumors)),
|
Cage=rep(LETTERS[1:ncages], each=nrat_cage*as.numeric(input$ntumors)),
|
||||||
|
Animal=rep(1:(nrat_cage*ncages), each=as.numeric(input$ntumors)),
|
||||||
Date="",
|
Date="",
|
||||||
DayPostInoc="",
|
DayPostInoc="",
|
||||||
Animal=rep(1:(nrat_cage*ncages), each=as.numeric(input$ntumors)),
|
|
||||||
Group="",
|
Group="",
|
||||||
Side=rep(id_tumors, nrat_cage*ncages),
|
Side=rep(id_tumors, nrat_cage*ncages),
|
||||||
Weight="",
|
Weight="",
|
||||||
@@ -349,6 +349,13 @@ server <- function(input, output) {
|
|||||||
if (!is.null(input$file_analy)){
|
if (!is.null(input$file_analy)){
|
||||||
table<-read.xlsx(input$file_analy$datapath, sheet = 1, check.names = F, sep.names = " ")
|
table<-read.xlsx(input$file_analy$datapath, sheet = 1, check.names = F, sep.names = " ")
|
||||||
if ("sex" %in% colnames(table)){table<-select(table, -sex)}
|
if ("sex" %in% colnames(table)){table<-select(table, -sex)}
|
||||||
|
table$Long<-gsub(",",".", table$Long)
|
||||||
|
table$Wide<-gsub(",",".", table$Wide)
|
||||||
|
for (i in 1:nrow(table)){
|
||||||
|
long<-as.numeric(strsplit(table[i,"Long"],"+", fixed = T)[[1]])
|
||||||
|
wide<-as.numeric(strsplit(table[i,"Wide"],"+", fixed = T)[[1]])
|
||||||
|
table[i,"Volume"]<-sum(sapply(1:length(long), function(x) (long[x]*wide[x]*wide[x])*(pi/6)))
|
||||||
|
}
|
||||||
analysis$taula<-table
|
analysis$taula<-table
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -586,7 +593,7 @@ server <- function(input, output) {
|
|||||||
paste("invivo-vols", ".xlsx", sep="")
|
paste("invivo-vols", ".xlsx", sep="")
|
||||||
},
|
},
|
||||||
content = function(file){
|
content = function(file){
|
||||||
dtemplate<-analysis$taula_vol
|
dtemplate<-analysis$taula
|
||||||
write.xlsx(dtemplate,file)
|
write.xlsx(dtemplate,file)
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
|||||||
Reference in New Issue
Block a user