Hemken / SASmarkdown

A collection of R functions that extends knitr's capability for using SAS as a language engine
Other
21 stars 5 forks source link

Chunk option SASnotes=FALSE removes only the first line of notes #9

Closed mgdondon closed 2 years ago

mgdondon commented 4 years ago

Hello,

The chunk option SASnotes=FALSE removes only the first line of notes :

```{r, engine="saslog", engine.path=sasexe, engine.opts=sasopts}

2          data test_note_on_two_lines;
3            set sashelp.class;
4          run;

NOTE: There were 19 observations read from the data set SASHELP.CLASS.
NOTE: The data set WORK.TEST_NOTE_ON_TWO_LINES has 19 observations and 5 
      variables.
NOTE: DATA statement used (Total process time):
      real time           0.02 seconds
      cpu time            0.01 seconds

```{r, engine="saslog", engine.path=sasexe, engine.opts=sasopts, SASproctime=FALSE, SASnotes=FALSE}

2          data test_note_on_two_lines;
3            set sashelp.class;
4          run;

      variables.

Many thanks,

Hemken commented 4 years ago

I see. (Clever example, by the way!)

In this case the NOTE is followed by another NOTE. Can you think of a way to reliably determine when an arbitrary NOTE breaks over multiple lines?

I’ll give this some thought.

From: mgdondon [mailto:notifications@github.com] Sent: Monday, November 25, 2019 2:24 PM To: Hemken/SASmarkdown Cc: Subscribed Subject: [Hemken/SASmarkdown] Chunk option SASnotes=FALSE removes only the first line of notes (#9)

Hello,

The chunk option SASnotes=FALSE removes only the first line of notes :



2          data test_note_on_two_lines;

3            set sashelp.class;

4          run;

NOTE: There were 19 observations read from the data set SASHELP.CLASS.

NOTE: The data set WORK.TEST_NOTE_ON_TWO_LINES has 19 observations and 5

      variables.

NOTE: DATA statement used (Total process time):

      real time           0.02 seconds

      cpu time            0.01 seconds

```{r, engine="saslog", engine.path=sasexe, engine.opts=sasopts, SASproctime=FALSE, SASnotes=FALSE}

2          data test_note_on_two_lines;

3            set sashelp.class;

4          run;

      variables.

Many thanks,

—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub<https://github.com/Hemken/SASmarkdown/issues/9?email_source=notifications&email_token=ACYBME7V3YWPYEYP2EMNFQTQVQQ3FA5CNFSM4JRNTP32YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4H35A7UA>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/ACYBME42Z6ZJDPJSITP2L3LQVQQ3FANCNFSM4JRNTP3Q>.
mgdondon commented 4 years ago

The NOTES are always followed by the NOTE "DATA statement used".

An arbitrary NOTE jumps over several lines when its length exceeds the length of the line. I tried the previous code with sasopts <-" -nosplash -ls 85 " and that's ok, but the problem will remain if the note is longer.

Many thanks,

Hemken commented 4 years ago

Changing “–ls” also has the downside that it will alter users’ final documents, so it’s not really a robust solution.

But thanks for reminding me that the proctime note always comes last. I should be able to use that. (It will likely take me a couple of days to dig into the code, however.)

From: mgdondon [mailto:notifications@github.com] Sent: Monday, November 25, 2019 3:27 PM To: Hemken/SASmarkdown Cc: Doug Hemken; Comment Subject: Re: [Hemken/SASmarkdown] Chunk option SASnotes=FALSE removes only the first line of notes (#9)

The NOTES are always followed by the note "Instruction DATA used".

An arbitrary NOTE jumps over several lines when its length exceeds the length of the line. I tried the previous code with sasopts <-" -nosplash -ls 85 " and that's ok, but the problem will remain if the note is longer.

— You are receiving this because you commented. Reply to this email directly, view it on GitHubhttps://github.com/Hemken/SASmarkdown/issues/9?email_source=notifications&email_token=ACYBMEZZBH2O36VAJ7ADYDDQVQYK7A5CNFSM4JRNTP32YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEFDWBQI#issuecomment-558325953, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ACYBME2JAWYRAWYTTXLF6Q3QVQYK7ANCNFSM4JRNTP3Q.

Hemken commented 2 years ago

Revised log cleanup through SAS options