Weird behavior of as_list() output

Abierto
#354 9 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Necesita aclaración
Estado de actividad
Estancado
Stack tecnológico
r
Área
data

Línea de trabajo

The report names read_xml() and as_list() but provides no reproducible XML, R code, file, or test. Start by constructing a minimal XML example and comparing the source with the list returned by as_list(). Done means distinct XML items retain their correct lengths and values, with a regression test for the behavior.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

reprex

When converting an xml that is read into R using read_xml() into an R list using 'as_list()' the list structure details are correct but the each list item is actually the same and does not follow what the details suggest. I am going to insert a picture to help explain:
Screen Shot 2021-11-12 at 8 14 44 AM

The displayed "list of length " under the value column are correct, however when you expand as shown in the image the lengths are not actually what R says it should be. You can see this in the second and fifth "sec"s that I expanded in the attached screenshot. Moreover, all the list items are exactly the same as the first list item, this is not the case in the actual XML nor is it the case before using the as_list() function.

Any help would be greatly appreciated thank you.

Lenguaje dominante
R
Estrellas
227
Forks
86
Métricas de merge de PR
Sin PR fusionados en 30 d

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de r-lib/xml2

Todos los issues de r-lib/xml2

Issues similares

Más issues de R

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.