similar to: Loop sobre muchos data frames

Displaying 20 results from an estimated 200 matches similar to: "Loop sobre muchos data frames"

2015 Apr 10
5
Loop sobre muchos data frames
Jorge Gracias por el consejo. Aparentemente no lo estoy aplicando bien, pues el objeto que obtengo no contiene lo que quiero. Me explico, al ejecutar txt <- vector('list', length = length(names)) #names el el vector donde ya tenía almacenada la lista de txt's for(i in seq_along(txt)){ txt[[i]] <- Corpus(VectorSource(names[i])) } obtengo el objeto txt: > class(txt) [1]
2015 Apr 12
2
Loop sobre muchos data frames
Jorge, estimados colaboradores de R-help Estuve tratando de utilizar un script para uno de los pasos en mi análisis, que es transformar cada uno de los corpus en mi espacio de trabajo en un objeto TermDocumentMatrix Tengo un vector llamado bNames que lista todos los corpus que quiero pasar a TDM, y construí los siguientes comandos: tdm.n1 <- vector('list', length = length(bNames))
2012 Dec 13
2
Tamaño de la matriz de términos y memoria. Paquete TM
Hola a todos! Tengo algunos problemas con el tamaño de la matriz de términos que obtengo. Los comandos que utilizo son los siguientes: # carga librerias library(tm) library(wordcloud) library(Rstem) library(Snowball) # lee el documento UTF-8 y lo convierte a ASCII txt <-
2016 Oct 11
3
Colapsar una matriz con NA en una única fila
Javier Muchas gracias por su respuesta Aunque no está funcionando, pues si ejecuto: EncDTE1<- t.EncDTE1[ !is.na(t.EncDTE1$Var1),] obtengo Var1, Var2, Var3,...Varn con datos "texto", NA, NA....NA Pero al ejecutar EncDTE1<- t.EncDTE1[ !is.na(t.EncDTE1$Var2),] obtengo Var1, Var2, Var3,...Varn con datos NA,"texto", NA....NA Estoy tratando de dar la vuelta con el loop
2016 Oct 11
2
Colapsar una matriz con NA en una única fila
Hola Consulto por un problema que no consigo resolver. Tengo un dataframe con muchas columnas todas de texto. Cada columna tiene solamente un valor válido y el resto son NAs. También cada fila tiene un único valor válido. Quiero colapsar ese data frame en uno que tenga solamente una fila y todas las columnas. Intenté con loops, while, apply y otros parecidos pero no lo logro El ejemplo del
2018 Mar 07
2
Reglas de asociación en un cluster Hadoop
Hola, Quizás no es el ámbito más apropiado, pero vale la pena intentar. ¿Existe alguna implementación en R del modelo de reglas de asociación que pueda realizar el cálculo en paralelo sobre un cluster Hadoop? He visto los paquetes que 'paralelizan' R, pero no mencionan nada acerca de modelos de reglas de asociación. Saludos -- Oscar Benitez [[alternative HTML version deleted]]
2004 Apr 30
2
rbind with missing columns
Hello, I have several data sets, which I want to combine column-by-column using "rbind" (the data sets have ~100 columns). The problem is, that in some data sets some of the columns are missing. Simply using rbind gives me: "Error in match.names(clabs, names(xi)) : names don't match previous names" Is there a simple way to make R do the rbind despite the missing columns
2019 Nov 11
2
R en Jupyter Lab, error al cargar dplyr: "namespace 'rlang' 0.3.4 is being loaded, but >= 0.4.0 is required"
Hola Quiero ejecutar R desde Jupyter Lab y me encuentro con un error al invocar la librería dplyr. Este error no aparece cuando ejecuto RStudio. La sesión de R en jupyter lab: sessionInfo() R version 3.6.1 (2019-07-05) Platform: x86_64-w64-mingw32/x64 (64-bit) Running under: Windows 10 x64 (build 14393) Matrix products: default locale: [1] LC_COLLATE=Spanish_Chile.1252
2009 Nov 12
2
package "tm" fails to remove "the" with remove stopwords
I am using code that previously worked to remove stopwords using package "tm". Even manually adding "the" to the list does not work to remove "the". This package has undergone extensive redevelopment with changes to the function syntax, so perhaps I am just missing something. Please see my simple example, output, and sessionInfo() below. Thanks! Mark require(tm)
2013 Apr 09
3
Question on Stopword Removal from a Cyrillic (Bulgarian)Text
Hi, I bumped into a serious issue while trying to analyse some texts in Bulgarian language (with the tm package). I import a tab-separated csv file, which holds a total of 22 variables, most of which are text cells (not factors), using the read.delim function: data<-read.delim("bigcompanies_ascii.csv", header=TRUE, quote="'",
2013 Apr 09
3
Question on Stopword Removal from a Cyrillic (Bulgarian)Text
Hi, I bumped into a serious issue while trying to analyse some texts in Bulgarian language (with the tm package). I import a tab-separated csv file, which holds a total of 22 variables, most of which are text cells (not factors), using the read.delim function: data<-read.delim("bigcompanies_ascii.csv", header=TRUE, quote="'",
2012 Oct 25
2
Minería de texto
Cordial Saludo Actualmente estoy realizando una función para gráficar una nube de palabras el código que tengo es el siguiente: library(twitteR)library(tm)library(wordcloud)library(RXKCD)library(RColorBrewer) tweets=searchTwitter(''@afflorezr'', n=1500) generateCorpus= function(tweets,my.stopwords=c(),min.freq){ #Install the textmining library require(tm) require(wordcloud)
2012 Jan 27
2
tm package: handling contractions
I tried making a wordcloud of Obama's State of the Union address using the tm package to process the text sotu <- scan(file="c:/R/data/sotu2012.txt", what="character") sotu <- tolower(sotu) corp <-Corpus(VectorSource(paste(sotu, collapse=" "))) corp <- tm_map(corp, removePunctuation) corp <- tm_map(corp, stemDocument) corp <- tm_map(corp,
2013 Oct 08
1
how to check the accuracy for maxent ?
I was going through this example of maxent use: http://cran.r-project.org/web/packages/maxent/maxent.pdf # LOAD LIBRARY library(maxent) # READ THE DATA, PREPARE THE CORPUS, and CREATE THE MATRIX data <- read.csv(system.file("data/NYTimes.csv.gz",package="maxent")) corpus <- Corpus(VectorSource(data$Title[1:150])) matrix <- DocumentTermMatrix(corpus) # TRAIN/PREDICT
2014 Jul 22
2
Ayuda Error in `colnames<-`(`*tmp*`, value = c(
Buenas tardes, grupo. Estoy tratando de hacer la comparación de dos archivos de una misma organización para encontrar las diferencias entre su informe del tema edl año 2005 y el del año 2013: Todos los comandos van bien, a exepción del último "colnames", como se ve en la siguiente secuencia: > pdf1<-"./PLAN de INSPECCIONES/05_seguridad_ciudadana.pdf" >
2012 Apr 13
4
Help with stemDocument
Hi, All: I am new to R and tm package. I'm trying to do the stemming using tm_map() and it doesn't seem to work: *I used:* > stemDocument(t_cmts[[100]]) *Where t_cmts is the corpus object, the results is:* bottle loose box abt airpak sections top plastic bottle squashed nearly flush neck previous shipments bottle wrapped securely bubble wrap wno bottle damage packaging poor
2017 Jun 12
3
count number of stop words in R
define your string as whatever object you want: data <- "Mhm . Alright . There's um a young boy that's getting a cookie jar . And it he's uh in bad shape because uh the thing is falling over . And in the picture the mother is washing dishes and doesn't see it . And so is the the water is overflowing in the sink . And the dishes might get falled over if you don't fell
2017 Jun 12
0
count number of stop words in R
Defining data as you mentioned in your respond causes the following error: Error in UseMethod("tm_map", x) : no applicable method for 'tm_map' applied to an object of class "character" I can solve this error by using Corpus(VectorSource(my string)) and the using your command but I cannot see the number of stop words in my string! On Monday, June 12, 2017 8:36
2014 Jun 17
2
No es un problema de tm tienes doc.corpus vacío
No es un problema de tm ni de SnowfallC ni de mcapply (por el path utilizas linux, en windows mcapply según el manual no va bien) No defines bien los objetos que pasas. Pasas doc.corpus en lugar de corpus ( o asignas a corpus en lugar de a doc.corpus) . Depura los programas cuando salga un error de objeto, como te pone en el Error que pasas . Temporalmente lo tienes arreglado en
2001 Sep 28
3
evaluating the contents of a string
Hi, suppose I do: b <- matrix(1:9,3,3) bname <- "b" now dim(b) returns [1] 3 3 and dim(bname) returns NULL is there a function to pass bname to such that dim returns the dimensions of b? like dim(somefunc(bname)) returns [1] 3 3 does 'somefunc' exist? daver +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ |David Richmond It