etc5523-2020 / exercise2C

For students to submit their reproducible example in the issue
0 stars 0 forks source link

Errors when generate tribble #37

Open ycui0008 opened 4 years ago

ycui0008 commented 4 years ago

When I try to make a tribble, the Error occurs.

x callr subprocess failed: :19:57: unexpected symbol 18: tribble( 19: ~mean, ~median, ~var, ~sd, ~ IQR, ~mad, ~min, ~max, ~1Q ^

Process 14604:

  1. (function (input) ...
  2. rmarkdown::render(input, quiet = TRUE, envir = globalenv())
  3. knitr::spin(spin_input, knit = FALSE, envir = envir, format = "Rmd")
  4. utils:::getParseData(parse(text = x, keep.source = TRUE))
  5. base:::parse(text = x, keep.source = TRUE)
  6. base:::.handleSimpleError(function (e) ...
  7. h(simpleError(msg, call))

    x :19:57: unexpected symbol 18: tribble( 19: ~mean, ~median, ~var, ~sd, ~ IQR, ~mad, ~min, ~max, ~1Q ^

ycui0008 commented 4 years ago

I found out the problem. The column name cannot be started in numbers. So 1Q should be named as Q1