How to interpret yaml error messa with Rmarkdown? - r-markdown

Does anybody have a clue on how to find the control character in this error:
Error in yaml::yaml.load(..., eval.expr = TRUE) :
Reader error: control characters are not allowed: #9D at 2116
Calls: <Anonymous> ... parse_yaml_front_matter -> yaml_load -> <Anonymous>
What's #9D and at 2116?

Related

Core.Command.run : API changed between v0.14 and v0.15?

The following code that was compiling successfully with Core v0.14 (ocaml 4.10), but fails with v0.15 (ocaml 4.11).
open Core;;
let command = Command.basic ~summary:"essai" (
let open Command.Let_syntax in
let%map_open s = anon(sequence ("n" %: int)) in
fun () ->
List.iter s ~f:(fun x -> Printf.printf "n = %d\n" x ) ;
)
let () = Command.run ~version:"0.0" ~build_info:"RWO" command;;
The error (with 4.11) :
File "cli.ml", line 10, characters 9-20:
10 | let () = Command.run ~version:"0.0" ~build_info:"RWO" command;;
^^^^^^^^^^^
Error (alert deprecated): Core.Command.run
[since 2021-03] Use [Command_unix]
File "cli.ml", line 10, characters 9-20:
10 | let () = Command.run ~version:"0.0" ~build_info:"RWO" command;;
^^^^^^^^^^^
Error: This expression has type [ `Use_Command_unix ]
This is not a function; it cannot be applied.
The documentation of Core.Command.run states that it is obsolete - but I fail to find how to replace it.
I think you're looking for Command_unix as indicated by the message you received. Documentation link for Command_unix.run.
The core library has been restructured in version 0.15: Unix-specific modules and functions have been moved to the core_unix library in order to make the main core library more portable (or at least javascript compatible).
The function Command_unix.run in core_unix library is exactly the same as the Command.run function in previous versions of the core library.

gfortran: Error: Syntax error in OPEN statement at (1) [duplicate]

This question already has an answer here:
Old fortran code and getting an OPEN statement error using GNU
(1 answer)
Closed 7 months ago.
I am compiling a code using gfortran and am getting the error:
tui:~/SCRIPTS/FORTRAN> gfortran -c pulser_ensemble_m.f
pulser_ensemble_m.f:73.18:
OPEN(UNIT=1, NAME=FOUT,ACCESS='SEQUENTIAL',TYPE='NEW')
1
Error: Syntax error in OPEN statement at (1)
The section of code is copied below::
FOUT = TEXTIN('ENTER FILTER, ENSEMBLE AVERAGE FILE','-')
OPEN(UNIT=1, NAME=FOUT,ACCESS='SEQUENTIAL',TYPE='NEW')
NAME is not a valid parameter in an OPEN statement. Here is a minimal example test.f90:
program test
character (len = *), parameter :: file_name = 'test.txt'
integer, parameter :: u=11
open (unit = u, name = file_name, status = 'new')
write (u, *) 'hello world!'
close (u)
end program test
Once compiled and run, it will give
test.f90:6:18:
6 | open (unit = u, name = file_name, status = 'new')
| 1
Error: Syntax error in OPEN statement at (1)
But if you replace name = file_name with file = file_name, the code will compile correctly and you will write the dummy text into the file.

error about tabs function in rmarkdown(in MASS library)

what should i do with this error?it was correct in my R file but cant make Rmark down because of this error
Error in loglin(data, margins, start = start, fit = fitted, param = param, :
'margin' must contain names or numbers corresponding to 'table'
Calls: ... eval -> loglm -> loglm1 -> loglm1.default -> loglin
Execution halted

ocaml + oasis + custom module, how to compile

So i have the following files:
_oasis:
OASISFormat: 0.4
Name: PongBattleServer
Version: 0.1.0
Synopsis: Server for handling multi-player pong games
Authors: Jason Miesionczek
License: MIT
Plugins: META (0.4), DevFiles (0.4)
Executable pongserver
Path: src
BuildTools: ocamlbuild
MainIs: main.ml
main.ml:
open Players;;
let () =
let mgr = new player_manager
players.ml:
type player =
{
name: string;
score: int;
}
class player_manager =
object (self)
val mutable player_list = ( [] : player list)
method add p =
player_list <- p :: player_list
end;;
when i run make i get this error:
ocaml setup.ml -build
/home/araxia/.opam/system/bin/ocamlfind ocamldep -modules src/main.ml > src/main.ml.depends
+ /home/araxia/.opam/system/bin/ocamlfind ocamldep -modules src/main.ml > src/main.ml.depends
File "src/main.ml", line 4, characters 32-32:
Error: Syntax error
Command exited with code 2.
E: Failure("Command ''/usr/bin/ocamlbuild' src/main.byte -tag debug' terminated with error code 10")
make: *** [build] Error 1
Makefile:7: recipe for target 'build' failed
i am new to ocaml and oasis, etc. what am i doing wrong?
This has nothing to do with Oasis or whatsoever, it's just when you write
let () =
let mgr = new player_manager
OCaml expects an in keyword because either let introduces a global variable either it introduces a local variable and then you'll need a let var = expr in expr, nothing else.
So, replace it by
let () =
let mgr = new player_manager in ()
for now because you aren't doing anything with mgr.

How can clang avoid to analyze the builtin type/function in C/C++?

/usr/lib/gcc/x86_64-redhat-linux/4.8.2/include/stdarg.h:40:9: error: unknown type name '__builtin_va_list'; did you mean '__builtin_va_list'?
typedef __builtin_va_list __gnuc_va_list;
^
note: '__builtin_va_list' declared here
When I try to use the RecursiveASTVisitor to visit the AST, I got the above problem. And at the end, the program abort with the following message.
type: Typedef of __gnuc_va_list size CItutorial5: /home/lotay/libs/clang/llvm/include/llvm/Support/Casting.h:239: typename cast_retty<X, Y *>::ret_type llvm::cast(Y *) [X = clang::ConstantArrayType, Y = const clang::Type]: Assertion `isa<X>(Val) && "cast<Ty>() argument of incompatible type!"' failed.
Aborted (core dumped)
Really thanks for help
and I have the langoptions with following confs.
langOpts.GNUMode = 1 ;
langOpts.CXXExceptions = 1 ;
langOpts.RTTI = 1 ;
langOpts.Bool = 1 ;
langOpts.CPlusPlus = 1 ;
langOpts.WChar = 1 ;