Error in value[[3L]](cond) : invalid 'cex' value

Hi, I can't execute my R code in SAP analytics, anyone can help debug my code

library("NLP")
library("tm")
library("SnowballC")
library("RColorBrewer")
library("wordcloud")
library("dplyr")


###############################
###  ###
###############################


Unaccent <- function(texte) {
	texte <- gsub("['`^~\"]", " ", texte) %>%
			 iconv(to="ASCII//TRANSLIT//IGNORE")
  	texte <- gsub("['`^~\"]", "", texte)
}


removeAccents = function(phrase){
  phrase <- gsub(phrase, pattern = "\303\203\302\251", replacement = "e") %>%
  		   gsub(pattern = "\303\203\302\251", replacement = "e") %>%
  		   gsub(pattern = "\303\203\302\240\303\202\302\240", replacement = "a") %>%
  		   gsub(pattern = "\303\203\302\240\303\202\302\242", replacement = "a") %>%
  		   gsub(pattern = "\303\203\302\247", replacement = "c") %>%
  		   gsub(pattern = "\303\203\302\252", replacement = "e") %>%
  		   gsub(pattern = "\303\203\302\250", replacement = "e") %>% 
  		   gsub(pattern = "\303\203\302\240\303\202\302\271", replacement = "u") %>%
  		   gsub(pattern = "\303\203\302\202\303\202\302\262", replacement = "") %>%
  		   gsub(pattern = "\303\203\302\256", replacement = "i") %>%
  		   gsub(pattern = "\303\203\302\264", replacement = "o") %>%
  		   gsub(pattern = "\303\203\302\202\303\202\302\253", replacement = "") %>%
  		   gsub(pattern = "\342\200\231\303\251", replacement = "e") %>%
  		   gsub(pattern = "\303\251", replacement = "e") %>%
    	   gsub(pattern = "\342\200\231", replacement = " ") %>%
  		   gsub(pattern = "\303\250", replacement = "e") %>%
  		   gsub(pattern = "\303\247", replacement = "c") %>%
  		   gsub(pattern = "\303\264", replacement = "o") %>%
  		   gsub(pattern = "\303\240", replacement = "a") %>%
  		   gsub(pattern = "\303\242", replacement = "a") %>%
    	   gsub(pattern = "\305\223", replacement = "oe") %>%
  		   gsub(pattern = "\303\252", replacement = "e") %>%
  		   gsub(pattern = "\303\211", replacement = "E") %>%
  		   gsub(pattern = "\303\203\302\273", replacement = "u")
}





######################################
###  ###
######################################

text <- Connect_X %>%
		data.frame()
 

vecteurdocs <- Unaccent(removeAccents(text[,1]))


docs <- Corpus(VectorSource(vecteurdocs)) %>%
		tm_map(content_transformer(tolower)) %>%
		tm_map(removeNumbers) %>% 
		tm_map(removeWords, stopwords("french")) %>% 
		tm_map(removePunctuation) %>% 
		tm_map(stripWhitespace) 

set.seed(1234)    




################################
## ###
################################

wordcloud(docs, min.freq = 100,
          max.words=Calculation_Input_1, random.order=FALSE, rot.per=0, 
          colors=brewer.pal(8, "Dark2"))

Hello.
Thanks for providing code , but you could take further steps to make it more convenient for other forum users to help you.

Share some representative data that will enable your code to run and show the problematic behaviour.

You might use tools such as the library datapasta, or the base function dput() to share a portion of data in code form, i.e. that can be copied from forum and pasted to R session.

Reprex Guide

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.