[R] Barplot for data frame

Ben Tupper btupper @end|ng |rom b|ge|ow@org
Wed Nov 29 14:44:30 CET 2023


Another great resource is RSeek.org  https://rseek.org/?q=barplot

On Wed, Nov 29, 2023 at 4:26 AM Ivan Krylov <krylov.r00t using gmail.com> wrote:

> В Wed, 29 Nov 2023 00:29:49 +0000
> Livio Beqiri <liviob using live.com> пишет:
>
> > how can i create a vertical barplot that displays brands in x-axis
> > and Revenue in Y-axis
>
> What have you tried? If you're not currently studying R with an
> instructor (who should be contacted with basic questions like this
> instead; see the posting guide at [1]), I can recommend a free book by
> A. Shipunov [2] to give you the basic R knowledge.
>
> > df <- data.frame (Revenue = c("100", "300", "500"),
> >                   Brand = c("Apple", "HP", "Lenovo")
> >                   )
>
> My psychic debugging powers tell me that you're getting an error
> complaining about the wrong argument type. If that's the case, you
> should either avoid quoting your numbers (i.e. say 100 instead of
> "100") or transform the character vector into a vector of numbers using
> as.numeric().
>
> Either way, it's best to show your work and your error messages because
> the psychic debugging powers don't always work properly.
>
> --
> Best regards,
> Ivan
>
> [1]
> https://www.r-project.org/posting-guide.html
>
> [2]
>
> https://web.archive.org/web/20230501112111/http://ashipunov.info/shipunov/school/biol_240/en/visual_statistics.pdf
>
> ______________________________________________
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide
> http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>

	[[alternative HTML version deleted]]



More information about the R-help mailing list