Cant Plot Different Types of Variables from a Data Frame in R [closed]Drop factor levels in a subsetted data frameHow to join (merge) data frames (inner, outer, left, right)?Convert a list of data frames into one data frameEasy interview question got harder: given numbers 1..100, find the missing number(s)Grouping functions (tapply, by, aggregate) and the *apply familyDrop data frame columns by nameHow to make a great R reproducible exampleHow do I replace NA values with zeros in an R dataframe?Image Processing: Algorithm Improvement for 'Coca-Cola Can' RecognitionWhat is the optimal algorithm for the game 2048?

Can a controlled ghast be a leader of a pack of ghouls?

Superhero words!

Calculating the number of days between 2 dates in Excel

Can somebody explain Brexit in a few child-proof sentences?

Why isn't KTEX's runway designation 10/28 instead of 9/27?

Is there an Impartial Brexit Deal comparison site?

Greatest common substring

How will losing mobility of one hand affect my career as a programmer?

Java - What do constructor type arguments mean when placed *before* the type?

Should my PhD thesis be submitted under my legal name?

Simple image editor tool to draw a simple box/rectangle in an existing image

How can I successfully establish a nationwide combat training program for a large country?

Is there a problem with hiding "forgot password" until it's needed?

What is Sitecore Managed Cloud?

Giant Toughroad SLR 2 for 200 miles in two days, will it make it?

Have I saved too much for retirement so far?

Meta programming: Declare a new struct on the fly

Resetting two CD4017 counters simultaneously, only one resets

Pronouncing Homer as in modern Greek

Bob has never been a M before

Stereotypical names

Lifted its hind leg on or lifted its hind leg towards?

Why are on-board computers allowed to change controls without notifying the pilots?

Can a Bard use an arcane focus?



Cant Plot Different Types of Variables from a Data Frame in R [closed]


Drop factor levels in a subsetted data frameHow to join (merge) data frames (inner, outer, left, right)?Convert a list of data frames into one data frameEasy interview question got harder: given numbers 1..100, find the missing number(s)Grouping functions (tapply, by, aggregate) and the *apply familyDrop data frame columns by nameHow to make a great R reproducible exampleHow do I replace NA values with zeros in an R dataframe?Image Processing: Algorithm Improvement for 'Coca-Cola Can' RecognitionWhat is the optimal algorithm for the game 2048?













0















Hello So I have a Data frame which has a variable Email and a Variable grade_d which has values of A B C D E. I wanna make a plot where Ι can see How many people(from email variable) where A, B, etc...










share|improve this question













closed as too broad by beetroot, divibisan, camille, Andronicus, Alain Merigot Mar 7 at 20:41


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


















  • It work but in Y axis the Students ( Emails ) are Like: 12.5 10.0 7.5 5 But i want the numbers showing From 0 to 50 , 100, 150, 200, to 264 ( All the emails)

    – Alex Rika
    Mar 7 at 10:50












  • I recommend you to read some documentation about data wrangling in R and the documentation about the ggplot2 package, because your question is more like a learning session about R rather than a specific problem where u stuck with. I recommend the ggplot2 homepage: ggplot2.tidyverse.org for plotting and the dplyr homepage: dplyr.tidyverse.org for data wrangling.

    – Freakazoid
    Mar 7 at 12:57











  • Yeah you are right I will Thank you!

    – Alex Rika
    Mar 7 at 13:11















0















Hello So I have a Data frame which has a variable Email and a Variable grade_d which has values of A B C D E. I wanna make a plot where Ι can see How many people(from email variable) where A, B, etc...










share|improve this question













closed as too broad by beetroot, divibisan, camille, Andronicus, Alain Merigot Mar 7 at 20:41


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.


















  • It work but in Y axis the Students ( Emails ) are Like: 12.5 10.0 7.5 5 But i want the numbers showing From 0 to 50 , 100, 150, 200, to 264 ( All the emails)

    – Alex Rika
    Mar 7 at 10:50












  • I recommend you to read some documentation about data wrangling in R and the documentation about the ggplot2 package, because your question is more like a learning session about R rather than a specific problem where u stuck with. I recommend the ggplot2 homepage: ggplot2.tidyverse.org for plotting and the dplyr homepage: dplyr.tidyverse.org for data wrangling.

    – Freakazoid
    Mar 7 at 12:57











  • Yeah you are right I will Thank you!

    – Alex Rika
    Mar 7 at 13:11













0












0








0








Hello So I have a Data frame which has a variable Email and a Variable grade_d which has values of A B C D E. I wanna make a plot where Ι can see How many people(from email variable) where A, B, etc...










share|improve this question














Hello So I have a Data frame which has a variable Email and a Variable grade_d which has values of A B C D E. I wanna make a plot where Ι can see How many people(from email variable) where A, B, etc...







r algorithm plot statistics






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 7 at 10:12









Alex RikaAlex Rika

53




53




closed as too broad by beetroot, divibisan, camille, Andronicus, Alain Merigot Mar 7 at 20:41


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.









closed as too broad by beetroot, divibisan, camille, Andronicus, Alain Merigot Mar 7 at 20:41


Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.














  • It work but in Y axis the Students ( Emails ) are Like: 12.5 10.0 7.5 5 But i want the numbers showing From 0 to 50 , 100, 150, 200, to 264 ( All the emails)

    – Alex Rika
    Mar 7 at 10:50












  • I recommend you to read some documentation about data wrangling in R and the documentation about the ggplot2 package, because your question is more like a learning session about R rather than a specific problem where u stuck with. I recommend the ggplot2 homepage: ggplot2.tidyverse.org for plotting and the dplyr homepage: dplyr.tidyverse.org for data wrangling.

    – Freakazoid
    Mar 7 at 12:57











  • Yeah you are right I will Thank you!

    – Alex Rika
    Mar 7 at 13:11

















  • It work but in Y axis the Students ( Emails ) are Like: 12.5 10.0 7.5 5 But i want the numbers showing From 0 to 50 , 100, 150, 200, to 264 ( All the emails)

    – Alex Rika
    Mar 7 at 10:50












  • I recommend you to read some documentation about data wrangling in R and the documentation about the ggplot2 package, because your question is more like a learning session about R rather than a specific problem where u stuck with. I recommend the ggplot2 homepage: ggplot2.tidyverse.org for plotting and the dplyr homepage: dplyr.tidyverse.org for data wrangling.

    – Freakazoid
    Mar 7 at 12:57











  • Yeah you are right I will Thank you!

    – Alex Rika
    Mar 7 at 13:11
















It work but in Y axis the Students ( Emails ) are Like: 12.5 10.0 7.5 5 But i want the numbers showing From 0 to 50 , 100, 150, 200, to 264 ( All the emails)

– Alex Rika
Mar 7 at 10:50






It work but in Y axis the Students ( Emails ) are Like: 12.5 10.0 7.5 5 But i want the numbers showing From 0 to 50 , 100, 150, 200, to 264 ( All the emails)

– Alex Rika
Mar 7 at 10:50














I recommend you to read some documentation about data wrangling in R and the documentation about the ggplot2 package, because your question is more like a learning session about R rather than a specific problem where u stuck with. I recommend the ggplot2 homepage: ggplot2.tidyverse.org for plotting and the dplyr homepage: dplyr.tidyverse.org for data wrangling.

– Freakazoid
Mar 7 at 12:57





I recommend you to read some documentation about data wrangling in R and the documentation about the ggplot2 package, because your question is more like a learning session about R rather than a specific problem where u stuck with. I recommend the ggplot2 homepage: ggplot2.tidyverse.org for plotting and the dplyr homepage: dplyr.tidyverse.org for data wrangling.

– Freakazoid
Mar 7 at 12:57













Yeah you are right I will Thank you!

– Alex Rika
Mar 7 at 13:11





Yeah you are right I will Thank you!

– Alex Rika
Mar 7 at 13:11












3 Answers
3






active

oldest

votes


















0














Here is one example with a bar plot:



library(ggplot2)

test_data <- data.frame(e_mail=c("a@abc.com", "b@.abc.com", "c@abc.com", "d@abc.com", "e@abc.com"),
grade_d=c("A", "B", "A", "E", "D"))

ggplot(test_data, aes(grade_d, fill=grade_d)) + geom_bar()


This will lead to:
enter image description here






share|improve this answer























  • Yes this works fine! But I have some Na's in Grade_d how can that be removed without changing Y axis? I Try to use !is.na(grade_d) but I Get ERROR: Error: Aesthetics must be either length 1 or the same as the data (264): x, fill

    – Alex Rika
    Mar 7 at 11:00












  • Use test_data <- dplyr::filter(test_data, !is.na(grade_d)) to filter all Na's from your dataframe before plotting.

    – Freakazoid
    Mar 7 at 11:53



















0














Is this what you want?



library(ggplot2)

df <- data.frame(eMail = 1:100,
grade = LETTERS[sample(6, 100, replace = TRUE) ])

ggplot(data = df, aes(x = grade)) + stat_count()


enter image description here






share|improve this answer






























    0














    You can create a bar plot using either the normal R plot() function or ggplot.



    For example:



     library(ggplot2)

    email <- c("a@gmail.com", "b@gmail.com", "c@gmail.com", "d@gmail.com")
    grade <- c("A", "A", `enter code here`"B", "C")

    data <- data.frame(email, grade)

    ggplot(data, aes(x=grade)) + geom_bar() + labs(x="Grade")


    What you get on the y axis is the count of people that got each grade.






    share|improve this answer





























      3 Answers
      3






      active

      oldest

      votes








      3 Answers
      3






      active

      oldest

      votes









      active

      oldest

      votes






      active

      oldest

      votes









      0














      Here is one example with a bar plot:



      library(ggplot2)

      test_data <- data.frame(e_mail=c("a@abc.com", "b@.abc.com", "c@abc.com", "d@abc.com", "e@abc.com"),
      grade_d=c("A", "B", "A", "E", "D"))

      ggplot(test_data, aes(grade_d, fill=grade_d)) + geom_bar()


      This will lead to:
      enter image description here






      share|improve this answer























      • Yes this works fine! But I have some Na's in Grade_d how can that be removed without changing Y axis? I Try to use !is.na(grade_d) but I Get ERROR: Error: Aesthetics must be either length 1 or the same as the data (264): x, fill

        – Alex Rika
        Mar 7 at 11:00












      • Use test_data <- dplyr::filter(test_data, !is.na(grade_d)) to filter all Na's from your dataframe before plotting.

        – Freakazoid
        Mar 7 at 11:53
















      0














      Here is one example with a bar plot:



      library(ggplot2)

      test_data <- data.frame(e_mail=c("a@abc.com", "b@.abc.com", "c@abc.com", "d@abc.com", "e@abc.com"),
      grade_d=c("A", "B", "A", "E", "D"))

      ggplot(test_data, aes(grade_d, fill=grade_d)) + geom_bar()


      This will lead to:
      enter image description here






      share|improve this answer























      • Yes this works fine! But I have some Na's in Grade_d how can that be removed without changing Y axis? I Try to use !is.na(grade_d) but I Get ERROR: Error: Aesthetics must be either length 1 or the same as the data (264): x, fill

        – Alex Rika
        Mar 7 at 11:00












      • Use test_data <- dplyr::filter(test_data, !is.na(grade_d)) to filter all Na's from your dataframe before plotting.

        – Freakazoid
        Mar 7 at 11:53














      0












      0








      0







      Here is one example with a bar plot:



      library(ggplot2)

      test_data <- data.frame(e_mail=c("a@abc.com", "b@.abc.com", "c@abc.com", "d@abc.com", "e@abc.com"),
      grade_d=c("A", "B", "A", "E", "D"))

      ggplot(test_data, aes(grade_d, fill=grade_d)) + geom_bar()


      This will lead to:
      enter image description here






      share|improve this answer













      Here is one example with a bar plot:



      library(ggplot2)

      test_data <- data.frame(e_mail=c("a@abc.com", "b@.abc.com", "c@abc.com", "d@abc.com", "e@abc.com"),
      grade_d=c("A", "B", "A", "E", "D"))

      ggplot(test_data, aes(grade_d, fill=grade_d)) + geom_bar()


      This will lead to:
      enter image description here







      share|improve this answer












      share|improve this answer



      share|improve this answer










      answered Mar 7 at 10:29









      FreakazoidFreakazoid

      1315




      1315












      • Yes this works fine! But I have some Na's in Grade_d how can that be removed without changing Y axis? I Try to use !is.na(grade_d) but I Get ERROR: Error: Aesthetics must be either length 1 or the same as the data (264): x, fill

        – Alex Rika
        Mar 7 at 11:00












      • Use test_data <- dplyr::filter(test_data, !is.na(grade_d)) to filter all Na's from your dataframe before plotting.

        – Freakazoid
        Mar 7 at 11:53


















      • Yes this works fine! But I have some Na's in Grade_d how can that be removed without changing Y axis? I Try to use !is.na(grade_d) but I Get ERROR: Error: Aesthetics must be either length 1 or the same as the data (264): x, fill

        – Alex Rika
        Mar 7 at 11:00












      • Use test_data <- dplyr::filter(test_data, !is.na(grade_d)) to filter all Na's from your dataframe before plotting.

        – Freakazoid
        Mar 7 at 11:53

















      Yes this works fine! But I have some Na's in Grade_d how can that be removed without changing Y axis? I Try to use !is.na(grade_d) but I Get ERROR: Error: Aesthetics must be either length 1 or the same as the data (264): x, fill

      – Alex Rika
      Mar 7 at 11:00






      Yes this works fine! But I have some Na's in Grade_d how can that be removed without changing Y axis? I Try to use !is.na(grade_d) but I Get ERROR: Error: Aesthetics must be either length 1 or the same as the data (264): x, fill

      – Alex Rika
      Mar 7 at 11:00














      Use test_data <- dplyr::filter(test_data, !is.na(grade_d)) to filter all Na's from your dataframe before plotting.

      – Freakazoid
      Mar 7 at 11:53






      Use test_data <- dplyr::filter(test_data, !is.na(grade_d)) to filter all Na's from your dataframe before plotting.

      – Freakazoid
      Mar 7 at 11:53














      0














      Is this what you want?



      library(ggplot2)

      df <- data.frame(eMail = 1:100,
      grade = LETTERS[sample(6, 100, replace = TRUE) ])

      ggplot(data = df, aes(x = grade)) + stat_count()


      enter image description here






      share|improve this answer



























        0














        Is this what you want?



        library(ggplot2)

        df <- data.frame(eMail = 1:100,
        grade = LETTERS[sample(6, 100, replace = TRUE) ])

        ggplot(data = df, aes(x = grade)) + stat_count()


        enter image description here






        share|improve this answer

























          0












          0








          0







          Is this what you want?



          library(ggplot2)

          df <- data.frame(eMail = 1:100,
          grade = LETTERS[sample(6, 100, replace = TRUE) ])

          ggplot(data = df, aes(x = grade)) + stat_count()


          enter image description here






          share|improve this answer













          Is this what you want?



          library(ggplot2)

          df <- data.frame(eMail = 1:100,
          grade = LETTERS[sample(6, 100, replace = TRUE) ])

          ggplot(data = df, aes(x = grade)) + stat_count()


          enter image description here







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Mar 7 at 10:28









          brettljausnbrettljausn

          1,751924




          1,751924





















              0














              You can create a bar plot using either the normal R plot() function or ggplot.



              For example:



               library(ggplot2)

              email <- c("a@gmail.com", "b@gmail.com", "c@gmail.com", "d@gmail.com")
              grade <- c("A", "A", `enter code here`"B", "C")

              data <- data.frame(email, grade)

              ggplot(data, aes(x=grade)) + geom_bar() + labs(x="Grade")


              What you get on the y axis is the count of people that got each grade.






              share|improve this answer



























                0














                You can create a bar plot using either the normal R plot() function or ggplot.



                For example:



                 library(ggplot2)

                email <- c("a@gmail.com", "b@gmail.com", "c@gmail.com", "d@gmail.com")
                grade <- c("A", "A", `enter code here`"B", "C")

                data <- data.frame(email, grade)

                ggplot(data, aes(x=grade)) + geom_bar() + labs(x="Grade")


                What you get on the y axis is the count of people that got each grade.






                share|improve this answer

























                  0












                  0








                  0







                  You can create a bar plot using either the normal R plot() function or ggplot.



                  For example:



                   library(ggplot2)

                  email <- c("a@gmail.com", "b@gmail.com", "c@gmail.com", "d@gmail.com")
                  grade <- c("A", "A", `enter code here`"B", "C")

                  data <- data.frame(email, grade)

                  ggplot(data, aes(x=grade)) + geom_bar() + labs(x="Grade")


                  What you get on the y axis is the count of people that got each grade.






                  share|improve this answer













                  You can create a bar plot using either the normal R plot() function or ggplot.



                  For example:



                   library(ggplot2)

                  email <- c("a@gmail.com", "b@gmail.com", "c@gmail.com", "d@gmail.com")
                  grade <- c("A", "A", `enter code here`"B", "C")

                  data <- data.frame(email, grade)

                  ggplot(data, aes(x=grade)) + geom_bar() + labs(x="Grade")


                  What you get on the y axis is the count of people that got each grade.







                  share|improve this answer












                  share|improve this answer



                  share|improve this answer










                  answered Mar 7 at 10:34









                  Agnese GiacomelloAgnese Giacomello

                  1




                  1













                      Popular posts from this blog

                      1928 у кіно

                      Захаров Федір Захарович

                      Ель Греко