French accent cause error in building a R package
In a attempt to build my package with command devtools::document(roclets=c('rd', 'collate', 'namespace', 'vignette'))
, I get the following error :
Error in parse(text = lines, n = -1, srcfile = srcfile) :
/home/leo/Documents/Logiciels/WikiSocio/R/clean_wikitext.R:
31:18:INCOMPLETE_STRING inattendu(e)
30: revs %<>% gsub("\[\[Fichier:[^*][^rn]+", " ", ., perl = TRUE)
31: revs %<>% gsub("\[\[Cat
There is the complete code of the file where the issue come from :
revs %<>% gsub("(?>\{(?:[^{}]*|(?R))*\})", " ", ., perl = TRUE)
revs %<>% gsub("<references*[^<]*(?:<(?!/>)[^<]*)*(/>|rn)", " ", ., perl = TRUE)
revs %<>% gsub("<(ref|references)\b[^<]*>[^<]*(?:<(?!/ref>)[^<]*)*</ref>", " ", ., perl = TRUE)
revs %<>% gsub("\[\[Fichier:[^*][^rn]+", " ", ., perl = TRUE)
revs %<>% gsub("\[\[Catégorie:[^*][^rn]+", " ", ., perl = TRUE)
revs %<>% gsub("=[^*][^rn]+", " ", ., perl = TRUE)
revs %<>% gsub("\;[^*][^rn]+", " ", ., perl = TRUE)
revs %<>% gsub("\[\[(?:[^|\]]*\|)?([^\]]+)\]\]", "\1", ., perl = TRUE)
revs %<>% sapply(str_to_lower, locale)
revs %<>% removeWords(stopwords(locale))
revs %<>% gsub("[rn]+", " ", ., perl = TRUE)
revs %<>% gsub("[[:punct:]]", " ", .)
revs %<>% gsub("(?<=[\s])\s*|^\s+|\s+$", "", ., perl=TRUE)
revs %<>% unname
With loading of package tm
, magrittr
and stringr
before.
Here is my sessionInfo :
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.1 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1
locale:
[1] LC_CTYPE=fr_FR.UTF-8 LC_NUMERIC=C
[3] LC_TIME=fr_FR.UTF-8 LC_COLLATE=fr_FR.UTF-8
[5] LC_MONETARY=fr_FR.UTF-8 LC_MESSAGES=fr_FR.UTF-8
[7] LC_PAPER=fr_FR.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.4 tools_3.4.4 yaml_2.2.0
r ubuntu special-characters roxygen2
add a comment |
In a attempt to build my package with command devtools::document(roclets=c('rd', 'collate', 'namespace', 'vignette'))
, I get the following error :
Error in parse(text = lines, n = -1, srcfile = srcfile) :
/home/leo/Documents/Logiciels/WikiSocio/R/clean_wikitext.R:
31:18:INCOMPLETE_STRING inattendu(e)
30: revs %<>% gsub("\[\[Fichier:[^*][^rn]+", " ", ., perl = TRUE)
31: revs %<>% gsub("\[\[Cat
There is the complete code of the file where the issue come from :
revs %<>% gsub("(?>\{(?:[^{}]*|(?R))*\})", " ", ., perl = TRUE)
revs %<>% gsub("<references*[^<]*(?:<(?!/>)[^<]*)*(/>|rn)", " ", ., perl = TRUE)
revs %<>% gsub("<(ref|references)\b[^<]*>[^<]*(?:<(?!/ref>)[^<]*)*</ref>", " ", ., perl = TRUE)
revs %<>% gsub("\[\[Fichier:[^*][^rn]+", " ", ., perl = TRUE)
revs %<>% gsub("\[\[Catégorie:[^*][^rn]+", " ", ., perl = TRUE)
revs %<>% gsub("=[^*][^rn]+", " ", ., perl = TRUE)
revs %<>% gsub("\;[^*][^rn]+", " ", ., perl = TRUE)
revs %<>% gsub("\[\[(?:[^|\]]*\|)?([^\]]+)\]\]", "\1", ., perl = TRUE)
revs %<>% sapply(str_to_lower, locale)
revs %<>% removeWords(stopwords(locale))
revs %<>% gsub("[rn]+", " ", ., perl = TRUE)
revs %<>% gsub("[[:punct:]]", " ", .)
revs %<>% gsub("(?<=[\s])\s*|^\s+|\s+$", "", ., perl=TRUE)
revs %<>% unname
With loading of package tm
, magrittr
and stringr
before.
Here is my sessionInfo :
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.1 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1
locale:
[1] LC_CTYPE=fr_FR.UTF-8 LC_NUMERIC=C
[3] LC_TIME=fr_FR.UTF-8 LC_COLLATE=fr_FR.UTF-8
[5] LC_MONETARY=fr_FR.UTF-8 LC_MESSAGES=fr_FR.UTF-8
[7] LC_PAPER=fr_FR.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.4 tools_3.4.4 yaml_2.2.0
r ubuntu special-characters roxygen2
add a comment |
In a attempt to build my package with command devtools::document(roclets=c('rd', 'collate', 'namespace', 'vignette'))
, I get the following error :
Error in parse(text = lines, n = -1, srcfile = srcfile) :
/home/leo/Documents/Logiciels/WikiSocio/R/clean_wikitext.R:
31:18:INCOMPLETE_STRING inattendu(e)
30: revs %<>% gsub("\[\[Fichier:[^*][^rn]+", " ", ., perl = TRUE)
31: revs %<>% gsub("\[\[Cat
There is the complete code of the file where the issue come from :
revs %<>% gsub("(?>\{(?:[^{}]*|(?R))*\})", " ", ., perl = TRUE)
revs %<>% gsub("<references*[^<]*(?:<(?!/>)[^<]*)*(/>|rn)", " ", ., perl = TRUE)
revs %<>% gsub("<(ref|references)\b[^<]*>[^<]*(?:<(?!/ref>)[^<]*)*</ref>", " ", ., perl = TRUE)
revs %<>% gsub("\[\[Fichier:[^*][^rn]+", " ", ., perl = TRUE)
revs %<>% gsub("\[\[Catégorie:[^*][^rn]+", " ", ., perl = TRUE)
revs %<>% gsub("=[^*][^rn]+", " ", ., perl = TRUE)
revs %<>% gsub("\;[^*][^rn]+", " ", ., perl = TRUE)
revs %<>% gsub("\[\[(?:[^|\]]*\|)?([^\]]+)\]\]", "\1", ., perl = TRUE)
revs %<>% sapply(str_to_lower, locale)
revs %<>% removeWords(stopwords(locale))
revs %<>% gsub("[rn]+", " ", ., perl = TRUE)
revs %<>% gsub("[[:punct:]]", " ", .)
revs %<>% gsub("(?<=[\s])\s*|^\s+|\s+$", "", ., perl=TRUE)
revs %<>% unname
With loading of package tm
, magrittr
and stringr
before.
Here is my sessionInfo :
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.1 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1
locale:
[1] LC_CTYPE=fr_FR.UTF-8 LC_NUMERIC=C
[3] LC_TIME=fr_FR.UTF-8 LC_COLLATE=fr_FR.UTF-8
[5] LC_MONETARY=fr_FR.UTF-8 LC_MESSAGES=fr_FR.UTF-8
[7] LC_PAPER=fr_FR.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.4 tools_3.4.4 yaml_2.2.0
r ubuntu special-characters roxygen2
In a attempt to build my package with command devtools::document(roclets=c('rd', 'collate', 'namespace', 'vignette'))
, I get the following error :
Error in parse(text = lines, n = -1, srcfile = srcfile) :
/home/leo/Documents/Logiciels/WikiSocio/R/clean_wikitext.R:
31:18:INCOMPLETE_STRING inattendu(e)
30: revs %<>% gsub("\[\[Fichier:[^*][^rn]+", " ", ., perl = TRUE)
31: revs %<>% gsub("\[\[Cat
There is the complete code of the file where the issue come from :
revs %<>% gsub("(?>\{(?:[^{}]*|(?R))*\})", " ", ., perl = TRUE)
revs %<>% gsub("<references*[^<]*(?:<(?!/>)[^<]*)*(/>|rn)", " ", ., perl = TRUE)
revs %<>% gsub("<(ref|references)\b[^<]*>[^<]*(?:<(?!/ref>)[^<]*)*</ref>", " ", ., perl = TRUE)
revs %<>% gsub("\[\[Fichier:[^*][^rn]+", " ", ., perl = TRUE)
revs %<>% gsub("\[\[Catégorie:[^*][^rn]+", " ", ., perl = TRUE)
revs %<>% gsub("=[^*][^rn]+", " ", ., perl = TRUE)
revs %<>% gsub("\;[^*][^rn]+", " ", ., perl = TRUE)
revs %<>% gsub("\[\[(?:[^|\]]*\|)?([^\]]+)\]\]", "\1", ., perl = TRUE)
revs %<>% sapply(str_to_lower, locale)
revs %<>% removeWords(stopwords(locale))
revs %<>% gsub("[rn]+", " ", ., perl = TRUE)
revs %<>% gsub("[[:punct:]]", " ", .)
revs %<>% gsub("(?<=[\s])\s*|^\s+|\s+$", "", ., perl=TRUE)
revs %<>% unname
With loading of package tm
, magrittr
and stringr
before.
Here is my sessionInfo :
R version 3.4.4 (2018-03-15)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 18.04.1 LTS
Matrix products: default
BLAS: /usr/lib/x86_64-linux-gnu/blas/libblas.so.3.7.1
LAPACK: /usr/lib/x86_64-linux-gnu/lapack/liblapack.so.3.7.1
locale:
[1] LC_CTYPE=fr_FR.UTF-8 LC_NUMERIC=C
[3] LC_TIME=fr_FR.UTF-8 LC_COLLATE=fr_FR.UTF-8
[5] LC_MONETARY=fr_FR.UTF-8 LC_MESSAGES=fr_FR.UTF-8
[7] LC_PAPER=fr_FR.UTF-8 LC_NAME=C
[9] LC_ADDRESS=C LC_TELEPHONE=C
[11] LC_MEASUREMENT=fr_FR.UTF-8 LC_IDENTIFICATION=C
attached base packages:
[1] stats graphics grDevices utils datasets methods base
loaded via a namespace (and not attached):
[1] compiler_3.4.4 tools_3.4.4 yaml_2.2.0
r ubuntu special-characters roxygen2
r ubuntu special-characters roxygen2
edited Nov 12 at 16:32
asked Nov 12 at 14:56
Léo Joubert
104210
104210
add a comment |
add a comment |
active
oldest
votes
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53264750%2ffrench-accent-cause-error-in-building-a-r-package%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Stack Overflow!
- 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.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- 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.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53264750%2ffrench-accent-cause-error-in-building-a-r-package%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
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