Skip to content

Commit 36a7451

Browse files
committed
try to fix method of assigning edge values from .csv file
1 parent 513ea2c commit 36a7451

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

server.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,8 @@ observeEvent(input$newattrButton, {
418418
fileext <- substr(filename,nchar(filename)-3,nchar(filename))
419419
if(fileext %in% c(".csv", ".CSV")){
420420
newattrs <- read.csv(paste(path), sep=",", header=TRUE, stringsAsFactors=FALSE)
421-
newname <- names(newattrs)
421+
newname <- names(newattrs)[1]
422+
newattrs <- data.matrix(newattrs, rownames.force=FALSE)
422423
} else if(fileext %in% c(".rds",".Rds",".RDs",".RDS")){
423424
newattrs <- readRDS(paste(path))
424425
newname <- names(newattrs)

ui.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,7 +371,7 @@ url = {http://statnetproject.org}
371371
strong(".rds files"), "can be saved with",
372372
br(),
373373
code('saveRDS(objectname, file="newfilename.rds")'),br(),br(),
374-
"Multiple edge value matrices can be uploaded from one list object.",
374+
"Multiple edge value matrices can be uploaded from one list object."
375375
))),
376376
tags$li('.csv file',
377377
span(class="helper", id="filetypehelper6",

0 commit comments

Comments
 (0)