escape=F kable pdf not compilingknit with `pdflatex --shell-escape myfile.tex`?Finding the current position...

Split a number into equal parts given the number of parts

How can I highlight parts in a screenshot

Are there other characters in the Star Wars universe who had damaged bodies and needed to wear an outfit like Darth Vader?

Can a space-faring robot still function over a billion years?

1970s scifi/horror novel where protagonist is used by a crablike creature to feed its larvae, goes mad, and is defeated by retraumatising him

Meaning of word ягоза

I encountered my boss during an on-site interview at another company. Should I bring it up when seeing him next time?

I can't die. Who am I?

“I had a flat in the centre of town, but I didn’t like living there, so …”

School performs periodic password audits. Is my password compromised?

How can I be pwned if I'm not registered on the compromised site?

Is there a math equivalent to the conditional ternary operator?

Sometimes a banana is just a banana

If nine coins are tossed, what is the probability that the number of heads is even?

Book about a time-travel war fought by computers

Called into a meeting and told we are being made redundant (laid off) and "not to share outside". Can I tell my partner?

What could be a means to defeat a childrens’ nightmare?

Where is this quote about overcoming the impossible said in "Interstellar"?

What is better: yes / no radio, or simple checkbox?

Quitting employee has privileged access to critical information

In which way proportional valves are controlled solely by current?

What is the minimum amount of skill points per HD?

How does signal strength relate to bandwidth?

Why do phishing e-mails use faked e-mail addresses instead of the real one?



escape=F kable pdf not compiling


knit with `pdflatex --shell-escape myfile.tex`?Finding the current position on the PDFknitr compiling time with large datasetsTables are not compiling using IEEEtran classTable reference not compiling correctlyDisplay if the variable is NA / not-NATeXStudio not compiling .Rnw properly with “scholar” R packageTable spacing issue converting to PDF via LaTeX with pandocExtra } or forgotton $, Fatal error not compiling big tableLaTeX Table not Compiling













1















I am trying to include m\textsubscript{2} in a column name using kable. When I change escape=F to allow this to occur the PDF fails to compile.



Code:



library(kableExtra)
kable(table2.1,format="latex",row.names=NA,align="c",escape=T,
col.names=c("Survey","StationID","Latitude (degrees)",
"Latitude (minutes)","Longitude (degrees)","Longitude (minutes)","Scallops (number)","Scallops (lbs)","Scallops (baskets)","Scallop density (m\textsubscript{2})","Nematode Prevalence (%)"),caption="Catch data for the commercial dredge from the VIMS/Industry cooperative surveys completed during May-July 2018. Nematode prevalence (percentage of scallops sampled at a given station infected with nematodes) is also provided for each station.",longtable = T) %>%

kable_styling(font_size=8,position="center",latex_options =c("repeat_header", "hold_position"),repeat_header_text="Table 2 continued",repeat_header_method="replace") %>%

column_spec(3:6,width = "0.50in") %>%
column_spec(7:9,width = "0.49in") %>%
column_spec(10:11,width = "0.65in")


I can get a PDF to compile with the superscript format using the following code using a fake small dataset:



A <- data.frame(round(replicate(11, runif(2)),2))

rownames(A) <- c("Hola\textsubscript{123}", "Hola\textsubscript{234}")

kable(A,
row.names = T,
col.names=c("Survey","StationID","Latitude (degrees)",
"Latitude (minutes)","Longitude (degrees)","Longitude (minutes)","Scallops (number)","Scallops (lbs)","Scallops (baskets)","Scallop density (m\textsuperscript{2})","Nematode Prevalence"),escape = F)%>%

kable_styling(font_size=8,position="center",latex_options =c("repeat_header", "hold_position"),repeat_header_text="Table 2 continued",repeat_header_method="replace") %>%

column_spec(3:6,width = "0.25in") %>%
column_spec(7:9,width = "0.25in") %>%
column_spec(10:11,width = "0.65in")
@


My data table2.1 is generated from R source code. The structure is:



data.frame':    770 obs. of  11 variables:
$ Survey : Factor w/ 3 levels "CAI_II","MAB",..: 2 2 2 2 2 2 2 2 2 2 ...
$ StationID : int 201801001 201801002 201801003 201801004 201801005 201801006 201801007 201801008 201801009 201801010 ...
$ Latitude_degrees : int 36 36 36 36 36 36 36 36 36 36 ...
$ Latitude_minutes : num 31 36.1 36.9 41.1 42.1 ...
$ Longitude_degrees: int 74 74 74 74 74 74 74 74 74 74 ...
$ Longitude_minutes: num 48.9 44.5 46.6 48.8 45.4 ...
$ Scallop_number : num 0 0 0 0 0 0 0 0 0 0 ...
$ Scallop_lbs : num 0 0 0 0 0 0 0 0 0 0 ...
$ Scallops_baskets : num 0 0 0 0 0 0 0 0 0 0 ...
$ Scallop_density : num 0 0 0 0 0 0 0 0 0 0 ...
$ Nematode : num 0 0 0 0 0 0 0 0 0 0


When I try to run the example code I got to work with table2.1, the PDF also fails to compile when escape=F. This leads me to think there is something in table2.1 that is preventing the PDF from compiling, but I'm not sure and looking for advice. I am suing RStudio and pdfLaTex.










share|improve this question





























    1















    I am trying to include m\textsubscript{2} in a column name using kable. When I change escape=F to allow this to occur the PDF fails to compile.



    Code:



    library(kableExtra)
    kable(table2.1,format="latex",row.names=NA,align="c",escape=T,
    col.names=c("Survey","StationID","Latitude (degrees)",
    "Latitude (minutes)","Longitude (degrees)","Longitude (minutes)","Scallops (number)","Scallops (lbs)","Scallops (baskets)","Scallop density (m\textsubscript{2})","Nematode Prevalence (%)"),caption="Catch data for the commercial dredge from the VIMS/Industry cooperative surveys completed during May-July 2018. Nematode prevalence (percentage of scallops sampled at a given station infected with nematodes) is also provided for each station.",longtable = T) %>%

    kable_styling(font_size=8,position="center",latex_options =c("repeat_header", "hold_position"),repeat_header_text="Table 2 continued",repeat_header_method="replace") %>%

    column_spec(3:6,width = "0.50in") %>%
    column_spec(7:9,width = "0.49in") %>%
    column_spec(10:11,width = "0.65in")


    I can get a PDF to compile with the superscript format using the following code using a fake small dataset:



    A <- data.frame(round(replicate(11, runif(2)),2))

    rownames(A) <- c("Hola\textsubscript{123}", "Hola\textsubscript{234}")

    kable(A,
    row.names = T,
    col.names=c("Survey","StationID","Latitude (degrees)",
    "Latitude (minutes)","Longitude (degrees)","Longitude (minutes)","Scallops (number)","Scallops (lbs)","Scallops (baskets)","Scallop density (m\textsuperscript{2})","Nematode Prevalence"),escape = F)%>%

    kable_styling(font_size=8,position="center",latex_options =c("repeat_header", "hold_position"),repeat_header_text="Table 2 continued",repeat_header_method="replace") %>%

    column_spec(3:6,width = "0.25in") %>%
    column_spec(7:9,width = "0.25in") %>%
    column_spec(10:11,width = "0.65in")
    @


    My data table2.1 is generated from R source code. The structure is:



    data.frame':    770 obs. of  11 variables:
    $ Survey : Factor w/ 3 levels "CAI_II","MAB",..: 2 2 2 2 2 2 2 2 2 2 ...
    $ StationID : int 201801001 201801002 201801003 201801004 201801005 201801006 201801007 201801008 201801009 201801010 ...
    $ Latitude_degrees : int 36 36 36 36 36 36 36 36 36 36 ...
    $ Latitude_minutes : num 31 36.1 36.9 41.1 42.1 ...
    $ Longitude_degrees: int 74 74 74 74 74 74 74 74 74 74 ...
    $ Longitude_minutes: num 48.9 44.5 46.6 48.8 45.4 ...
    $ Scallop_number : num 0 0 0 0 0 0 0 0 0 0 ...
    $ Scallop_lbs : num 0 0 0 0 0 0 0 0 0 0 ...
    $ Scallops_baskets : num 0 0 0 0 0 0 0 0 0 0 ...
    $ Scallop_density : num 0 0 0 0 0 0 0 0 0 0 ...
    $ Nematode : num 0 0 0 0 0 0 0 0 0 0


    When I try to run the example code I got to work with table2.1, the PDF also fails to compile when escape=F. This leads me to think there is something in table2.1 that is preventing the PDF from compiling, but I'm not sure and looking for advice. I am suing RStudio and pdfLaTex.










    share|improve this question



























      1












      1








      1








      I am trying to include m\textsubscript{2} in a column name using kable. When I change escape=F to allow this to occur the PDF fails to compile.



      Code:



      library(kableExtra)
      kable(table2.1,format="latex",row.names=NA,align="c",escape=T,
      col.names=c("Survey","StationID","Latitude (degrees)",
      "Latitude (minutes)","Longitude (degrees)","Longitude (minutes)","Scallops (number)","Scallops (lbs)","Scallops (baskets)","Scallop density (m\textsubscript{2})","Nematode Prevalence (%)"),caption="Catch data for the commercial dredge from the VIMS/Industry cooperative surveys completed during May-July 2018. Nematode prevalence (percentage of scallops sampled at a given station infected with nematodes) is also provided for each station.",longtable = T) %>%

      kable_styling(font_size=8,position="center",latex_options =c("repeat_header", "hold_position"),repeat_header_text="Table 2 continued",repeat_header_method="replace") %>%

      column_spec(3:6,width = "0.50in") %>%
      column_spec(7:9,width = "0.49in") %>%
      column_spec(10:11,width = "0.65in")


      I can get a PDF to compile with the superscript format using the following code using a fake small dataset:



      A <- data.frame(round(replicate(11, runif(2)),2))

      rownames(A) <- c("Hola\textsubscript{123}", "Hola\textsubscript{234}")

      kable(A,
      row.names = T,
      col.names=c("Survey","StationID","Latitude (degrees)",
      "Latitude (minutes)","Longitude (degrees)","Longitude (minutes)","Scallops (number)","Scallops (lbs)","Scallops (baskets)","Scallop density (m\textsuperscript{2})","Nematode Prevalence"),escape = F)%>%

      kable_styling(font_size=8,position="center",latex_options =c("repeat_header", "hold_position"),repeat_header_text="Table 2 continued",repeat_header_method="replace") %>%

      column_spec(3:6,width = "0.25in") %>%
      column_spec(7:9,width = "0.25in") %>%
      column_spec(10:11,width = "0.65in")
      @


      My data table2.1 is generated from R source code. The structure is:



      data.frame':    770 obs. of  11 variables:
      $ Survey : Factor w/ 3 levels "CAI_II","MAB",..: 2 2 2 2 2 2 2 2 2 2 ...
      $ StationID : int 201801001 201801002 201801003 201801004 201801005 201801006 201801007 201801008 201801009 201801010 ...
      $ Latitude_degrees : int 36 36 36 36 36 36 36 36 36 36 ...
      $ Latitude_minutes : num 31 36.1 36.9 41.1 42.1 ...
      $ Longitude_degrees: int 74 74 74 74 74 74 74 74 74 74 ...
      $ Longitude_minutes: num 48.9 44.5 46.6 48.8 45.4 ...
      $ Scallop_number : num 0 0 0 0 0 0 0 0 0 0 ...
      $ Scallop_lbs : num 0 0 0 0 0 0 0 0 0 0 ...
      $ Scallops_baskets : num 0 0 0 0 0 0 0 0 0 0 ...
      $ Scallop_density : num 0 0 0 0 0 0 0 0 0 0 ...
      $ Nematode : num 0 0 0 0 0 0 0 0 0 0


      When I try to run the example code I got to work with table2.1, the PDF also fails to compile when escape=F. This leads me to think there is something in table2.1 that is preventing the PDF from compiling, but I'm not sure and looking for advice. I am suing RStudio and pdfLaTex.










      share|improve this question
















      I am trying to include m\textsubscript{2} in a column name using kable. When I change escape=F to allow this to occur the PDF fails to compile.



      Code:



      library(kableExtra)
      kable(table2.1,format="latex",row.names=NA,align="c",escape=T,
      col.names=c("Survey","StationID","Latitude (degrees)",
      "Latitude (minutes)","Longitude (degrees)","Longitude (minutes)","Scallops (number)","Scallops (lbs)","Scallops (baskets)","Scallop density (m\textsubscript{2})","Nematode Prevalence (%)"),caption="Catch data for the commercial dredge from the VIMS/Industry cooperative surveys completed during May-July 2018. Nematode prevalence (percentage of scallops sampled at a given station infected with nematodes) is also provided for each station.",longtable = T) %>%

      kable_styling(font_size=8,position="center",latex_options =c("repeat_header", "hold_position"),repeat_header_text="Table 2 continued",repeat_header_method="replace") %>%

      column_spec(3:6,width = "0.50in") %>%
      column_spec(7:9,width = "0.49in") %>%
      column_spec(10:11,width = "0.65in")


      I can get a PDF to compile with the superscript format using the following code using a fake small dataset:



      A <- data.frame(round(replicate(11, runif(2)),2))

      rownames(A) <- c("Hola\textsubscript{123}", "Hola\textsubscript{234}")

      kable(A,
      row.names = T,
      col.names=c("Survey","StationID","Latitude (degrees)",
      "Latitude (minutes)","Longitude (degrees)","Longitude (minutes)","Scallops (number)","Scallops (lbs)","Scallops (baskets)","Scallop density (m\textsuperscript{2})","Nematode Prevalence"),escape = F)%>%

      kable_styling(font_size=8,position="center",latex_options =c("repeat_header", "hold_position"),repeat_header_text="Table 2 continued",repeat_header_method="replace") %>%

      column_spec(3:6,width = "0.25in") %>%
      column_spec(7:9,width = "0.25in") %>%
      column_spec(10:11,width = "0.65in")
      @


      My data table2.1 is generated from R source code. The structure is:



      data.frame':    770 obs. of  11 variables:
      $ Survey : Factor w/ 3 levels "CAI_II","MAB",..: 2 2 2 2 2 2 2 2 2 2 ...
      $ StationID : int 201801001 201801002 201801003 201801004 201801005 201801006 201801007 201801008 201801009 201801010 ...
      $ Latitude_degrees : int 36 36 36 36 36 36 36 36 36 36 ...
      $ Latitude_minutes : num 31 36.1 36.9 41.1 42.1 ...
      $ Longitude_degrees: int 74 74 74 74 74 74 74 74 74 74 ...
      $ Longitude_minutes: num 48.9 44.5 46.6 48.8 45.4 ...
      $ Scallop_number : num 0 0 0 0 0 0 0 0 0 0 ...
      $ Scallop_lbs : num 0 0 0 0 0 0 0 0 0 0 ...
      $ Scallops_baskets : num 0 0 0 0 0 0 0 0 0 0 ...
      $ Scallop_density : num 0 0 0 0 0 0 0 0 0 0 ...
      $ Nematode : num 0 0 0 0 0 0 0 0 0 0


      When I try to run the example code I got to work with table2.1, the PDF also fails to compile when escape=F. This leads me to think there is something in table2.1 that is preventing the PDF from compiling, but I'm not sure and looking for advice. I am suing RStudio and pdfLaTex.







      tables knitr






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited 14 hours ago









      JouleV

      4,91111139




      4,91111139










      asked yesterday









      user41509user41509

      1233




      1233






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "85"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f477909%2fescape-f-kable-pdf-not-compiling%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes
















          draft saved

          draft discarded




















































          Thanks for contributing an answer to TeX - LaTeX Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2ftex.stackexchange.com%2fquestions%2f477909%2fescape-f-kable-pdf-not-compiling%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Installing LyX: “No textclass is found.”LyX installation error- text class not found- 'Reconfigure' or...

          (1602) Indiana Índice Designación y nombre Características orbitales Véase...

          Universidad Autónoma de Occidente Índice Historia Campus Facultades Programas Académicos Medios de...