Skip to content

Commit

Permalink
lintr
Browse files Browse the repository at this point in the history
  • Loading branch information
JanMarvin committed Jan 8, 2023
1 parent dae5a1e commit 812b1f0
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions R/writesas.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,18 @@ write.sas <- function(dat, filepath, compress = 0, debug = FALSE, bit32 = FALSE)
dat[ff] <- lapply(dat[ff], as.character)

vartypes <- sapply(dat, is.character) + 1
colwidth <- sapply(dat, function(x)max(nchar(x)))
colwidth <- sapply(dat, function(x) max(nchar(x)))
colwidth[vartypes == 1] <- 8

labels <- "testlab";
labels <- "testlab"

vartypen <- sapply(dat, is.numeric)

formats <- NA
formats[vartypen] <- "BEST"
formats[!vartypen] <- "$"

width <- sapply(dat, function(x)(max(nchar(as.character(x)))))
width <- sapply(dat, function(x) max(nchar(as.character(x))))
width[vartypen] <- 32 # fix for now

decim <- sapply(dat, is.integer)
Expand Down

0 comments on commit 812b1f0

Please sign in to comment.