Skip to content

Commit

Permalink
lintr fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMarvin committed Dec 2, 2023
1 parent f621954 commit 9a50bd3
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions R/writesas.R
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,14 @@ write.sas <- function(dat, filepath, compress = 0, debug = FALSE, bit32 = FALSE,
}

if (missing(size)) {
headersize = 65536;
if (bit32 == 1) headersize = 1024;
pagesize = 65536;
if (bit32 == 1) pagesize = 8192;

hsize <- 65536

Check warning on line 25 in R/writesas.R

View workflow job for this annotation

GitHub Actions / lint

file=R/writesas.R,line=25,col=5,[object_usage_linter] local variable 'hsize' assigned but may not be used
psize <- 65536

Check warning on line 26 in R/writesas.R

View workflow job for this annotation

GitHub Actions / lint

file=R/writesas.R,line=26,col=5,[object_usage_linter] local variable 'psize' assigned but may not be used

if (bit32) {
hsize <- 1024
psize <- 8192
}

size = c(headersize, pagesize)

Check warning on line 33 in R/writesas.R

View workflow job for this annotation

GitHub Actions / lint

file=R/writesas.R,line=33,col=10,[assignment_linter] Use <-, not =, for assignment.

Check warning on line 33 in R/writesas.R

View workflow job for this annotation

GitHub Actions / lint

file=R/writesas.R,line=33,col=14,[object_usage_linter] no visible binding for global variable 'headersize'

Check warning on line 33 in R/writesas.R

View workflow job for this annotation

GitHub Actions / lint

file=R/writesas.R,line=33,col=26,[object_usage_linter] no visible binding for global variable 'pagesize'
} else if (length(size) != 2) {
Expand Down

0 comments on commit 9a50bd3

Please sign in to comment.