r2anki(init=TRUE) сообщение об ошибке
Моя цель - создать карточки Anki для изучения R с использованием R. Я обнаружил аккуратный пакет под названием r2anki
который, кажется, делает свое дело. Основываясь на их документации, вы должны запустить команду r2anki::r2anki(init = TRUE)
для того, чтобы "скопировать несколько Anki-карт со стилем r2anki в Anki, чтобы R Markdown-output можно было правильно отобразить". Однако, когда я запускаю код, я получаю следующую ошибку:
> Import not fully tested for OSX.
> sh: anki: command not found
Так что, к сожалению, ни одна карта Anki не была скопирована со стилем r2anki. В результате мой стиль немного изменился, а теги карт Anki не были правильно подобраны. Кто-нибудь еще сталкивался с этим сообщением об ошибке раньше? Чтобы воспроизвести проблему, загрузите и загрузите r2anki
пакет, откройте новый файл RMD с помощью RStudio, выберите "из шаблона", а затем "r2anki-Notebook" и следуйте инструкциям.
Большое спасибо за ваши добрые ответы
РЕДАКТИРОВАТЬ:
Вот код RMD для воспроизведения ошибки:
---
title: "r2anki-Notebook: How to use r2anki"
output:
html_document:
theme: "flatly"
highlight: "pygments"
self_contained: false # false, so that images can be exported to anki as well
toc: true
toc_depth: 4
toc_float: true
editor_options:
chunk_output_type: console
---
```{r, echo = FALSE}
knitr::opts_chunk$set(comment = "#>", collapse = TRUE)
```
<!-- #globaltags: add, global, tags here-->
# Working with r2anki
This document demonstrates how you may use the r2anki-package.
To do this, a few Anki-cards are defined below, which you can import into Anki. If you do your homework there, you shouldn't easily forget how to work with this package any longer. ;-)
## General Information
******************
#### What is r2anki
<!-- #tags: -->
**What can you use this package for?**
<!-- start backside -->
r2anki brings R to [Anki](ankisrs.net/). It allows you to easily create Anki-cards with R Markdown in R, which you can than export to Anki. There you can study and rehearse the cards to effectively expand your R-vocabulary.
<!-- end backside -->
******************
#### What is Spaced Repitition?
<!-- #tags: -->
**Whats the idea behind it and why is it useful?**
<!-- start backside -->
Spaced Repition is a *learning technique*, that helps you to learn and remember new knowledge effectively. It accounts for the fact, that well-know material needs to be rehearsed much less often than new material. Ideally the optimal time interval for every card is estimated individually, which is for example implemented in the Anki-algorithm.
Learn more about [Spaced Repitition on Wikipedia](https://en.wikipedia.org/wiki/Spaced_repetition).
<!-- end backside -->
## Necessary preparations (required only once)
******************
#### Requirements of Using r2anki
<!-- #tags: ** -->
**Which software do you need to install prior to using r2anki?**
<!-- start backside -->
Because r2anki connects *R* to *Anki*. You need to have (*R* and) Anki installed. You should also import the r2anki-Notetype to Anki, so that the markup for the Anki-cards looks nice.
`r2anki::install_anki()` is a little function to help get you started. :-)
<!-- end backside -->
******************
#### r2anki-Initialization
<!-- #tags: ** -->
**When you first want to use r2anki, you need to initialize Anki**
Why is this necessary and how do you do it?
<!-- start backside -->
In Anki the styling of the cards is defined by "Note Types", which may contain html and CSS-information. `r2anki::r2anki(init = TRUE)` will copy a few Anki-cards with the r2anki-styling to Anki, so that the R Markdown-output can be rendered properly.
<!-- end backside -->