Skip to content

Commit

Permalink
Merge pull request #29 from dipterix/master
Browse files Browse the repository at this point in the history
Update read_fs_transform.R
  • Loading branch information
dfsp-spirit authored Mar 26, 2023
2 parents dafaf88 + 0c5148b commit 1f2c24d
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/read_fs_transform.R
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,13 @@ parse.transform.matrix.lines <- function(file_lines, ignore_line_suffix=";") {

line_idx = 1L;
for(file_line in file_lines) {

file_line <- trimws(file_line)

if(endsWith(file_line, ignore_line_suffix)) {
file_line = substring(file_line, 1L, (nchar(file_line) - nchar(ignore_line_suffix)));
}
matrix_row = as.double(strsplit(file_line, " ")[[1]]);
matrix_row = as.double(strsplit(trimws(file_line), " ")[[1]]);
tm[line_idx, ] = matrix_row;
line_idx = line_idx + 1L;
}
Expand Down

0 comments on commit 1f2c24d

Please sign in to comment.