Question

I need assistance with coding, in RStudio 3.5.2 Consider the iris dataset. It has 150 rows...

I need assistance with coding, in RStudio 3.5.2

Consider the iris dataset. It has 150 rows and 5 columns and contains measurements in centimeters of the variables sepal length and width and petal length and width, respectively, for 50 flowers from each of 3 species of iris. The species are Iris setosa, versicolor, and virginica. head(iris, 3) ## Sepal.Length Sepal.Width Petal.Length Petal.Width Species ## 1 5.1 3.5 1.4 0.2 setosa ## 2 4.9 3.0 1.4 0.2 setosa ## 3 4.7 3.2 1.3 0.2 setosa Using the ggplot2 package, a) write code to create a scatter plot of Petal.Length versus Petal.Width, with the variable Species mapped to color; b) add appropriate title to the plot; c) write code to create side by side box plots of Sepal.Length for each specie of iris.

This is what I have so far what am I missing?

ggplot(data = iris)+

geom_point(mapping = aes (x = Petal.Length, y = Petal.Width))+

facet_grid(~Species, scales = "free")

0 0
Add a comment Improve this question Transcribed image text
Answer #1

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
struct node{
   char name[100];
   float marks;
   struct node *next;
};

void printlist(struct node *h){
   while (h!=NULL){
       printf("\nName : ");
       puts(h->name);
       printf("Marks = %.2f\n",h->marks);
       h = h->next;
   }
}
int main(){
   struct node *start = NULL;
   int len,i,a,b=0;
   printf("Enter the no.of students in the class:");
   scanf("%d",&len);
   for(i=0;i<len;i++){
       getchar();
       struct node *newNode = (struct node *)malloc(sizeof(struct node));
       printf("\nEnter name : ");
       gets(newNode->name);
       printf("Enter marks : ");
       scanf("%f",&newNode->marks);
       newNode->next = NULL;
       if(start==NULL)
           start = newNode;
       else{
           struct node *pt = start;
           while(pt->next != NULL)
               pt = pt->next;
           pt->next = newNode;
       }
   }
   printlist(start);
   struct node *ptr = start;
   while(ptr!=NULL){
       if(b<ptr->marks)
           b=ptr->marks;
       ptr = ptr->next;
   }
   printf("\nTopper(s) of the class is:\n");
   while(start!=NULL){
       if(b==start->marks){
           puts(start->name);
       }
       start = start->next;
   }
}

Add a comment
Know the answer?
Add Answer to:
I need assistance with coding, in RStudio 3.5.2 Consider the iris dataset. It has 150 rows...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT