Skip to content

Commit

Permalink
v. 1.8.2 Rolling updates
Browse files Browse the repository at this point in the history
See notes, second release
  • Loading branch information
FATelarico authored Apr 14, 2022
1 parent 7462851 commit dfaa612
Showing 1 changed file with 32 additions and 14 deletions.
46 changes: 32 additions & 14 deletions app.R
Original file line number Diff line number Diff line change
Expand Up @@ -2006,7 +2006,7 @@ server <- function(input, output, session) {
main = input$visTitle,
submain = input$visSubtitle,
background=input$visBackground)%>%
visOptions(nodesIdSelection = F,,
visOptions(nodesIdSelection = T,
height = 600,width = 800,
manipulation = F)%>%
visNodes(shape = input$visNetworkNodeShape,
Expand Down Expand Up @@ -2403,6 +2403,7 @@ server <- function(input, output, session) {
## 13.1 Reading RDS file ####
UploadedFile<-input$PrespecifiedArrayRDS
Layers<-readRDS(file = UploadedFile$datapath)
Layers<<-Layers
} else if(input$ArrayInput==".RData"){
## 13.2 Reading RData file ####
UploadedFile<-input$PrespecifiedArrayRData
Expand All @@ -2412,21 +2413,38 @@ server <- function(input, output, session) {
}

## 13.3 Unmaking array ####

## Preparing data frame
UnmakingArray<-matrix(NA,nrow = dim(Layers)[4],ncol = dim(Layers)[3])
colnames(UnmakingArray)<-1:ncol(UnmakingArray)

# Filling by column ...
for(i in 1:nrow(UnmakingArray)){
# ... then by row
for(j in 1:ncol(UnmakingArray)){
# if the specific cell contains less block types than the max
# the cell, the extra layers are filled with NAs
UnmakingArray[i,j]<-paste(unlist(strsplit(Layers[,1,i,j],split = ",")),collapse = ",")
if(length(dim(Layers))==4){
## Preparing data frame
UnmakingArray<-matrix(NA,nrow = dim(Layers)[3],ncol = dim(Layers)[4])
colnames(UnmakingArray)<-1:ncol(UnmakingArray)

# Filling by column ...
for(i in 1:nrow(UnmakingArray)){
# ... then by row
for(j in 1:ncol(UnmakingArray)){
# if the specific cell contains less block types than the max
# the cell, the extra layers are filled with NAs
UnmakingArray[i,j]<-paste(unlist(strsplit(Layers[,1,i,j],split = ",")),collapse = ",")
}
}
Tbl$Current<<-UnmakingArray
} else if(length(dim(Layers))==2){
## Preparing data frame
UnmakingArray<-matrix(NA,nrow = dim(Layers)[1],ncol = dim(Layers)[2])
colnames(UnmakingArray)<-1:ncol(UnmakingArray)

# Filling by column ...
for(i in 1:nrow(UnmakingArray)){
# ... then by row
for(j in 1:ncol(UnmakingArray)){
# if the specific cell contains less block types than the max
# the cell, the extra layers are filled with NAs
UnmakingArray[i,j]<-paste(unlist(strsplit(Layers[i,j],split = ",")),collapse = ",")
}
}
Tbl$Current<<-UnmakingArray
}
Tbl$Current<<-UnmakingArray

}
})

Expand Down

0 comments on commit dfaa612

Please sign in to comment.