From 32e5767ac0d1b479d241fcf1a26c5af374e2dde0 Mon Sep 17 00:00:00 2001 From: marcelcosta Date: Thu, 17 Jun 2021 07:32:37 +0200 Subject: [PATCH] =?UTF-8?q?Peque=C3=B1as=20correcciones=20en=20la=20distri?= =?UTF-8?q?buci=C3=B3n=20por=20tama=C3=B1os.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- invivos/app.R | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/invivos/app.R b/invivos/app.R index 54147be..f15e8bd 100644 --- a/invivos/app.R +++ b/invivos/app.R @@ -132,6 +132,7 @@ server <- function(input, output) { }) grafic<-eventReactive(input$goButton,{ df<-dades$taula + df<-df[!is.na(df$Volume),] up_cuttof<-input$upcut low_cuttof<-input$lowcut df<-df[df$Volume <= up_cuttof & df$Volume >= low_cuttof,] @@ -174,6 +175,9 @@ server <- function(input, output) { if ("Group" %in% colnames(df_def)){ df_def<-df_def %>% select(-"Group") } + + df_def<-merge(dades$taula %>% select(-Group), df_def[,c("ID animal", "group")], all=T) %>% select(c(`ID animal`, `ID tumor`, Volume, Cage, Major, Minor, group)) + dades$db<-df_def print(df_def) @@ -204,7 +208,7 @@ server <- function(input, output) { if (!is.null(input$file_sizes)){ dtemplate<-dades$db %>% select(-Volume) dtemplate<-melt(dtemplate, id=c("Cage", "ID animal", "ID tumor", "group"), variable.name = "DPV", value.name = "0") %>% rename("Group"="group") - dtemplate<-dtemplate[,c("Cage", "ID animal", "ID tumor", "Group", "DPV", "0")] + dtemplate<-dtemplate[,c("Cage", "ID animal", "ID tumor", "Group", "DPV", "0")] %>% arrange(`ID animal`, `ID tumor`) # template<-expand.grid(dades$db$MouseID, timepoint) # colnames(template)<-c("MouseID", "Timepoint") # template<-template[order(template$Timepoint, template$MouseID),]