-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathword.R
More file actions
27 lines (21 loc) · 748 Bytes
/
Copy pathword.R
File metadata and controls
27 lines (21 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
library(funModeling)
library(tidyverse)
library(wordcloud2)
library(readxl)
Comenta_2_copia <- read.csv("Comenta_2_copia.csv")
# Leer el archivo con codificación UTF-8
funModeling::freq(Comenta_2_copia, path_out = "Graficos")
freq1 <-funModeling:: freq(Comenta_2_copia)
freq2 <-funModeling:: freq(Comenta_2_copia, input = c('palabra_clave'))
freq3 <- select(freq1, -percentage, -cumulative_perc)
freq3
#crear el gráfico de nubes de palabras
wordcloud2(
data = freq1,
size = 0.7,
shape = 'diamond',
color = rep_len(
c('Black', 'Red', 'Green', 'Blue', 'Orange', 'Purple', 'Brown', 'Grey', 'Darkblue', 'Darkred'),
nrow(freq1) # Asegúrate de usar freq1 (no freq3) si es el dataframe correcto
)
)