I want a table in org mode to meet two needs:
- When it is exported as latex, the result table in latex has the top horizontal line. like this:
- Can be used as input variable for R code blocks
But it seems that if a table's first line is hline, then it cannot be used as input variable for R code blocks. For example:
#+name: rrm_base_set
|-----+------------+---------------+---------------+----------------+---------------|
| set | fast write | total refresh | evict refresh | global refresh | decay refresh |
|-----+------------+---------------+---------------+----------------+---------------|
| 1 | 38802959 | 9402302 | 9369531 | 32771 | 0 |
| 2 | 39054186 | 8703155 | 8633222 | 69933 | 0 |
| 4 | 39063762 | 8677476 | 8533626 | 143850 | 0 |
| 8 | 39097327 | 8493754 | 8202282 | 291472 | 0 |
| 16 | 39193948 | 7856326 | 7269786 | 586540 | 0 |
| 32 | 39574909 | 4866546 | 3689315 | 1177231 | 0 |
| 64 | 39672538 | 4957701 | 2600099 | 2357602 | 0 |
| 128 | 39672538 | 6641223 | 2206883 | 4434340 | 0 |
| 256 | 39672538 | 8861756 | 1123530 | 7428850 | 309376 |
|-----+------------+---------------+---------------+----------------+---------------|
#+begin_src R :var rrm_base_set=rrm_base_set :colnames t :exports none :cache no
rrm_base_set$set=factor(rrm_base_set$set,ordered=TRUE)
rrm_base_set_ratio=rrm_base_set%>%mutate(fast_write_ratio=`fast.write`/40000000, refresh_write_ratio=`total.refresh`/40000000)
#+end_src
The error message is:
Wrong type argument: sequencep, hline
If I remove the first line which is hline, then the R source block can be executed correctly.
Is there a way to make R source block accept a table with first line to be hline as input variable? If there is no way, is there a way to export a table whose first line is not hline to latex table with top hline?
debug-on-error
tot
and post the backtrace in your question. Start Emacs usingemacs -Q
(no init file), to be sure you're not introducing a problem from your init file.