Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,205,873 members, 7,994,013 topics. Date: Tuesday, 05 November 2024 at 02:40 AM

What Could Be Wrong With This? - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / What Could Be Wrong With This? (334 Views)

What Is Wrong With This Line Of Code? / Da Fuk Is Wrong With This Board? Useless Threads Everywhere!! / Please Help Look At My Code (what is wrong with my code ) (2) (3) (4)

(1) (Reply)

What Could Be Wrong With This? by lazynairalander1: 5:25pm On Feb 03, 2023
I keep getting error on my console after typing in this line of code.

library(tidyverse)
data()
view(msleep)

name(msleep)
list(msleep)

msleep %>%
drop_na(vore) %>%
ggplot(aes(x = vore))+
geom_bar(fill = "#97B3C6"wink+
#coord_flip()+
theme_bw()+
labs(x = "vore",
y = NULL,
title = "Number of Observation"wink

#Flip your chart
msleep %>%
drop_na(vore) %>%
ggplot(aes(x = vore))+
geom_bar(fill = "red"wink+
coord_flip()+
theme_bw()+
labs(x = "vore",
y = NULL,
title = "Number of Observation"wink

#create your chart in order
msleep %>%
drop_na(vore) %>%
ggplot(aes(fct_infreq(vore)))+
geom_bar(fill = "green"wink+
#coord_flip()+
theme_bw()+
labs(x = "vore",
y = NULL,
title = "Number of Observation"wink


msleep %>%
drop_na(vore) %>%
ggplot(aes(fct_infreq(vore)))+
geom_bar(fill = "green"wink+
#coord_flip()+
theme_bw()+
labs(x = "vore",
y = "Total sleep",
title = "Number of Observation"wink


#change the label of X axis
msleep %>%
drop_na(vore) %>%
ggplot(aes(x = vore))+
geom_bar(fill = "#97B3C6"wink+
#coord_flip()+
theme_bw()+
labs(x = "who eats what?",
y = NULL,
title = "Number of Observation"wink

msleep %>%
ggplot(aes(x = awake))+
geom_histogram(binwidth = 2, fill = "#97B3C6"wink+
theme_bw()+
labs(x = "Total sleep",
y = NULL,
title = "Histogram on total sleep"wink

msleep %>%
ggplot(aes(x = awake))+
geom_histogram(binwidth = 2)+
theme_bw()+
labs(x = "Total sleep",
y = NULL,
title = "Histogram on total sleep"wink

msleep %>%
ggplot(aes(x = awake))+
geom_histogram(binwidth = 2, fill = "#97B3C6"wink+
coord_flip()+
theme_bw()+
labs(x = "Total sleep",
y = NULL,
title = "Histogram on total sleep"wink

msleep %>%
ggplot(aes(awake))+
geom_histogram(binwidth = 2, fill = "#97B3C6"wink+
theme_bw()+
labs(x = "Total sleep",
y = NULL,
title = "Histogram on total sleep"wink

mean("Total sleep"wink
Re: What Could Be Wrong With This? by peacettw: 7:38pm On Feb 03, 2023
Use python
Re: What Could Be Wrong With This? by stanliwise(m): 6:14am On Feb 05, 2023
lazynairalander1:
I keep getting error on my console after typing in this line of code.

library(tidyverse)
data()
view(msleep)

name(msleep)
list(msleep)

msleep %>%
drop_na(vore) %>%
ggplot(aes(x = vore))+
geom_bar(fill = "#97B3C6"wink+
#coord_flip()+
theme_bw()+
labs(x = "vore",
y = NULL,
title = "Number of Observation"wink

#Flip your chart
msleep %>%
drop_na(vore) %>%
ggplot(aes(x = vore))+
geom_bar(fill = "red"wink+
coord_flip()+
theme_bw()+
labs(x = "vore",
y = NULL,
title = "Number of Observation"wink

#create your chart in order
msleep %>%
drop_na(vore) %>%
ggplot(aes(fct_infreq(vore)))+
geom_bar(fill = "green"wink+
#coord_flip()+
theme_bw()+
labs(x = "vore",
y = NULL,
title = "Number of Observation"wink


msleep %>%
drop_na(vore) %>%
ggplot(aes(fct_infreq(vore)))+
geom_bar(fill = "green"wink+
#coord_flip()+
theme_bw()+
labs(x = "vore",
y = "Total sleep",
title = "Number of Observation"wink


#change the label of X axis
msleep %>%
drop_na(vore) %>%
ggplot(aes(x = vore))+
geom_bar(fill = "#97B3C6"wink+
#coord_flip()+
theme_bw()+
labs(x = "who eats what?",
y = NULL,
title = "Number of Observation"wink

msleep %>%
ggplot(aes(x = awake))+
geom_histogram(binwidth = 2, fill = "#97B3C6"wink+
theme_bw()+
labs(x = "Total sleep",
y = NULL,
title = "Histogram on total sleep"wink

msleep %>%
ggplot(aes(x = awake))+
geom_histogram(binwidth = 2)+
theme_bw()+
labs(x = "Total sleep",
y = NULL,
title = "Histogram on total sleep"wink

msleep %>%
ggplot(aes(x = awake))+
geom_histogram(binwidth = 2, fill = "#97B3C6"wink+
coord_flip()+
theme_bw()+
labs(x = "Total sleep",
y = NULL,
title = "Histogram on total sleep"wink

msleep %>%
ggplot(aes(awake))+
geom_histogram(binwidth = 2, fill = "#97B3C6"wink+
theme_bw()+
labs(x = "Total sleep",
y = NULL,
title = "Histogram on total sleep"wink

mean("Total sleep"wink
Learn how to post code snippets and give more context to things. That is how to ask for help

1 Like

(1) (Reply)

Vtu App With Reseller Option ( 2000+ Bill Payments Included) . / Senior Python Backend Developer Needed Asap! / Planning To Move From Graphics Design To Frontend, Is It Worth It?

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 16
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.