У меня есть data.frame, который состоит из строк, каждый из которых является URL-адресом, но формат его при запуске «typeof» представляет собой список. Это создает некоторые проблемы, когда я пытаюсь привязать его к другим data.frames, которые являются символьными или числовыми c форматами. Я пытаюсь преобразовать этот data.frame, который показывает список с уровнями факторов для каждой строки, в стандартный data.frame, в котором каждый URL-адрес не поврежден, занимая каждую строку (длина неизменна).
Я пробовал следующее:
test <- as.character (web3) - <strong>Это оставляет меня с вектором, который является просто числами и больше не похож на то, с чего я начал
test <- lapply (web3, data.frame, stringsAsFactors = FALSE) test2 <- rbind.fill (test) </p>
Вот dput его части:
structure(c(35L, 35L, 34L, 33L, 33L, 33L, 32L, 32L, 32L, 32L), .Label = c("/Archives/edgar/data/0001218981/000117911016022379/0001179110-16-022379-index.htm",
"/Archives/edgar/data/0001218981/000117911016028590/0001179110-16-028590-index.htm",
"/Archives/edgar/data/0001218981/000117911016028764/0001179110-16-028764-index.htm",
"/Archives/edgar/data/0001218981/000117911016028975/0001179110-16-028975-index.htm",
"/Archives/edgar/data/0001218981/000117911016029122/0001179110-16-029122-index.htm",
"/Archives/edgar/data/0001218981/000117911016030044/0001179110-16-030044-index.htm",
"/Archives/edgar/data/0001218981/000117911016031144/0001179110-16-031144-index.htm",
"/Archives/edgar/data/0001218981/000117911016032519/0001179110-16-032519-index.htm",
"/Archives/edgar/data/0001218981/000117911017003489/0001179110-17-003489-index.htm",
"/Archives/edgar/data/0001218981/000117911017009339/0001179110-17-009339-index.htm",
"/Archives/edgar/data/0001218981/000117911017009836/0001179110-17-009836-index.htm",
"/Archives/edgar/data/0001218981/000117911017011451/0001179110-17-011451-index.htm",
"/Archives/edgar/data/0001218981/000117911017011684/0001179110-17-011684-index.htm",
"/Archives/edgar/data/0001218981/000117911017011782/0001179110-17-011782-index.htm",
"/Archives/edgar/data/0001218981/000117911017013512/0001179110-17-013512-index.htm",
"/Archives/edgar/data/0001218981/000117911017013668/0001179110-17-013668-index.htm",
"/Archives/edgar/data/0001218981/000117911017013817/0001179110-17-013817-index.htm",
"/Archives/edgar/data/0001218981/000117911017014024/0001179110-17-014024-index.htm",
"/Archives/edgar/data/0001218981/000117911017014676/0001179110-17-014676-index.htm",
"/Archives/edgar/data/0001218981/000117911017015379/0001179110-17-015379-index.htm",
"/Archives/edgar/data/0001218981/000117911018004779/0001179110-18-004779-index.htm",
"/Archives/edgar/data/0001218981/000117911018008826/0001179110-18-008826-index.htm",
"/Archives/edgar/data/0001218981/000117911018009648/0001179110-18-009648-index.htm",
"/Archives/edgar/data/0001218981/000117911018009739/0001179110-18-009739-index.htm",
"/Archives/edgar/data/0001218981/000117911018011490/0001179110-18-011490-index.htm",
"/Archives/edgar/data/0001218981/000117911019004050/0001179110-19-004050-index.htm",
"/Archives/edgar/data/0001218981/000117911019004286/0001179110-19-004286-index.htm",
"/Archives/edgar/data/0001218981/000117911019004323/0001179110-19-004323-index.htm",
"/Archives/edgar/data/0001218981/000117911019005598/0001179110-19-005598-index.htm",
"/Archives/edgar/data/0001218981/000117911019007384/0001179110-19-007384-index.htm",
"/Archives/edgar/data/0001218981/000117911019012669/0001179110-19-012669-index.htm",
"/Archives/edgar/data/0001218981/000117911019013159/0001179110-19-013159-index.htm",
"/Archives/edgar/data/0001218981/000117911020000425/0001179110-20-000425-index.htm",
"/Archives/edgar/data/0001218981/000117911020004224/0001179110-20-004224-index.htm",
"/Archives/edgar/data/0001218981/000117911020004802/0001179110-20-004802-index.htm",
"/Archives/edgar/data/0001218981/000120919115082536/0001209191-15-082536-index.htm",
"/Archives/edgar/data/0001218981/000120919115083517/0001209191-15-083517-index.htm",
"/Archives/edgar/data/0001218981/000120919116095084/0001209191-16-095084-index.htm",
"/cgi-bin/browse-edgar?action=getcompany&CIK=0001015739", "/cgi-bin/browse-edgar?action=getcompany&CIK=0001218981&owner=include",
"/cgi-bin/browse-edgar?action=getcompany&CIK=0001326732", "/cgi-bin/browse-edgar?action=getcurrent",
"/cgi-bin/own-disp?action=getissuer&CIK=0001015739", "/cgi-bin/own-disp?action=getissuer&CIK=0001326732",
"/cgi-bin/own-disp?action=getowner&CIK=0001218981&sortid=filings-ASC",
"/cgi-bin/own-disp?action=getowner&CIK=0001218981&sortid=ownership-data-ASC",
"/cgi-bin/own-disp?action=getowner&CIK=0001218981&sortid=period-of-report-ASC",
"/cgi-bin/own-disp?action=getowner&CIK=0001218981&sortid=type-of-owner-ASC",
"/edgar/searchedgar/webusers.htm", "/index.htm", "javascript:history.back()"
), class = "factor")
Дважды проверьте dput:
structure(list(web = structure(c(35L, 35L, 34L, 33L, 33L, 33L,
32L, 32L, 32L, 32L, 31L, 31L, 31L, 30L, 29L, 27L, 28L, 27L, 26L,
26L, 25L, 24L, 24L, 24L, 23L, 23L, 23L, 23L, 23L, 22L, 22L, 22L,
21L, 20L, 20L, 19L, 19L, 18L, 18L, 18L, 17L, 17L, 17L, 16L, 16L,
16L, 15L, 15L, 15L, 14L, 14L, 13L, 13L, 13L, 12L, 12L, 11L, 10L,
9L, 8L, 7L, 7L, 6L, 6L, 6L, 5L, 4L, 4L, 3L, 2L, 2L, 2L, 1L, 38L,
38L, 37L, 37L, 37L, 36L, 36L), .Label = c("/Archives/edgar/data/0001218981/000117911016022379/0001179110-16-022379-index.htm",
"/Archives/edgar/data/0001218981/000117911016028590/0001179110-16-028590-index.htm",
"/Archives/edgar/data/0001218981/000117911016028764/0001179110-16-028764-index.htm",
"/Archives/edgar/data/0001218981/000117911016028975/0001179110-16-028975-index.htm",
"/Archives/edgar/data/0001218981/000117911016029122/0001179110-16-029122-index.htm",
"/Archives/edgar/data/0001218981/000117911016030044/0001179110-16-030044-index.htm",
"/Archives/edgar/data/0001218981/000117911016031144/0001179110-16-031144-index.htm",
"/Archives/edgar/data/0001218981/000117911016032519/0001179110-16-032519-index.htm",
"/Archives/edgar/data/0001218981/000117911017003489/0001179110-17-003489-index.htm",
"/Archives/edgar/data/0001218981/000117911017009339/0001179110-17-009339-index.htm",
"/Archives/edgar/data/0001218981/000117911017009836/0001179110-17-009836-index.htm",
"/Archives/edgar/data/0001218981/000117911017011451/0001179110-17-011451-index.htm",
"/Archives/edgar/data/0001218981/000117911017011684/0001179110-17-011684-index.htm",
"/Archives/edgar/data/0001218981/000117911017011782/0001179110-17-011782-index.htm",
"/Archives/edgar/data/0001218981/000117911017013512/0001179110-17-013512-index.htm",
"/Archives/edgar/data/0001218981/000117911017013668/0001179110-17-013668-index.htm",
"/Archives/edgar/data/0001218981/000117911017013817/0001179110-17-013817-index.htm",
"/Archives/edgar/data/0001218981/000117911017014024/0001179110-17-014024-index.htm",
"/Archives/edgar/data/0001218981/000117911017014676/0001179110-17-014676-index.htm",
"/Archives/edgar/data/0001218981/000117911017015379/0001179110-17-015379-index.htm",
"/Archives/edgar/data/0001218981/000117911018004779/0001179110-18-004779-index.htm",
"/Archives/edgar/data/0001218981/000117911018008826/0001179110-18-008826-index.htm",
"/Archives/edgar/data/0001218981/000117911018009648/0001179110-18-009648-index.htm",
"/Archives/edgar/data/0001218981/000117911018009739/0001179110-18-009739-index.htm",
"/Archives/edgar/data/0001218981/000117911018011490/0001179110-18-011490-index.htm",
"/Archives/edgar/data/0001218981/000117911019004050/0001179110-19-004050-index.htm",
"/Archives/edgar/data/0001218981/000117911019004286/0001179110-19-004286-index.htm",
"/Archives/edgar/data/0001218981/000117911019004323/0001179110-19-004323-index.htm",
"/Archives/edgar/data/0001218981/000117911019005598/0001179110-19-005598-index.htm",
"/Archives/edgar/data/0001218981/000117911019007384/0001179110-19-007384-index.htm",
"/Archives/edgar/data/0001218981/000117911019012669/0001179110-19-012669-index.htm",
"/Archives/edgar/data/0001218981/000117911019013159/0001179110-19-013159-index.htm",
"/Archives/edgar/data/0001218981/000117911020000425/0001179110-20-000425-index.htm",
"/Archives/edgar/data/0001218981/000117911020004224/0001179110-20-004224-index.htm",
"/Archives/edgar/data/0001218981/000117911020004802/0001179110-20-004802-index.htm",
"/Archives/edgar/data/0001218981/000120919115082536/0001209191-15-082536-index.htm",
"/Archives/edgar/data/0001218981/000120919115083517/0001209191-15-083517-index.htm",
"/Archives/edgar/data/0001218981/000120919116095084/0001209191-16-095084-index.htm",
"/cgi-bin/browse-edgar?action=getcompany&CIK=0001015739", "/cgi-bin/browse-edgar?action=getcompany&CIK=0001218981&owner=include",
"/cgi-bin/browse-edgar?action=getcompany&CIK=0001326732", "/cgi-bin/browse-edgar?action=getcurrent",
"/cgi-bin/own-disp?action=getissuer&CIK=0001015739", "/cgi-bin/own-disp?action=getissuer&CIK=0001326732",
"/cgi-bin/own-disp?action=getowner&CIK=0001218981&sortid=filings-ASC",
"/cgi-bin/own-disp?action=getowner&CIK=0001218981&sortid=ownership-data-ASC",
"/cgi-bin/own-disp?action=getowner&CIK=0001218981&sortid=period-of-report-ASC",
"/cgi-bin/own-disp?action=getowner&CIK=0001218981&sortid=type-of-owner-ASC",
"/edgar/searchedgar/webusers.htm", "/index.htm", "javascript:history.back()"
), class = "factor")), row.names = c(NA, -80L), class = "data.frame")
Помощь приветствуется!