Hola de nuevo, parece que la última versión del paquete data.table es 1.9.6 La he probado y parece que no funciona bien, me da error: Error in fread("C:/Users/iphealthMariluz/Documents/Proyecto iphealt/ProcesamientoTexto/Adverse Drug Event/ADE-Corpus/DRUG-AE_eliminoLinea1856.rel") : 4 arguments passed to .Internal(nchar) which requires 3 El 30 de septiembre de 2015, 13:38, MªLuz Morales <mlzmrls en gmail.com> escribió:> Sí, me di cuenta de que el problema era |", y he hecho la sustitución. > Estoy usando la versión 1.9.4, sí. Voy a ver si consigo la versión 1.9.5. > > Muchísimas gracias a todos > Saludos > MªLuz > > > > El 30 de septiembre de 2015, 12:51, Carlos J. Gil Bellosta < > cgb en datanalytics.com> escribió: > >> Si en la línea 1856 de tus datos reemplazas >> >> |"cotton-wool" spots| >> >> por >> >> |cotton-wool spots| >> >> funciona (y fread lee todas las línas). >> >> Suena a bug en el paquete (porque las comillas que no son vecinas de >> separador las gestiona correctamente). >> >> Igual quieres comentarle al autor del paquete el problema para que le >> eche un ojo. De todos modos, te recomendaría que comprobases el >> problema también en la versión de desarrollo, la 1.9.5, por si ya se >> ha arreglado. La actual (¿es la que usas?) es la 1.9.4. >> >> Salud, >> >> Carlos J. Gil Bellosta >> http://www.datanalytics.com >> >> El día 30 de septiembre de 2015, 12:37, Carlos Ortega >> <cof en qualityexcellence.es> escribió: >> > No sé... alguna explicación habrá... >> > >> > ¿Puedes pasarnos tu fichero para ver si lo importamos correctamente >> > nosotros?. >> > ¿Puedes comprobar que tienes la última versión de data.table...? >> > >> > Gracias, >> > Carlos Ortega >> > www.qualityexcellence.es >> > >> > El 30 de septiembre de 2015, 10:37, MªLuz Morales <mlzmrls en gmail.com> >> > escribió: >> > >> >> Hola de nuevo, >> >> >> >> el archivo .rel esta en una carpeta comprimida .zip, yo la descomprimo >> con >> >> win rar. Como no sea ese el motivo por el que no me da el fichero >> completo? >> >> >> >> El 30 de septiembre de 2015, 10:30, MªLuz Morales <mlzmrls en gmail.com> >> >> escribió: >> >> >> >>> Pues soy gafe entonces, >> >>> no lo entiendo: >> >>> >> >>> > datIn <- fread("C:\\Users\\iphealthMariluz\\Documents\\Proyecto >> iphealt\\ProcesamientoTexto\\Adverse Drug Event\\ADE-Corpus\\DRUG-AE.rel")> >> dim(datIn)[1] 1855 8 >> >>> >> >>> >> >>> El 29 de septiembre de 2015, 18:54, Carlos Ortega < >> >>> cof en qualityexcellence.es> escribió: >> >>> >> >>>> Y con fread.. directamente sobre el ".rel"... >> >>>> >> >>>> > datIn <- fread("DRUG-AE.rel") >> >>>> > dim(datIn) >> >>>> [1] 6821 8 >> >>>> >> >>>> >> >>>> >> >>>> Saludos, >> >>>> Carlos Ortega >> >>>> www.qualityexcellence.es >> >>>> >> >>>> >> >>>> El 29 de septiembre de 2015, 18:45, Pedro Concejero Cerezo < >> >>>> pedro.concejerocerezo en telefonica.com> escribió: >> >>>> >> >>>>> No tiene cabecera. Tendrás que ponerle nombre a las variables >> >>>>> Prueba este código, yo leo 6821 obs. of 8 variables >> >>>>> >> >>>>> library(data.table) >> >>>>> setwd("C:/Users/pedroc/Desktop/ADE-Corpus-V2") #Pon tu directorio >> >>>>> trabajo >> >>>>> dat <- read.table(file = "DRUG-AE.rel", >> >>>>> sep = "|", >> >>>>> comment.char = "", >> >>>>> header = F, >> >>>>> quote = "") >> >>>>> >> >>>>> str(dat) >> >>>>> >> >>>>> datt <- data.table(dat) >> >>>>> >> >>>>> >> >>>>> El 29/09/2015 a las 17:31, Pedro Concejero Cerezo escribió: >> >>>>> Hola, M. Luz. >> >>>>> Hay infinidad de motivos por los que se te puede cortar la lectura >> de >> >>>>> un archivo de datos, pero los más habituales son encontrar un "#" o >> unas "" >> >>>>> en los registros, o una línea toda en blanco. >> >>>>> Lo primero yo creo que es dejar el archivo en texto plano (lo que te >> >>>>> recomendaba Carlos de usar el original, no el docx), y buscar esos >> >>>>> caracteres con un editor de texto plano tipo Notepad. Los puedes >> eliminar >> >>>>> si no cumplen ninguna función. >> >>>>> Yo te recomiendo usar read.table que te permite configurar estos >> >>>>> detalles. En concreto: >> >>>>> >> >>>>> comment.char = "" no te corta la lectura de fichero como si fuera >> un >> >>>>> comentario, te lo añade a la cadena (eso si quieres usar el >> carácter, si no >> >>>>> elimínalo) >> >>>>> quote = "" lo mismo con la comilla como comienzo de una cadena >> >>>>> >> >>>>> Pero verás que hay muchísimas más opciones que te evitan que se >> corte >> >>>>> la lectura (blank lines, ...) o que te rellene con NA's si no >> encuentra >> >>>>> todas las columnas del header (flush = TRUE). >> >>>>> Luego pasas a data.table con data.table(objeto_que_has_leido) y ya >> está. >> >>>>> >> >>>>> read.table(file, header = FALSE, sep = "", quote = "\"'", >> >>>>> dec = ".", numerals = c("allow.loss", "warn.loss", >> >>>>> "no.loss"), >> >>>>> row.names, col.names, as.is = !stringsAsFactors, >> >>>>> na.strings = "NA", colClasses = NA, nrows = -1, >> >>>>> skip = 0, check.names = TRUE, fill = !blank.lines.skip, >> >>>>> strip.white = FALSE, blank.lines.skip = TRUE, >> >>>>> comment.char = "#", >> >>>>> allowEscapes = FALSE, flush = FALSE, >> >>>>> stringsAsFactors = default.stringsAsFactors(), >> >>>>> fileEncoding = "", encoding = "unknown", text, skipNul >> >>>>> FALSE) >> >>>>> >> >>>>> >> >>>>> Saludos, >> >>>>> Pedro >> >>>>> >> >>>>> ============>> >>>>> En respuesta a: >> >>>>> >> >>>>> ------------------------------ >> >>>>> >> >>>>> Message: 2 >> >>>>> Date: Tue, 29 Sep 2015 16:55:05 +0200 >> >>>>> From: MªLuz Morales <mlzmrls en gmail.com><mailto:mlzmrls en gmail.com> >> >>>>> To: r-help-es <r-help-es en r-project.org><mailto: >> r-help-es en r-project.org> >> >>>>> Subject: [R-es] sobre fread {data.table} >> >>>>> Message-ID: >> >>>>> < >> >>>>> CANmAToM+sRRTfOBRYsrgoUdxdXVtrk21_E7LE0rrb8ENmMiBqQ en mail.gmail.com >> >>>>> ><mailto: >> >>>>> CANmAToM+sRRTfOBRYsrgoUdxdXVtrk21_E7LE0rrb8ENmMiBqQ en mail.gmail.com> >> >>>>> Content-Type: text/plain; charset="UTF-8" >> >>>>> >> >>>>> Buenas tardes, >> >>>>> >> >>>>> intento almacenar el contenido de un archivo .docx en un data.table, >> >>>>> pero >> >>>>> solo me devuelve 1855 filas cuando deberñian ser 6821. >> >>>>> >> >>>>> Sin embargo, el mismo archivo se me descarga completo usando >> read_docx >> >>>>> {qdapTools}, pero este devuelve un vector carácter y no es lo que >> >>>>> quiero. >> >>>>> >> >>>>> ¿Alguien sabe donde puede estar el problema? >> >>>>> >> >>>>> Nota: El docx procede de un archivo .rel que descargué de internet, >> al >> >>>>> cual >> >>>>> cambié la extensión por .doc y una vez abierto guardé como docx. >> >>>>> >> >>>>> Gracias!! >> >>>>> Un saludo >> >>>>> MªLuz >> >>>>> >> >>>>> >> >>>>> -- >> >>>>> Pedro Concejero >> >>>>> E-mail: pedro.concejerocerezo en telefonica.com<mailto: >> >>>>> pedro.concejerocerezo en telefonica.com> >> >>>>> skype: pedro.concejero >> >>>>> twitter @ConcejeroPedro<https://twitter.com/ConcejeroPedro> >> >>>>> linkedin pedroconcejero< >> http://www.linkedin.com/in/pedroconcejero/es> >> >>>>> Entusiasta R, me encontraréis aquí gRupo R madRid < >> >>>>> http://madrid.r-es.org/> >> >>>>> >> >>>>> >> >>>>> -- >> >>>>> Pedro Concejero >> >>>>> E-mail: pedro.concejerocerezo en telefonica.com<mailto: >> >>>>> pedro.concejerocerezo en telefonica.com> >> >>>>> skype: pedro.concejero >> >>>>> twitter @ConcejeroPedro<https://twitter.com/ConcejeroPedro> >> >>>>> linkedin pedroconcejero< >> http://www.linkedin.com/in/pedroconcejero/es> >> >>>>> Entusiasta R, me encontraréis aquí gRupo R madRid < >> >>>>> http://madrid.r-es.org/> >> >>>>> >> >>>>> ________________________________ >> >>>>> >> >>>>> Este mensaje y sus adjuntos se dirigen exclusivamente a su >> >>>>> destinatario, puede contener información privilegiada o >> confidencial y es >> >>>>> para uso exclusivo de la persona o entidad de destino. Si no es >> usted. el >> >>>>> destinatario indicado, queda notificado de que la lectura, >> utilización, >> >>>>> divulgación y/o copia sin autorización puede estar prohibida en >> virtud de >> >>>>> la legislación vigente. Si ha recibido este mensaje por error, le >> rogamos >> >>>>> que nos lo comunique inmediatamente por esta misma vía y proceda a >> su >> >>>>> destrucción. >> >>>>> >> >>>>> The information contained in this transmission is privileged and >> >>>>> confidential information intended only for the use of the >> individual or >> >>>>> entity named above. If the reader of this message is not the >> intended >> >>>>> recipient, you are hereby notified that any dissemination, >> distribution or >> >>>>> copying of this communication is strictly prohibited. If you have >> received >> >>>>> this transmission in error, do not read it. Please immediately >> reply to the >> >>>>> sender that you have received this communication in error and then >> delete >> >>>>> it. >> >>>>> >> >>>>> Esta mensagem e seus anexos se dirigem exclusivamente ao seu >> >>>>> destinatário, pode conter informação privilegiada ou confidencial e >> é para >> >>>>> uso exclusivo da pessoa ou entidade de destino. Se não é vossa >> senhoria o >> >>>>> destinatário indicado, fica notificado de que a leitura, utilização, >> >>>>> divulgação e/ou cópia sem autorização pode estar proibida em >> virtude da >> >>>>> legislação vigente. Se recebeu esta mensagem por erro, rogamos-lhe >> que nos >> >>>>> o comunique imediatamente por esta mesma via e proceda a sua >> destruição >> >>>>> >> >>>>> [[alternative HTML version deleted]] >> >>>>> >> >>>>> _______________________________________________ >> >>>>> R-help-es mailing list >> >>>>> R-help-es en r-project.org >> >>>>> https://stat.ethz.ch/mailman/listinfo/r-help-es >> >>>>> >> >>>> >> >>>> >> >>>> >> >>>> -- >> >>>> Saludos, >> >>>> Carlos Ortega >> >>>> www.qualityexcellence.es >> >>>> >> >>> >> >>> >> >> >> > >> > >> > -- >> > Saludos, >> > Carlos Ortega >> > www.qualityexcellence.es >> > >> > [[alternative HTML version deleted]] >> > >> > _______________________________________________ >> > R-help-es mailing list >> > R-help-es en r-project.org >> > https://stat.ethz.ch/mailman/listinfo/r-help-es >> > >[[alternative HTML version deleted]]
Hola, ¿qué tal? Tu vida sería más sencilla si usases read.table y luego, si quieres, convirtieses tu objeto en un data.table. Para 6000 filas, la diferencia de rendimiento que obtienes es ridícula. Por otro lado, hablaría con el autor del paquete comentándole el problema. Puedes abrir un "issue" en https://github.com/Rdatatable/data.table para que el autor le eche un vistazo. Un saludo, Carlos J. Gil Bellosta http://www.datanalytics.com El 1 de octubre de 2015, 12:41, MªLuz Morales <mlzmrls en gmail.com> escribió:> Hola de nuevo, > parece que la última versión del paquete data.table es 1.9.6 > La he probado y parece que no funciona bien, me da error: > > > > Error in fread("C:/Users/iphealthMariluz/Documents/Proyecto iphealt/ProcesamientoTexto/Adverse Drug Event/ADE-Corpus/DRUG-AE_eliminoLinea1856.rel") : > 4 arguments passed to .Internal(nchar) which requires 3 > > > > > > El 30 de septiembre de 2015, 13:38, MªLuz Morales <mlzmrls en gmail.com> > escribió: > >> Sí, me di cuenta de que el problema era |", y he hecho la sustitución. >> Estoy usando la versión 1.9.4, sí. Voy a ver si consigo la versión 1.9.5. >> >> Muchísimas gracias a todos >> Saludos >> MªLuz >> >> >> >> El 30 de septiembre de 2015, 12:51, Carlos J. Gil Bellosta < >> cgb en datanalytics.com> escribió: >> >>> Si en la línea 1856 de tus datos reemplazas >>> >>> |"cotton-wool" spots| >>> >>> por >>> >>> |cotton-wool spots| >>> >>> funciona (y fread lee todas las línas). >>> >>> Suena a bug en el paquete (porque las comillas que no son vecinas de >>> separador las gestiona correctamente). >>> >>> Igual quieres comentarle al autor del paquete el problema para que le >>> eche un ojo. De todos modos, te recomendaría que comprobases el >>> problema también en la versión de desarrollo, la 1.9.5, por si ya se >>> ha arreglado. La actual (¿es la que usas?) es la 1.9.4. >>> >>> Salud, >>> >>> Carlos J. Gil Bellosta >>> http://www.datanalytics.com >>> >>> El día 30 de septiembre de 2015, 12:37, Carlos Ortega >>> <cof en qualityexcellence.es> escribió: >>> > No sé... alguna explicación habrá... >>> > >>> > ¿Puedes pasarnos tu fichero para ver si lo importamos correctamente >>> > nosotros?. >>> > ¿Puedes comprobar que tienes la última versión de data.table...? >>> > >>> > Gracias, >>> > Carlos Ortega >>> > www.qualityexcellence.es >>> > >>> > El 30 de septiembre de 2015, 10:37, MªLuz Morales <mlzmrls en gmail.com> >>> > escribió: >>> > >>> >> Hola de nuevo, >>> >> >>> >> el archivo .rel esta en una carpeta comprimida .zip, yo la >>> descomprimo con >>> >> win rar. Como no sea ese el motivo por el que no me da el fichero >>> completo? >>> >> >>> >> El 30 de septiembre de 2015, 10:30, MªLuz Morales <mlzmrls en gmail.com> >>> >> escribió: >>> >> >>> >>> Pues soy gafe entonces, >>> >>> no lo entiendo: >>> >>> >>> >>> > datIn <- fread("C:\\Users\\iphealthMariluz\\Documents\\Proyecto >>> iphealt\\ProcesamientoTexto\\Adverse Drug Event\\ADE-Corpus\\DRUG-AE.rel")> >>> dim(datIn)[1] 1855 8 >>> >>> >>> >>> >>> >>> El 29 de septiembre de 2015, 18:54, Carlos Ortega < >>> >>> cof en qualityexcellence.es> escribió: >>> >>> >>> >>>> Y con fread.. directamente sobre el ".rel"... >>> >>>> >>> >>>> > datIn <- fread("DRUG-AE.rel") >>> >>>> > dim(datIn) >>> >>>> [1] 6821 8 >>> >>>> >>> >>>> >>> >>>> >>> >>>> Saludos, >>> >>>> Carlos Ortega >>> >>>> www.qualityexcellence.es >>> >>>> >>> >>>> >>> >>>> El 29 de septiembre de 2015, 18:45, Pedro Concejero Cerezo < >>> >>>> pedro.concejerocerezo en telefonica.com> escribió: >>> >>>> >>> >>>>> No tiene cabecera. Tendrás que ponerle nombre a las variables >>> >>>>> Prueba este código, yo leo 6821 obs. of 8 variables >>> >>>>> >>> >>>>> library(data.table) >>> >>>>> setwd("C:/Users/pedroc/Desktop/ADE-Corpus-V2") #Pon tu directorio >>> >>>>> trabajo >>> >>>>> dat <- read.table(file = "DRUG-AE.rel", >>> >>>>> sep = "|", >>> >>>>> comment.char = "", >>> >>>>> header = F, >>> >>>>> quote = "") >>> >>>>> >>> >>>>> str(dat) >>> >>>>> >>> >>>>> datt <- data.table(dat) >>> >>>>> >>> >>>>> >>> >>>>> El 29/09/2015 a las 17:31, Pedro Concejero Cerezo escribió: >>> >>>>> Hola, M. Luz. >>> >>>>> Hay infinidad de motivos por los que se te puede cortar la lectura >>> de >>> >>>>> un archivo de datos, pero los más habituales son encontrar un "#" >>> o unas "" >>> >>>>> en los registros, o una línea toda en blanco. >>> >>>>> Lo primero yo creo que es dejar el archivo en texto plano (lo que >>> te >>> >>>>> recomendaba Carlos de usar el original, no el docx), y buscar esos >>> >>>>> caracteres con un editor de texto plano tipo Notepad. Los puedes >>> eliminar >>> >>>>> si no cumplen ninguna función. >>> >>>>> Yo te recomiendo usar read.table que te permite configurar estos >>> >>>>> detalles. En concreto: >>> >>>>> >>> >>>>> comment.char = "" no te corta la lectura de fichero como si fuera >>> un >>> >>>>> comentario, te lo añade a la cadena (eso si quieres usar el >>> carácter, si no >>> >>>>> elimínalo) >>> >>>>> quote = "" lo mismo con la comilla como comienzo de una cadena >>> >>>>> >>> >>>>> Pero verás que hay muchísimas más opciones que te evitan que se >>> corte >>> >>>>> la lectura (blank lines, ...) o que te rellene con NA's si no >>> encuentra >>> >>>>> todas las columnas del header (flush = TRUE). >>> >>>>> Luego pasas a data.table con data.table(objeto_que_has_leido) y ya >>> está. >>> >>>>> >>> >>>>> read.table(file, header = FALSE, sep = "", quote = "\"'", >>> >>>>> dec = ".", numerals = c("allow.loss", "warn.loss", >>> >>>>> "no.loss"), >>> >>>>> row.names, col.names, as.is = !stringsAsFactors, >>> >>>>> na.strings = "NA", colClasses = NA, nrows = -1, >>> >>>>> skip = 0, check.names = TRUE, fill = !blank.lines.skip, >>> >>>>> strip.white = FALSE, blank.lines.skip = TRUE, >>> >>>>> comment.char = "#", >>> >>>>> allowEscapes = FALSE, flush = FALSE, >>> >>>>> stringsAsFactors = default.stringsAsFactors(), >>> >>>>> fileEncoding = "", encoding = "unknown", text, skipNul >>> >>>>> FALSE) >>> >>>>> >>> >>>>> >>> >>>>> Saludos, >>> >>>>> Pedro >>> >>>>> >>> >>>>> ============>>> >>>>> En respuesta a: >>> >>>>> >>> >>>>> ------------------------------ >>> >>>>> >>> >>>>> Message: 2 >>> >>>>> Date: Tue, 29 Sep 2015 16:55:05 +0200 >>> >>>>> From: MªLuz Morales <mlzmrls en gmail.com><mailto:mlzmrls en gmail.com> >>> >>>>> To: r-help-es <r-help-es en r-project.org><mailto: >>> r-help-es en r-project.org> >>> >>>>> Subject: [R-es] sobre fread {data.table} >>> >>>>> Message-ID: >>> >>>>> < >>> >>>>> CANmAToM+sRRTfOBRYsrgoUdxdXVtrk21_E7LE0rrb8ENmMiBqQ en mail.gmail.com >>> >>>>> ><mailto: >>> >>>>> CANmAToM+sRRTfOBRYsrgoUdxdXVtrk21_E7LE0rrb8ENmMiBqQ en mail.gmail.com >>> > >>> >>>>> Content-Type: text/plain; charset="UTF-8" >>> >>>>> >>> >>>>> Buenas tardes, >>> >>>>> >>> >>>>> intento almacenar el contenido de un archivo .docx en un >>> data.table, >>> >>>>> pero >>> >>>>> solo me devuelve 1855 filas cuando deberñian ser 6821. >>> >>>>> >>> >>>>> Sin embargo, el mismo archivo se me descarga completo usando >>> read_docx >>> >>>>> {qdapTools}, pero este devuelve un vector carácter y no es lo que >>> >>>>> quiero. >>> >>>>> >>> >>>>> ¿Alguien sabe donde puede estar el problema? >>> >>>>> >>> >>>>> Nota: El docx procede de un archivo .rel que descargué de >>> internet, al >>> >>>>> cual >>> >>>>> cambié la extensión por .doc y una vez abierto guardé como docx. >>> >>>>> >>> >>>>> Gracias!! >>> >>>>> Un saludo >>> >>>>> MªLuz >>> >>>>> >>> >>>>> >>> >>>>> -- >>> >>>>> Pedro Concejero >>> >>>>> E-mail: pedro.concejerocerezo en telefonica.com<mailto: >>> >>>>> pedro.concejerocerezo en telefonica.com> >>> >>>>> skype: pedro.concejero >>> >>>>> twitter @ConcejeroPedro<https://twitter.com/ConcejeroPedro> >>> >>>>> linkedin pedroconcejero< >>> http://www.linkedin.com/in/pedroconcejero/es> >>> >>>>> Entusiasta R, me encontraréis aquí gRupo R madRid < >>> >>>>> http://madrid.r-es.org/> >>> >>>>> >>> >>>>> >>> >>>>> -- >>> >>>>> Pedro Concejero >>> >>>>> E-mail: pedro.concejerocerezo en telefonica.com<mailto: >>> >>>>> pedro.concejerocerezo en telefonica.com> >>> >>>>> skype: pedro.concejero >>> >>>>> twitter @ConcejeroPedro<https://twitter.com/ConcejeroPedro> >>> >>>>> linkedin pedroconcejero< >>> http://www.linkedin.com/in/pedroconcejero/es> >>> >>>>> Entusiasta R, me encontraréis aquí gRupo R madRid < >>> >>>>> http://madrid.r-es.org/> >>> >>>>> >>> >>>>> ________________________________ >>> >>>>> >>> >>>>> Este mensaje y sus adjuntos se dirigen exclusivamente a su >>> >>>>> destinatario, puede contener información privilegiada o >>> confidencial y es >>> >>>>> para uso exclusivo de la persona o entidad de destino. Si no es >>> usted. el >>> >>>>> destinatario indicado, queda notificado de que la lectura, >>> utilización, >>> >>>>> divulgación y/o copia sin autorización puede estar prohibida en >>> virtud de >>> >>>>> la legislación vigente. Si ha recibido este mensaje por error, le >>> rogamos >>> >>>>> que nos lo comunique inmediatamente por esta misma vía y proceda a >>> su >>> >>>>> destrucción. >>> >>>>> >>> >>>>> The information contained in this transmission is privileged and >>> >>>>> confidential information intended only for the use of the >>> individual or >>> >>>>> entity named above. If the reader of this message is not the >>> intended >>> >>>>> recipient, you are hereby notified that any dissemination, >>> distribution or >>> >>>>> copying of this communication is strictly prohibited. If you have >>> received >>> >>>>> this transmission in error, do not read it. Please immediately >>> reply to the >>> >>>>> sender that you have received this communication in error and then >>> delete >>> >>>>> it. >>> >>>>> >>> >>>>> Esta mensagem e seus anexos se dirigem exclusivamente ao seu >>> >>>>> destinatário, pode conter informação privilegiada ou confidencial >>> e é para >>> >>>>> uso exclusivo da pessoa ou entidade de destino. Se não é vossa >>> senhoria o >>> >>>>> destinatário indicado, fica notificado de que a leitura, >>> utilização, >>> >>>>> divulgação e/ou cópia sem autorização pode estar proibida em >>> virtude da >>> >>>>> legislação vigente. Se recebeu esta mensagem por erro, rogamos-lhe >>> que nos >>> >>>>> o comunique imediatamente por esta mesma via e proceda a sua >>> destruição >>> >>>>> >>> >>>>> [[alternative HTML version deleted]] >>> >>>>> >>> >>>>> _______________________________________________ >>> >>>>> R-help-es mailing list >>> >>>>> R-help-es en r-project.org >>> >>>>> https://stat.ethz.ch/mailman/listinfo/r-help-es >>> >>>>> >>> >>>> >>> >>>> >>> >>>> >>> >>>> -- >>> >>>> Saludos, >>> >>>> Carlos Ortega >>> >>>> www.qualityexcellence.es >>> >>>> >>> >>> >>> >>> >>> >> >>> > >>> > >>> > -- >>> > Saludos, >>> > Carlos Ortega >>> > www.qualityexcellence.es >>> > >>> > [[alternative HTML version deleted]] >>> > >>> > _______________________________________________ >>> > R-help-es mailing list >>> > R-help-es en r-project.org >>> > https://stat.ethz.ch/mailman/listinfo/r-help-es >>> >> >> >[[alternative HTML version deleted]]
Hola, Ayer probé sobre Windows la 1.9.6 y me cargóel conjunto sin problemas. Comentaste que habías manipulado el fichero y algo habías quitado, puede que hayas cambiado el número de columnas en esa línea y que ahora no tenga las mismas que el resto y por eso fread da error. Si puedes pasarnos tu fichero vemos si esto es así... Gracias, Carlos Ortega www.qualityexcellence.es El 1 de octubre de 2015, 12:41, MªLuz Morales <mlzmrls en gmail.com> escribió:> Hola de nuevo, > parece que la última versión del paquete data.table es 1.9.6 > La he probado y parece que no funciona bien, me da error: > > > > Error in fread("C:/Users/iphealthMariluz/Documents/Proyecto > iphealt/ProcesamientoTexto/Adverse Drug > Event/ADE-Corpus/DRUG-AE_eliminoLinea1856.rel") : > 4 arguments passed to .Internal(nchar) which requires 3 > > > > > > El 30 de septiembre de 2015, 13:38, MªLuz Morales <mlzmrls en gmail.com> > escribió: > > > Sí, me di cuenta de que el problema era |", y he hecho la sustitución. > > Estoy usando la versión 1.9.4, sí. Voy a ver si consigo la versión 1.9.5. > > > > Muchísimas gracias a todos > > Saludos > > MªLuz > > > > > > > > El 30 de septiembre de 2015, 12:51, Carlos J. Gil Bellosta < > > cgb en datanalytics.com> escribió: > > > >> Si en la línea 1856 de tus datos reemplazas > >> > >> |"cotton-wool" spots| > >> > >> por > >> > >> |cotton-wool spots| > >> > >> funciona (y fread lee todas las línas). > >> > >> Suena a bug en el paquete (porque las comillas que no son vecinas de > >> separador las gestiona correctamente). > >> > >> Igual quieres comentarle al autor del paquete el problema para que le > >> eche un ojo. De todos modos, te recomendaría que comprobases el > >> problema también en la versión de desarrollo, la 1.9.5, por si ya se > >> ha arreglado. La actual (¿es la que usas?) es la 1.9.4. > >> > >> Salud, > >> > >> Carlos J. Gil Bellosta > >> http://www.datanalytics.com > >> > >> El día 30 de septiembre de 2015, 12:37, Carlos Ortega > >> <cof en qualityexcellence.es> escribió: > >> > No sé... alguna explicación habrá... > >> > > >> > ¿Puedes pasarnos tu fichero para ver si lo importamos correctamente > >> > nosotros?. > >> > ¿Puedes comprobar que tienes la última versión de data.table...? > >> > > >> > Gracias, > >> > Carlos Ortega > >> > www.qualityexcellence.es > >> > > >> > El 30 de septiembre de 2015, 10:37, MªLuz Morales <mlzmrls en gmail.com> > >> > escribió: > >> > > >> >> Hola de nuevo, > >> >> > >> >> el archivo .rel esta en una carpeta comprimida .zip, yo la > descomprimo > >> con > >> >> win rar. Como no sea ese el motivo por el que no me da el fichero > >> completo? > >> >> > >> >> El 30 de septiembre de 2015, 10:30, MªLuz Morales <mlzmrls en gmail.com > > > >> >> escribió: > >> >> > >> >>> Pues soy gafe entonces, > >> >>> no lo entiendo: > >> >>> > >> >>> > datIn <- fread("C:\\Users\\iphealthMariluz\\Documents\\Proyecto > >> iphealt\\ProcesamientoTexto\\Adverse Drug > Event\\ADE-Corpus\\DRUG-AE.rel")> > >> dim(datIn)[1] 1855 8 > >> >>> > >> >>> > >> >>> El 29 de septiembre de 2015, 18:54, Carlos Ortega < > >> >>> cof en qualityexcellence.es> escribió: > >> >>> > >> >>>> Y con fread.. directamente sobre el ".rel"... > >> >>>> > >> >>>> > datIn <- fread("DRUG-AE.rel") > >> >>>> > dim(datIn) > >> >>>> [1] 6821 8 > >> >>>> > >> >>>> > >> >>>> > >> >>>> Saludos, > >> >>>> Carlos Ortega > >> >>>> www.qualityexcellence.es > >> >>>> > >> >>>> > >> >>>> El 29 de septiembre de 2015, 18:45, Pedro Concejero Cerezo < > >> >>>> pedro.concejerocerezo en telefonica.com> escribió: > >> >>>> > >> >>>>> No tiene cabecera. Tendrás que ponerle nombre a las variables > >> >>>>> Prueba este código, yo leo 6821 obs. of 8 variables > >> >>>>> > >> >>>>> library(data.table) > >> >>>>> setwd("C:/Users/pedroc/Desktop/ADE-Corpus-V2") #Pon tu directorio > >> >>>>> trabajo > >> >>>>> dat <- read.table(file = "DRUG-AE.rel", > >> >>>>> sep = "|", > >> >>>>> comment.char = "", > >> >>>>> header = F, > >> >>>>> quote = "") > >> >>>>> > >> >>>>> str(dat) > >> >>>>> > >> >>>>> datt <- data.table(dat) > >> >>>>> > >> >>>>> > >> >>>>> El 29/09/2015 a las 17:31, Pedro Concejero Cerezo escribió: > >> >>>>> Hola, M. Luz. > >> >>>>> Hay infinidad de motivos por los que se te puede cortar la lectura > >> de > >> >>>>> un archivo de datos, pero los más habituales son encontrar un "#" > o > >> unas "" > >> >>>>> en los registros, o una línea toda en blanco. > >> >>>>> Lo primero yo creo que es dejar el archivo en texto plano (lo que > te > >> >>>>> recomendaba Carlos de usar el original, no el docx), y buscar esos > >> >>>>> caracteres con un editor de texto plano tipo Notepad. Los puedes > >> eliminar > >> >>>>> si no cumplen ninguna función. > >> >>>>> Yo te recomiendo usar read.table que te permite configurar estos > >> >>>>> detalles. En concreto: > >> >>>>> > >> >>>>> comment.char = "" no te corta la lectura de fichero como si fuera > >> un > >> >>>>> comentario, te lo añade a la cadena (eso si quieres usar el > >> carácter, si no > >> >>>>> elimínalo) > >> >>>>> quote = "" lo mismo con la comilla como comienzo de una cadena > >> >>>>> > >> >>>>> Pero verás que hay muchísimas más opciones que te evitan que se > >> corte > >> >>>>> la lectura (blank lines, ...) o que te rellene con NA's si no > >> encuentra > >> >>>>> todas las columnas del header (flush = TRUE). > >> >>>>> Luego pasas a data.table con data.table(objeto_que_has_leido) y ya > >> está. > >> >>>>> > >> >>>>> read.table(file, header = FALSE, sep = "", quote = "\"'", > >> >>>>> dec = ".", numerals = c("allow.loss", "warn.loss", > >> >>>>> "no.loss"), > >> >>>>> row.names, col.names, as.is = !stringsAsFactors, > >> >>>>> na.strings = "NA", colClasses = NA, nrows = -1, > >> >>>>> skip = 0, check.names = TRUE, fill = !blank.lines.skip, > >> >>>>> strip.white = FALSE, blank.lines.skip = TRUE, > >> >>>>> comment.char = "#", > >> >>>>> allowEscapes = FALSE, flush = FALSE, > >> >>>>> stringsAsFactors = default.stringsAsFactors(), > >> >>>>> fileEncoding = "", encoding = "unknown", text, skipNul > > >> >>>>> FALSE) > >> >>>>> > >> >>>>> > >> >>>>> Saludos, > >> >>>>> Pedro > >> >>>>> > >> >>>>> ============> >> >>>>> En respuesta a: > >> >>>>> > >> >>>>> ------------------------------ > >> >>>>> > >> >>>>> Message: 2 > >> >>>>> Date: Tue, 29 Sep 2015 16:55:05 +0200 > >> >>>>> From: MªLuz Morales <mlzmrls en gmail.com><mailto:mlzmrls en gmail.com> > >> >>>>> To: r-help-es <r-help-es en r-project.org><mailto: > >> r-help-es en r-project.org> > >> >>>>> Subject: [R-es] sobre fread {data.table} > >> >>>>> Message-ID: > >> >>>>> < > >> >>>>> > CANmAToM+sRRTfOBRYsrgoUdxdXVtrk21_E7LE0rrb8ENmMiBqQ en mail.gmail.com > >> >>>>> ><mailto: > >> >>>>> > CANmAToM+sRRTfOBRYsrgoUdxdXVtrk21_E7LE0rrb8ENmMiBqQ en mail.gmail.com> > >> >>>>> Content-Type: text/plain; charset="UTF-8" > >> >>>>> > >> >>>>> Buenas tardes, > >> >>>>> > >> >>>>> intento almacenar el contenido de un archivo .docx en un > data.table, > >> >>>>> pero > >> >>>>> solo me devuelve 1855 filas cuando deberñian ser 6821. > >> >>>>> > >> >>>>> Sin embargo, el mismo archivo se me descarga completo usando > >> read_docx > >> >>>>> {qdapTools}, pero este devuelve un vector carácter y no es lo que > >> >>>>> quiero. > >> >>>>> > >> >>>>> ¿Alguien sabe donde puede estar el problema? > >> >>>>> > >> >>>>> Nota: El docx procede de un archivo .rel que descargué de > internet, > >> al > >> >>>>> cual > >> >>>>> cambié la extensión por .doc y una vez abierto guardé como docx. > >> >>>>> > >> >>>>> Gracias!! > >> >>>>> Un saludo > >> >>>>> MªLuz > >> >>>>> > >> >>>>> > >> >>>>> -- > >> >>>>> Pedro Concejero > >> >>>>> E-mail: pedro.concejerocerezo en telefonica.com<mailto: > >> >>>>> pedro.concejerocerezo en telefonica.com> > >> >>>>> skype: pedro.concejero > >> >>>>> twitter @ConcejeroPedro<https://twitter.com/ConcejeroPedro> > >> >>>>> linkedin pedroconcejero< > >> http://www.linkedin.com/in/pedroconcejero/es> > >> >>>>> Entusiasta R, me encontraréis aquí gRupo R madRid < > >> >>>>> http://madrid.r-es.org/> > >> >>>>> > >> >>>>> > >> >>>>> -- > >> >>>>> Pedro Concejero > >> >>>>> E-mail: pedro.concejerocerezo en telefonica.com<mailto: > >> >>>>> pedro.concejerocerezo en telefonica.com> > >> >>>>> skype: pedro.concejero > >> >>>>> twitter @ConcejeroPedro<https://twitter.com/ConcejeroPedro> > >> >>>>> linkedin pedroconcejero< > >> http://www.linkedin.com/in/pedroconcejero/es> > >> >>>>> Entusiasta R, me encontraréis aquí gRupo R madRid < > >> >>>>> http://madrid.r-es.org/> > >> >>>>> > >> >>>>> ________________________________ > >> >>>>> > >> >>>>> Este mensaje y sus adjuntos se dirigen exclusivamente a su > >> >>>>> destinatario, puede contener información privilegiada o > >> confidencial y es > >> >>>>> para uso exclusivo de la persona o entidad de destino. Si no es > >> usted. el > >> >>>>> destinatario indicado, queda notificado de que la lectura, > >> utilización, > >> >>>>> divulgación y/o copia sin autorización puede estar prohibida en > >> virtud de > >> >>>>> la legislación vigente. Si ha recibido este mensaje por error, le > >> rogamos > >> >>>>> que nos lo comunique inmediatamente por esta misma vía y proceda a > >> su > >> >>>>> destrucción. > >> >>>>> > >> >>>>> The information contained in this transmission is privileged and > >> >>>>> confidential information intended only for the use of the > >> individual or > >> >>>>> entity named above. If the reader of this message is not the > >> intended > >> >>>>> recipient, you are hereby notified that any dissemination, > >> distribution or > >> >>>>> copying of this communication is strictly prohibited. If you have > >> received > >> >>>>> this transmission in error, do not read it. Please immediately > >> reply to the > >> >>>>> sender that you have received this communication in error and then > >> delete > >> >>>>> it. > >> >>>>> > >> >>>>> Esta mensagem e seus anexos se dirigem exclusivamente ao seu > >> >>>>> destinatário, pode conter informação privilegiada ou confidencial > e > >> é para > >> >>>>> uso exclusivo da pessoa ou entidade de destino. Se não é vossa > >> senhoria o > >> >>>>> destinatário indicado, fica notificado de que a leitura, > utilização, > >> >>>>> divulgação e/ou cópia sem autorização pode estar proibida em > >> virtude da > >> >>>>> legislação vigente. Se recebeu esta mensagem por erro, rogamos-lhe > >> que nos > >> >>>>> o comunique imediatamente por esta mesma via e proceda a sua > >> destruição > >> >>>>> > >> >>>>> [[alternative HTML version deleted]] > >> >>>>> > >> >>>>> _______________________________________________ > >> >>>>> R-help-es mailing list > >> >>>>> R-help-es en r-project.org > >> >>>>> https://stat.ethz.ch/mailman/listinfo/r-help-es > >> >>>>> > >> >>>> > >> >>>> > >> >>>> > >> >>>> -- > >> >>>> Saludos, > >> >>>> Carlos Ortega > >> >>>> www.qualityexcellence.es > >> >>>> > >> >>> > >> >>> > >> >> > >> > > >> > > >> > -- > >> > Saludos, > >> > Carlos Ortega > >> > www.qualityexcellence.es > >> > > >> > [[alternative HTML version deleted]] > >> > > >> > _______________________________________________ > >> > R-help-es mailing list > >> > R-help-es en r-project.org > >> > https://stat.ethz.ch/mailman/listinfo/r-help-es > >> > > > > > > [[alternative HTML version deleted]] > > _______________________________________________ > R-help-es mailing list > R-help-es en r-project.org > https://stat.ethz.ch/mailman/listinfo/r-help-es >-- Saludos, Carlos Ortega www.qualityexcellence.es [[alternative HTML version deleted]]
Creo que no me deja adjuntar un archivo grande. Lo envío comprimido El 1 de octubre de 2015, 16:42, MªLuz Morales <mlzmrls en gmail.com> escribió:> Hola, > este es el archivo que estoy usando, pero en ese creo que no he modificado > nada. > Me instalé las actualizaciones de todos los paquetes, quizá el problema > venga por ahí, que no sea de data.table sino de otro... > > Gracias > Un saludo > MªLuz > > El 1 de octubre de 2015, 14:34, Carlos Ortega <cof en qualityexcellence.es> > escribió: > >> Hola, >> >> Ayer probé sobre Windows la 1.9.6 y me cargóel conjunto sin problemas. >> Comentaste que habías manipulado el fichero y algo habías quitado, puede >> que hayas cambiado el número de columnas en esa línea y que ahora no tenga >> las mismas que el resto y por eso fread da error. >> >> Si puedes pasarnos tu fichero vemos si esto es así... >> >> Gracias, >> Carlos Ortega >> www.qualityexcellence.es >> >> El 1 de octubre de 2015, 12:41, MªLuz Morales <mlzmrls en gmail.com> >> escribió: >> >>> Hola de nuevo, >>> parece que la última versión del paquete data.table es 1.9.6 >>> La he probado y parece que no funciona bien, me da error: >>> >>> >>> >>> Error in fread("C:/Users/iphealthMariluz/Documents/Proyecto >>> iphealt/ProcesamientoTexto/Adverse Drug >>> Event/ADE-Corpus/DRUG-AE_eliminoLinea1856.rel") : >>> 4 arguments passed to .Internal(nchar) which requires 3 >>> >>> >>> >>> >>> >>> El 30 de septiembre de 2015, 13:38, MªLuz Morales <mlzmrls en gmail.com> >>> escribió: >>> >>> > Sí, me di cuenta de que el problema era |", y he hecho la sustitución. >>> > Estoy usando la versión 1.9.4, sí. Voy a ver si consigo la versión >>> 1.9.5. >>> > >>> > Muchísimas gracias a todos >>> > Saludos >>> > MªLuz >>> > >>> > >>> > >>> > El 30 de septiembre de 2015, 12:51, Carlos J. Gil Bellosta < >>> > cgb en datanalytics.com> escribió: >>> > >>> >> Si en la línea 1856 de tus datos reemplazas >>> >> >>> >> |"cotton-wool" spots| >>> >> >>> >> por >>> >> >>> >> |cotton-wool spots| >>> >> >>> >> funciona (y fread lee todas las línas). >>> >> >>> >> Suena a bug en el paquete (porque las comillas que no son vecinas de >>> >> separador las gestiona correctamente). >>> >> >>> >> Igual quieres comentarle al autor del paquete el problema para que le >>> >> eche un ojo. De todos modos, te recomendaría que comprobases el >>> >> problema también en la versión de desarrollo, la 1.9.5, por si ya se >>> >> ha arreglado. La actual (¿es la que usas?) es la 1.9.4. >>> >> >>> >> Salud, >>> >> >>> >> Carlos J. Gil Bellosta >>> >> http://www.datanalytics.com >>> >> >>> >> El día 30 de septiembre de 2015, 12:37, Carlos Ortega >>> >> <cof en qualityexcellence.es> escribió: >>> >> > No sé... alguna explicación habrá... >>> >> > >>> >> > ¿Puedes pasarnos tu fichero para ver si lo importamos correctamente >>> >> > nosotros?. >>> >> > ¿Puedes comprobar que tienes la última versión de data.table...? >>> >> > >>> >> > Gracias, >>> >> > Carlos Ortega >>> >> > www.qualityexcellence.es >>> >> > >>> >> > El 30 de septiembre de 2015, 10:37, MªLuz Morales < >>> mlzmrls en gmail.com> >>> >> > escribió: >>> >> > >>> >> >> Hola de nuevo, >>> >> >> >>> >> >> el archivo .rel esta en una carpeta comprimida .zip, yo la >>> descomprimo >>> >> con >>> >> >> win rar. Como no sea ese el motivo por el que no me da el fichero >>> >> completo? >>> >> >> >>> >> >> El 30 de septiembre de 2015, 10:30, MªLuz Morales < >>> mlzmrls en gmail.com> >>> >> >> escribió: >>> >> >> >>> >> >>> Pues soy gafe entonces, >>> >> >>> no lo entiendo: >>> >> >>> >>> >> >>> > datIn <- fread("C:\\Users\\iphealthMariluz\\Documents\\Proyecto >>> >> iphealt\\ProcesamientoTexto\\Adverse Drug >>> Event\\ADE-Corpus\\DRUG-AE.rel")> >>> >> dim(datIn)[1] 1855 8 >>> >> >>> >>> >> >>> >>> >> >>> El 29 de septiembre de 2015, 18:54, Carlos Ortega < >>> >> >>> cof en qualityexcellence.es> escribió: >>> >> >>> >>> >> >>>> Y con fread.. directamente sobre el ".rel"... >>> >> >>>> >>> >> >>>> > datIn <- fread("DRUG-AE.rel") >>> >> >>>> > dim(datIn) >>> >> >>>> [1] 6821 8 >>> >> >>>> >>> >> >>>> >>> >> >>>> >>> >> >>>> Saludos, >>> >> >>>> Carlos Ortega >>> >> >>>> www.qualityexcellence.es >>> >> >>>> >>> >> >>>> >>> >> >>>> El 29 de septiembre de 2015, 18:45, Pedro Concejero Cerezo < >>> >> >>>> pedro.concejerocerezo en telefonica.com> escribió: >>> >> >>>> >>> >> >>>>> No tiene cabecera. Tendrás que ponerle nombre a las variables >>> >> >>>>> Prueba este código, yo leo 6821 obs. of 8 variables >>> >> >>>>> >>> >> >>>>> library(data.table) >>> >> >>>>> setwd("C:/Users/pedroc/Desktop/ADE-Corpus-V2") #Pon tu >>> directorio >>> >> >>>>> trabajo >>> >> >>>>> dat <- read.table(file = "DRUG-AE.rel", >>> >> >>>>> sep = "|", >>> >> >>>>> comment.char = "", >>> >> >>>>> header = F, >>> >> >>>>> quote = "") >>> >> >>>>> >>> >> >>>>> str(dat) >>> >> >>>>> >>> >> >>>>> datt <- data.table(dat) >>> >> >>>>> >>> >> >>>>> >>> >> >>>>> El 29/09/2015 a las 17:31, Pedro Concejero Cerezo escribió: >>> >> >>>>> Hola, M. Luz. >>> >> >>>>> Hay infinidad de motivos por los que se te puede cortar la >>> lectura >>> >> de >>> >> >>>>> un archivo de datos, pero los más habituales son encontrar un >>> "#" o >>> >> unas "" >>> >> >>>>> en los registros, o una línea toda en blanco. >>> >> >>>>> Lo primero yo creo que es dejar el archivo en texto plano (lo >>> que te >>> >> >>>>> recomendaba Carlos de usar el original, no el docx), y buscar >>> esos >>> >> >>>>> caracteres con un editor de texto plano tipo Notepad. Los puedes >>> >> eliminar >>> >> >>>>> si no cumplen ninguna función. >>> >> >>>>> Yo te recomiendo usar read.table que te permite configurar estos >>> >> >>>>> detalles. En concreto: >>> >> >>>>> >>> >> >>>>> comment.char = "" no te corta la lectura de fichero como si >>> fuera >>> >> un >>> >> >>>>> comentario, te lo añade a la cadena (eso si quieres usar el >>> >> carácter, si no >>> >> >>>>> elimínalo) >>> >> >>>>> quote = "" lo mismo con la comilla como comienzo de una cadena >>> >> >>>>> >>> >> >>>>> Pero verás que hay muchísimas más opciones que te evitan que se >>> >> corte >>> >> >>>>> la lectura (blank lines, ...) o que te rellene con NA's si no >>> >> encuentra >>> >> >>>>> todas las columnas del header (flush = TRUE). >>> >> >>>>> Luego pasas a data.table con data.table(objeto_que_has_leido) y >>> ya >>> >> está. >>> >> >>>>> >>> >> >>>>> read.table(file, header = FALSE, sep = "", quote = "\"'", >>> >> >>>>> dec = ".", numerals = c("allow.loss", "warn.loss", >>> >> >>>>> "no.loss"), >>> >> >>>>> row.names, col.names, as.is = !stringsAsFactors, >>> >> >>>>> na.strings = "NA", colClasses = NA, nrows = -1, >>> >> >>>>> skip = 0, check.names = TRUE, fill >>> !blank.lines.skip, >>> >> >>>>> strip.white = FALSE, blank.lines.skip = TRUE, >>> >> >>>>> comment.char = "#", >>> >> >>>>> allowEscapes = FALSE, flush = FALSE, >>> >> >>>>> stringsAsFactors = default.stringsAsFactors(), >>> >> >>>>> fileEncoding = "", encoding = "unknown", text, >>> skipNul >>> >> >>>>> FALSE) >>> >> >>>>> >>> >> >>>>> >>> >> >>>>> Saludos, >>> >> >>>>> Pedro >>> >> >>>>> >>> >> >>>>> ============>>> >> >>>>> En respuesta a: >>> >> >>>>> >>> >> >>>>> ------------------------------ >>> >> >>>>> >>> >> >>>>> Message: 2 >>> >> >>>>> Date: Tue, 29 Sep 2015 16:55:05 +0200 >>> >> >>>>> From: MªLuz Morales <mlzmrls en gmail.com><mailto: >>> mlzmrls en gmail.com> >>> >> >>>>> To: r-help-es <r-help-es en r-project.org><mailto: >>> >> r-help-es en r-project.org> >>> >> >>>>> Subject: [R-es] sobre fread {data.table} >>> >> >>>>> Message-ID: >>> >> >>>>> < >>> >> >>>>> >>> CANmAToM+sRRTfOBRYsrgoUdxdXVtrk21_E7LE0rrb8ENmMiBqQ en mail.gmail.com >>> >> >>>>> ><mailto: >>> >> >>>>> >>> CANmAToM+sRRTfOBRYsrgoUdxdXVtrk21_E7LE0rrb8ENmMiBqQ en mail.gmail.com> >>> >> >>>>> Content-Type: text/plain; charset="UTF-8" >>> >> >>>>> >>> >> >>>>> Buenas tardes, >>> >> >>>>> >>> >> >>>>> intento almacenar el contenido de un archivo .docx en un >>> data.table, >>> >> >>>>> pero >>> >> >>>>> solo me devuelve 1855 filas cuando deberñian ser 6821. >>> >> >>>>> >>> >> >>>>> Sin embargo, el mismo archivo se me descarga completo usando >>> >> read_docx >>> >> >>>>> {qdapTools}, pero este devuelve un vector carácter y no es lo >>> que >>> >> >>>>> quiero. >>> >> >>>>> >>> >> >>>>> ¿Alguien sabe donde puede estar el problema? >>> >> >>>>> >>> >> >>>>> Nota: El docx procede de un archivo .rel que descargué de >>> internet, >>> >> al >>> >> >>>>> cual >>> >> >>>>> cambié la extensión por .doc y una vez abierto guardé como docx. >>> >> >>>>> >>> >> >>>>> Gracias!! >>> >> >>>>> Un saludo >>> >> >>>>> MªLuz >>> >> >>>>> >>> >> >>>>> >>> >> >>>>> -- >>> >> >>>>> Pedro Concejero >>> >> >>>>> E-mail: pedro.concejerocerezo en telefonica.com<mailto: >>> >> >>>>> pedro.concejerocerezo en telefonica.com> >>> >> >>>>> skype: pedro.concejero >>> >> >>>>> twitter @ConcejeroPedro<https://twitter.com/ConcejeroPedro> >>> >> >>>>> linkedin pedroconcejero< >>> >> http://www.linkedin.com/in/pedroconcejero/es> >>> >> >>>>> Entusiasta R, me encontraréis aquí gRupo R madRid < >>> >> >>>>> http://madrid.r-es.org/> >>> >> >>>>> >>> >> >>>>> >>> >> >>>>> -- >>> >> >>>>> Pedro Concejero >>> >> >>>>> E-mail: pedro.concejerocerezo en telefonica.com<mailto: >>> >> >>>>> pedro.concejerocerezo en telefonica.com> >>> >> >>>>> skype: pedro.concejero >>> >> >>>>> twitter @ConcejeroPedro<https://twitter.com/ConcejeroPedro> >>> >> >>>>> linkedin pedroconcejero< >>> >> http://www.linkedin.com/in/pedroconcejero/es> >>> >> >>>>> Entusiasta R, me encontraréis aquí gRupo R madRid < >>> >> >>>>> http://madrid.r-es.org/> >>> >> >>>>> >>> >> >>>>> ________________________________ >>> >> >>>>> >>> >> >>>>> Este mensaje y sus adjuntos se dirigen exclusivamente a su >>> >> >>>>> destinatario, puede contener información privilegiada o >>> >> confidencial y es >>> >> >>>>> para uso exclusivo de la persona o entidad de destino. Si no es >>> >> usted. el >>> >> >>>>> destinatario indicado, queda notificado de que la lectura, >>> >> utilización, >>> >> >>>>> divulgación y/o copia sin autorización puede estar prohibida en >>> >> virtud de >>> >> >>>>> la legislación vigente. Si ha recibido este mensaje por error, >>> le >>> >> rogamos >>> >> >>>>> que nos lo comunique inmediatamente por esta misma vía y >>> proceda a >>> >> su >>> >> >>>>> destrucción. >>> >> >>>>> >>> >> >>>>> The information contained in this transmission is privileged and >>> >> >>>>> confidential information intended only for the use of the >>> >> individual or >>> >> >>>>> entity named above. If the reader of this message is not the >>> >> intended >>> >> >>>>> recipient, you are hereby notified that any dissemination, >>> >> distribution or >>> >> >>>>> copying of this communication is strictly prohibited. If you >>> have >>> >> received >>> >> >>>>> this transmission in error, do not read it. Please immediately >>> >> reply to the >>> >> >>>>> sender that you have received this communication in error and >>> then >>> >> delete >>> >> >>>>> it. >>> >> >>>>> >>> >> >>>>> Esta mensagem e seus anexos se dirigem exclusivamente ao seu >>> >> >>>>> destinatário, pode conter informação privilegiada ou >>> confidencial e >>> >> é para >>> >> >>>>> uso exclusivo da pessoa ou entidade de destino. Se não é vossa >>> >> senhoria o >>> >> >>>>> destinatário indicado, fica notificado de que a leitura, >>> utilização, >>> >> >>>>> divulgação e/ou cópia sem autorização pode estar proibida em >>> >> virtude da >>> >> >>>>> legislação vigente. Se recebeu esta mensagem por erro, >>> rogamos-lhe >>> >> que nos >>> >> >>>>> o comunique imediatamente por esta mesma via e proceda a sua >>> >> destruição >>> >> >>>>> >>> >> >>>>> [[alternative HTML version deleted]] >>> >> >>>>> >>> >> >>>>> _______________________________________________ >>> >> >>>>> R-help-es mailing list >>> >> >>>>> R-help-es en r-project.org >>> >> >>>>> https://stat.ethz.ch/mailman/listinfo/r-help-es >>> >> >>>>> >>> >> >>>> >>> >> >>>> >>> >> >>>> >>> >> >>>> -- >>> >> >>>> Saludos, >>> >> >>>> Carlos Ortega >>> >> >>>> www.qualityexcellence.es >>> >> >>>> >>> >> >>> >>> >> >>> >>> >> >> >>> >> > >>> >> > >>> >> > -- >>> >> > Saludos, >>> >> > Carlos Ortega >>> >> > www.qualityexcellence.es >>> >> > >>> >> > [[alternative HTML version deleted]] >>> >> > >>> >> > _______________________________________________ >>> >> > R-help-es mailing list >>> >> > R-help-es en r-project.org >>> >> > https://stat.ethz.ch/mailman/listinfo/r-help-es >>> >> >>> > >>> > >>> >>> [[alternative HTML version deleted]] >>> >>> _______________________________________________ >>> R-help-es mailing list >>> R-help-es en r-project.org >>> https://stat.ethz.ch/mailman/listinfo/r-help-es >>> >> >> >> >> -- >> Saludos, >> Carlos Ortega >> www.qualityexcellence.es >> > >------------ próxima parte ------------ Se ha borrado un adjunto en formato HTML... URL: <https://stat.ethz.ch/pipermail/r-help-es/attachments/20151001/c028d0b7/attachment-0001.html> ------------ próxima parte ------------ A non-text attachment was scrubbed... Name: DRUG-AE.rar Type: application/rar Size: 246389 bytes Desc: no disponible URL: <https://stat.ethz.ch/pipermail/r-help-es/attachments/20151001/c028d0b7/attachment-0001.bin>
Hola, Me llegó el primero sin problemas. - Me sigue funcionando en Mac, sin ningún tipo de problemas. - Opciones: - Prueba con la alternativa que te comentó ayer Pedro (la vuelvo a incluir), que funciona perfectamente también. - Y si quieres seguir con "fread", vuelve a iniciar sesión en RStudio, no cargues ningún paquete, elimina fread y vuelve a instalarlo. Prueba a cargar el fichero otra vez. #-------------------------------------------------- dat <- read.table(file = "DRUG-AE.rel", sep = "|", comment.char = "", header = F, quote = "") El 1 de octubre de 2015, 17:39, MªLuz Morales <mlzmrls en gmail.com> escribió:> Creo que no me deja adjuntar un archivo grande. Lo envío comprimido > > El 1 de octubre de 2015, 16:42, MªLuz Morales <mlzmrls en gmail.com> > escribió: > >> Hola, >> este es el archivo que estoy usando, pero en ese creo que no he >> modificado nada. >> Me instalé las actualizaciones de todos los paquetes, quizá el problema >> venga por ahí, que no sea de data.table sino de otro... >> >> Gracias >> Un saludo >> MªLuz >> >> El 1 de octubre de 2015, 14:34, Carlos Ortega <cof en qualityexcellence.es> >> escribió: >> >>> Hola, >>> >>> Ayer probé sobre Windows la 1.9.6 y me cargóel conjunto sin problemas. >>> Comentaste que habías manipulado el fichero y algo habías quitado, puede >>> que hayas cambiado el número de columnas en esa línea y que ahora no tenga >>> las mismas que el resto y por eso fread da error. >>> >>> Si puedes pasarnos tu fichero vemos si esto es así... >>> >>> Gracias, >>> Carlos Ortega >>> www.qualityexcellence.es >>> >>> El 1 de octubre de 2015, 12:41, MªLuz Morales <mlzmrls en gmail.com> >>> escribió: >>> >>>> Hola de nuevo, >>>> parece que la última versión del paquete data.table es 1.9.6 >>>> La he probado y parece que no funciona bien, me da error: >>>> >>>> >>>> >>>> Error in fread("C:/Users/iphealthMariluz/Documents/Proyecto >>>> iphealt/ProcesamientoTexto/Adverse Drug >>>> Event/ADE-Corpus/DRUG-AE_eliminoLinea1856.rel") : >>>> 4 arguments passed to .Internal(nchar) which requires 3 >>>> >>>> >>>> >>>> >>>> >>>> El 30 de septiembre de 2015, 13:38, MªLuz Morales <mlzmrls en gmail.com> >>>> escribió: >>>> >>>> > Sí, me di cuenta de que el problema era |", y he hecho la sustitución. >>>> > Estoy usando la versión 1.9.4, sí. Voy a ver si consigo la versión >>>> 1.9.5. >>>> > >>>> > Muchísimas gracias a todos >>>> > Saludos >>>> > MªLuz >>>> > >>>> > >>>> > >>>> > El 30 de septiembre de 2015, 12:51, Carlos J. Gil Bellosta < >>>> > cgb en datanalytics.com> escribió: >>>> > >>>> >> Si en la línea 1856 de tus datos reemplazas >>>> >> >>>> >> |"cotton-wool" spots| >>>> >> >>>> >> por >>>> >> >>>> >> |cotton-wool spots| >>>> >> >>>> >> funciona (y fread lee todas las línas). >>>> >> >>>> >> Suena a bug en el paquete (porque las comillas que no son vecinas de >>>> >> separador las gestiona correctamente). >>>> >> >>>> >> Igual quieres comentarle al autor del paquete el problema para que le >>>> >> eche un ojo. De todos modos, te recomendaría que comprobases el >>>> >> problema también en la versión de desarrollo, la 1.9.5, por si ya se >>>> >> ha arreglado. La actual (¿es la que usas?) es la 1.9.4. >>>> >> >>>> >> Salud, >>>> >> >>>> >> Carlos J. Gil Bellosta >>>> >> http://www.datanalytics.com >>>> >> >>>> >> El día 30 de septiembre de 2015, 12:37, Carlos Ortega >>>> >> <cof en qualityexcellence.es> escribió: >>>> >> > No sé... alguna explicación habrá... >>>> >> > >>>> >> > ¿Puedes pasarnos tu fichero para ver si lo importamos correctamente >>>> >> > nosotros?. >>>> >> > ¿Puedes comprobar que tienes la última versión de data.table...? >>>> >> > >>>> >> > Gracias, >>>> >> > Carlos Ortega >>>> >> > www.qualityexcellence.es >>>> >> > >>>> >> > El 30 de septiembre de 2015, 10:37, MªLuz Morales < >>>> mlzmrls en gmail.com> >>>> >> > escribió: >>>> >> > >>>> >> >> Hola de nuevo, >>>> >> >> >>>> >> >> el archivo .rel esta en una carpeta comprimida .zip, yo la >>>> descomprimo >>>> >> con >>>> >> >> win rar. Como no sea ese el motivo por el que no me da el fichero >>>> >> completo? >>>> >> >> >>>> >> >> El 30 de septiembre de 2015, 10:30, MªLuz Morales < >>>> mlzmrls en gmail.com> >>>> >> >> escribió: >>>> >> >> >>>> >> >>> Pues soy gafe entonces, >>>> >> >>> no lo entiendo: >>>> >> >>> >>>> >> >>> > datIn <- fread("C:\\Users\\iphealthMariluz\\Documents\\Proyecto >>>> >> iphealt\\ProcesamientoTexto\\Adverse Drug >>>> Event\\ADE-Corpus\\DRUG-AE.rel")> >>>> >> dim(datIn)[1] 1855 8 >>>> >> >>> >>>> >> >>> >>>> >> >>> El 29 de septiembre de 2015, 18:54, Carlos Ortega < >>>> >> >>> cof en qualityexcellence.es> escribió: >>>> >> >>> >>>> >> >>>> Y con fread.. directamente sobre el ".rel"... >>>> >> >>>> >>>> >> >>>> > datIn <- fread("DRUG-AE.rel") >>>> >> >>>> > dim(datIn) >>>> >> >>>> [1] 6821 8 >>>> >> >>>> >>>> >> >>>> >>>> >> >>>> >>>> >> >>>> Saludos, >>>> >> >>>> Carlos Ortega >>>> >> >>>> www.qualityexcellence.es >>>> >> >>>> >>>> >> >>>> >>>> >> >>>> El 29 de septiembre de 2015, 18:45, Pedro Concejero Cerezo < >>>> >> >>>> pedro.concejerocerezo en telefonica.com> escribió: >>>> >> >>>> >>>> >> >>>>> No tiene cabecera. Tendrás que ponerle nombre a las variables >>>> >> >>>>> Prueba este código, yo leo 6821 obs. of 8 variables >>>> >> >>>>> >>>> >> >>>>> library(data.table) >>>> >> >>>>> setwd("C:/Users/pedroc/Desktop/ADE-Corpus-V2") #Pon tu >>>> directorio >>>> >> >>>>> trabajo >>>> >> >>>>> dat <- read.table(file = "DRUG-AE.rel", >>>> >> >>>>> sep = "|", >>>> >> >>>>> comment.char = "", >>>> >> >>>>> header = F, >>>> >> >>>>> quote = "") >>>> >> >>>>> >>>> >> >>>>> str(dat) >>>> >> >>>>> >>>> >> >>>>> datt <- data.table(dat) >>>> >> >>>>> >>>> >> >>>>> >>>> >> >>>>> El 29/09/2015 a las 17:31, Pedro Concejero Cerezo escribió: >>>> >> >>>>> Hola, M. Luz. >>>> >> >>>>> Hay infinidad de motivos por los que se te puede cortar la >>>> lectura >>>> >> de >>>> >> >>>>> un archivo de datos, pero los más habituales son encontrar un >>>> "#" o >>>> >> unas "" >>>> >> >>>>> en los registros, o una línea toda en blanco. >>>> >> >>>>> Lo primero yo creo que es dejar el archivo en texto plano (lo >>>> que te >>>> >> >>>>> recomendaba Carlos de usar el original, no el docx), y buscar >>>> esos >>>> >> >>>>> caracteres con un editor de texto plano tipo Notepad. Los >>>> puedes >>>> >> eliminar >>>> >> >>>>> si no cumplen ninguna función. >>>> >> >>>>> Yo te recomiendo usar read.table que te permite configurar >>>> estos >>>> >> >>>>> detalles. En concreto: >>>> >> >>>>> >>>> >> >>>>> comment.char = "" no te corta la lectura de fichero como si >>>> fuera >>>> >> un >>>> >> >>>>> comentario, te lo añade a la cadena (eso si quieres usar el >>>> >> carácter, si no >>>> >> >>>>> elimínalo) >>>> >> >>>>> quote = "" lo mismo con la comilla como comienzo de una cadena >>>> >> >>>>> >>>> >> >>>>> Pero verás que hay muchísimas más opciones que te evitan que se >>>> >> corte >>>> >> >>>>> la lectura (blank lines, ...) o que te rellene con NA's si no >>>> >> encuentra >>>> >> >>>>> todas las columnas del header (flush = TRUE). >>>> >> >>>>> Luego pasas a data.table con data.table(objeto_que_has_leido) >>>> y ya >>>> >> está. >>>> >> >>>>> >>>> >> >>>>> read.table(file, header = FALSE, sep = "", quote = "\"'", >>>> >> >>>>> dec = ".", numerals = c("allow.loss", "warn.loss", >>>> >> >>>>> "no.loss"), >>>> >> >>>>> row.names, col.names, as.is = !stringsAsFactors, >>>> >> >>>>> na.strings = "NA", colClasses = NA, nrows = -1, >>>> >> >>>>> skip = 0, check.names = TRUE, fill >>>> !blank.lines.skip, >>>> >> >>>>> strip.white = FALSE, blank.lines.skip = TRUE, >>>> >> >>>>> comment.char = "#", >>>> >> >>>>> allowEscapes = FALSE, flush = FALSE, >>>> >> >>>>> stringsAsFactors = default.stringsAsFactors(), >>>> >> >>>>> fileEncoding = "", encoding = "unknown", text, >>>> skipNul >>>> >> >>>>> FALSE) >>>> >> >>>>> >>>> >> >>>>> >>>> >> >>>>> Saludos, >>>> >> >>>>> Pedro >>>> >> >>>>> >>>> >> >>>>> ============>>>> >> >>>>> En respuesta a: >>>> >> >>>>> >>>> >> >>>>> ------------------------------ >>>> >> >>>>> >>>> >> >>>>> Message: 2 >>>> >> >>>>> Date: Tue, 29 Sep 2015 16:55:05 +0200 >>>> >> >>>>> From: MªLuz Morales <mlzmrls en gmail.com><mailto: >>>> mlzmrls en gmail.com> >>>> >> >>>>> To: r-help-es <r-help-es en r-project.org><mailto: >>>> >> r-help-es en r-project.org> >>>> >> >>>>> Subject: [R-es] sobre fread {data.table} >>>> >> >>>>> Message-ID: >>>> >> >>>>> < >>>> >> >>>>> >>>> CANmAToM+sRRTfOBRYsrgoUdxdXVtrk21_E7LE0rrb8ENmMiBqQ en mail.gmail.com >>>> >> >>>>> ><mailto: >>>> >> >>>>> >>>> CANmAToM+sRRTfOBRYsrgoUdxdXVtrk21_E7LE0rrb8ENmMiBqQ en mail.gmail.com> >>>> >> >>>>> Content-Type: text/plain; charset="UTF-8" >>>> >> >>>>> >>>> >> >>>>> Buenas tardes, >>>> >> >>>>> >>>> >> >>>>> intento almacenar el contenido de un archivo .docx en un >>>> data.table, >>>> >> >>>>> pero >>>> >> >>>>> solo me devuelve 1855 filas cuando deberñian ser 6821. >>>> >> >>>>> >>>> >> >>>>> Sin embargo, el mismo archivo se me descarga completo usando >>>> >> read_docx >>>> >> >>>>> {qdapTools}, pero este devuelve un vector carácter y no es lo >>>> que >>>> >> >>>>> quiero. >>>> >> >>>>> >>>> >> >>>>> ¿Alguien sabe donde puede estar el problema? >>>> >> >>>>> >>>> >> >>>>> Nota: El docx procede de un archivo .rel que descargué de >>>> internet, >>>> >> al >>>> >> >>>>> cual >>>> >> >>>>> cambié la extensión por .doc y una vez abierto guardé como >>>> docx. >>>> >> >>>>> >>>> >> >>>>> Gracias!! >>>> >> >>>>> Un saludo >>>> >> >>>>> MªLuz >>>> >> >>>>> >>>> >> >>>>> >>>> >> >>>>> -- >>>> >> >>>>> Pedro Concejero >>>> >> >>>>> E-mail: pedro.concejerocerezo en telefonica.com<mailto: >>>> >> >>>>> pedro.concejerocerezo en telefonica.com> >>>> >> >>>>> skype: pedro.concejero >>>> >> >>>>> twitter @ConcejeroPedro<https://twitter.com/ConcejeroPedro> >>>> >> >>>>> linkedin pedroconcejero< >>>> >> http://www.linkedin.com/in/pedroconcejero/es> >>>> >> >>>>> Entusiasta R, me encontraréis aquí gRupo R madRid < >>>> >> >>>>> http://madrid.r-es.org/> >>>> >> >>>>> >>>> >> >>>>> >>>> >> >>>>> -- >>>> >> >>>>> Pedro Concejero >>>> >> >>>>> E-mail: pedro.concejerocerezo en telefonica.com<mailto: >>>> >> >>>>> pedro.concejerocerezo en telefonica.com> >>>> >> >>>>> skype: pedro.concejero >>>> >> >>>>> twitter @ConcejeroPedro<https://twitter.com/ConcejeroPedro> >>>> >> >>>>> linkedin pedroconcejero< >>>> >> http://www.linkedin.com/in/pedroconcejero/es> >>>> >> >>>>> Entusiasta R, me encontraréis aquí gRupo R madRid < >>>> >> >>>>> http://madrid.r-es.org/> >>>> >> >>>>> >>>> >> >>>>> ________________________________ >>>> >> >>>>> >>>> >> >>>>> Este mensaje y sus adjuntos se dirigen exclusivamente a su >>>> >> >>>>> destinatario, puede contener información privilegiada o >>>> >> confidencial y es >>>> >> >>>>> para uso exclusivo de la persona o entidad de destino. Si no es >>>> >> usted. el >>>> >> >>>>> destinatario indicado, queda notificado de que la lectura, >>>> >> utilización, >>>> >> >>>>> divulgación y/o copia sin autorización puede estar prohibida en >>>> >> virtud de >>>> >> >>>>> la legislación vigente. Si ha recibido este mensaje por error, >>>> le >>>> >> rogamos >>>> >> >>>>> que nos lo comunique inmediatamente por esta misma vía y >>>> proceda a >>>> >> su >>>> >> >>>>> destrucción. >>>> >> >>>>> >>>> >> >>>>> The information contained in this transmission is privileged >>>> and >>>> >> >>>>> confidential information intended only for the use of the >>>> >> individual or >>>> >> >>>>> entity named above. If the reader of this message is not the >>>> >> intended >>>> >> >>>>> recipient, you are hereby notified that any dissemination, >>>> >> distribution or >>>> >> >>>>> copying of this communication is strictly prohibited. If you >>>> have >>>> >> received >>>> >> >>>>> this transmission in error, do not read it. Please immediately >>>> >> reply to the >>>> >> >>>>> sender that you have received this communication in error and >>>> then >>>> >> delete >>>> >> >>>>> it. >>>> >> >>>>> >>>> >> >>>>> Esta mensagem e seus anexos se dirigem exclusivamente ao seu >>>> >> >>>>> destinatário, pode conter informação privilegiada ou >>>> confidencial e >>>> >> é para >>>> >> >>>>> uso exclusivo da pessoa ou entidade de destino. Se não é vossa >>>> >> senhoria o >>>> >> >>>>> destinatário indicado, fica notificado de que a leitura, >>>> utilização, >>>> >> >>>>> divulgação e/ou cópia sem autorização pode estar proibida em >>>> >> virtude da >>>> >> >>>>> legislação vigente. Se recebeu esta mensagem por erro, >>>> rogamos-lhe >>>> >> que nos >>>> >> >>>>> o comunique imediatamente por esta mesma via e proceda a sua >>>> >> destruição >>>> >> >>>>> >>>> >> >>>>> [[alternative HTML version deleted]] >>>> >> >>>>> >>>> >> >>>>> _______________________________________________ >>>> >> >>>>> R-help-es mailing list >>>> >> >>>>> R-help-es en r-project.org >>>> >> >>>>> https://stat.ethz.ch/mailman/listinfo/r-help-es >>>> >> >>>>> >>>> >> >>>> >>>> >> >>>> >>>> >> >>>> >>>> >> >>>> -- >>>> >> >>>> Saludos, >>>> >> >>>> Carlos Ortega >>>> >> >>>> www.qualityexcellence.es >>>> >> >>>> >>>> >> >>> >>>> >> >>> >>>> >> >> >>>> >> > >>>> >> > >>>> >> > -- >>>> >> > Saludos, >>>> >> > Carlos Ortega >>>> >> > www.qualityexcellence.es >>>> >> > >>>> >> > [[alternative HTML version deleted]] >>>> >> > >>>> >> > _______________________________________________ >>>> >> > R-help-es mailing list >>>> >> > R-help-es en r-project.org >>>> >> > https://stat.ethz.ch/mailman/listinfo/r-help-es >>>> >> >>>> > >>>> > >>>> >>>> [[alternative HTML version deleted]] >>>> >>>> _______________________________________________ >>>> R-help-es mailing list >>>> R-help-es en r-project.org >>>> https://stat.ethz.ch/mailman/listinfo/r-help-es >>>> >>> >>> >>> >>> -- >>> Saludos, >>> Carlos Ortega >>> www.qualityexcellence.es >>> >> >> >-- Saludos, Carlos Ortega www.qualityexcellence.es [[alternative HTML version deleted]]