rcst / rim

rim provides an interface to Maxima for R. Maxima is a powerful and fairly complete computer algebra system.
10 stars 1 forks source link

Knitr Engine throws error when code chunk contains comment #44

Open rcst opened 1 month ago

rcst commented 1 month ago

Example from an altered doc/index.Rmd:

laplace(x) := (2*b)^-1 * exp(-abs(x - mu)/b);

/* load("abs_integrate")$ */
Error:                                                                                                                                                                                                               
! Bad expression: only one ;|$ termination expression at a time is allowed                                                                                                                                           
Backtrace:                                                                                                                                                                                                           
  1. rmarkdown::render(input = "docs/index.Rmd", output_file = "index.html")                                                                                                                                         
  2. knitr::knit(knit_input, knit_output, envir = envir, quiet = quiet)                                                                                                                                              
  3. knitr:::process_file(text, output)                                                                                                                                                                              
  7. knitr:::process_group(group)                                                                                                                                                                                    
  8. knitr:::call_block(x)     
rcst commented 1 month ago

Comments must not be sent to Maxima and skipped.

rcst commented 1 week ago

For the knitr engine, comments could span multiple lines. Requires a re-write of gather().