Comments (7)
Something odd with the addin, I think. I also got that error, but only once, then nothing at all.
What do you get if you run gramr::write_good_ip()
in the same session? Running from the console works for me:
> gramr::write_good_ip()
index offset reason
1 0 2 "so" adds no meaning
Update, my mistake, nope, running from the console also give the error, perhaps due to some of the characters in the text, maybe the <>:
gramr::write_good_ip()
Show Traceback
Rerun with Debug
Error in context_eval(join(src), private$context) :
TypeError: Object [object Array] has no method 'substr'
from gramr.
Line breaks seem to be the culprit here. If I change the text to this, with no line breaks at all:
so dude This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see <http://rmarkdown.rstudio.com>. When you click click the **Knit** button a document will be generated that includes both content as well as the output of any embedded R code chunks within the document. You can embed an R code chunk like this:
then I get
> gramr::write_good_ip()
index offset reason
1 0 2 "so" adds no meaning
2 215 5 "click" is repeated
3 257 12 "be generated" may be passive voice
Addin gives nothing at all
from gramr.
Oh thats weird behavior - I got the same result as you once I removed the line-break and ran it in the console. I can investigate further. The addins.dcf file references the two different functions in the same file not sure if that could be it 😢
from gramr.
I think we can add untitled_text <- paste0(untitled_text, collapse = " ")
into the fn to combine the input text into a character scalar. That seems to solve the substr error for me.
I think we need to have the addins as interactive: true
so we can give a msg if there are no problems, not 100% sure about that though
from gramr.
I think #5 will solve this, see how it works for you
from gramr.
#5 worked well! I close this issue out!
from gramr.
whew! thanks!
from gramr.
Related Issues (10)
- Options for grammer checker: HOT 10
- write_good_file not as a Addin? HOT 2
- write-good output HOT 3
- Output of the functions HOT 3
- grammar check on a block of strings instead of .R and .Rmd files only HOT 2
- weasel != weasle
- Optionally exclude code chunks when handling Rmd files
- Unable to analyze whole Rmd document
- package website URL is 404
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gramr.