Tibble required for scatterplots?

Hi.

I tried to plot a scatterplot with the following command:

df_new %>%
select(cn:ident) %>%
plot()

And got this error message:

Error in plot.new() : figure margins too large

The same with this command:

plot(df_new$cn:ident)

Error in h(simpleError(msg, call)) :
error in evaluating the argument 'x' in selecting a method for function 'plot': NA/NaN argument
In addition: Warning message:
In df_new$cn:ident :
numerical expression has 198 elements: only the first used

When I used a tibble, like this:

df_3 <- import("data/election_data.csv") %>%
as_tibble() %>%
print()

it worked ok. I don't understand why though. Could someone explain to me and help me out, please?

Thank you.

Without seeing your data, it is hard to say what the problem is. You can certainly plot a data frame. How many columns are you trying to plot with

df_new %>%
select(cn:ident) %>%
plot()

I did see some strange plot labeling when I fed the output of select() directly to plot(). You might try

df2 <- df_new %>% select(cn:ident)
plot(df2)

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.