1
I was working on the following script:
library(tidyverse)
library(dplyr)
library(readxl)
cirurgia <- read_excel("C:/Users/Agnes/Desktop/Coisas com R/R/2_MIOMECTOMIA_HISTERECTOMIA-MAR_SET-2017.xlsx",
sheet = "Plan1",
col_types = c("text", "text", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric"))
View(cirurgia)
pretas <- cirurgia %>%
select(estado, PROCEDIMENTO, PRETA, PARDA, TOTAL) %>%
filter(PROCEDIMENTO == "HISTERECTOMIA TOTAL") %>%
View(pretas)
Error in View : invalid caption argument
What does that mean?
The error is here,
select(cirurgia, etc
, cannot have the dataframe onselect
. Unlesscirurgia
be it the name of a column.– Rui Barradas
I edited the question, now the mistake is this :( .
– Agnes Sofia Guimarães Cruz
I would remove the
%>%
just before View(black). Or simply switch from View(black) to View.– Ailton Andrade de Oliveira
What @Ailtonandradedeoliveira is saying is that
pretas
does not yet exist, is the value of the instruction but only after it has completed. EnoughView
with or without()
empty. And then, in the next line, without the pipe%>%
, can beView(pretas)
. Ah, if you carry the packagetidyverse
thedplyr
is also loaded.– Rui Barradas
Can you please, edit the question with the departure of
dput(cirurgia)
or, if the base is too large,dput(head(cirurgia, 20))
?– Rui Barradas