Publications by Muhammad Bilal(DS-5121107)
Document
library(dslabs) data("murders") 1. Use the $ operator to access the population size data and store it as the object pop. Then use the sort function to redefine pop so that it is sorted. Finally, use the [ operator to report the smallest population size. pop <- murders$population pop <- sort(pop) smallest_population <- pop[1] 2. Now instead of ...
2141 sym R (548 sym/12 pcs)
Muhammad Bilal Ds-5th (5121107)
library(dslabs) data("murders") 1. Use the $ operator to access the population size data and store it as the object pop. Then use the sort function to redefine pop so that it is sorted. Finally, use the [ operator to report the smallest population size. pop <- murders$population pop <- sort(pop) smallest_population <- pop[1] 2. Now instead of ...
2141 sym R (548 sym/12 pcs)
Muhammad Bilal DS-5121107(Assignment-04) 3.11&3.13
library(dslabs) data("murders") Exercise#3.11 1. Use the $ operator to access the population size data and store it as the object pop. Then use the sort function to redefine pop so that it is sorted. Finally, use the [ operator to report the smallest population size. pop <- murders$population pop <- sort(pop) smallest_population <- pop[1] 2. ...
2861 sym R (1262 sym/17 pcs)
Document
3.6 Exercise:- library(dslabs) data(murders) df = data.frame(murders) 01 str(df) ## 'data.frame': 51 obs. of 5 variables: ## $ state : chr "Alabama" "Alaska" "Arizona" "Arkansas" ... ## $ abb : chr "AL" "AK" "AZ" "AR" ... ## $ region : Factor w/ 4 levels "Northeast","South",..: 2 4 4 2 4 4 1 2 2 2 ... ## $ population: nu...
2625 sym R (3900 sym/48 pcs)
Muhammad Bilal DS-5th(Assignment-03)
1.How we load dataset? For loading data sets first we have to download Package “dslabs” then we run code library(dslabs) data("murders") 2.Store the state names in a vectors? state<-c(murders$state) state ## [1] "Alabama" "Alaska" "Arizona" ## [4] "Arkansas" "California" "Color...
1912 sym R (9947 sym/118 pcs)
Document
If-else in R The if and else in R are conditional statements. In this tutorial, we will show the syntax and some examples, with simple and nested conditions. We will also show you how to use the if-else function, the vectorized version of the if-else condition in R. If else statement syntax in R 1.1. Examples of if else in R Ifelse statement 2....
4015 sym 1 img
Muhammad Bilal DS-5th(Assignment-02)
If-else in R The if and else in R are conditional statements. In this tutorial, we will show the syntax and some examples, with simple and nested conditions. We will also show you how to use the if-else function, the vectorized version of the if-else condition in R. If else statement syntax in R 1.1. Examples of if else in R Ifelse statement 2....
4015 sym 1 img
Publish Document
1.How we load dataset? For loading data sets first we have to download Package “dslabs” then we run code library(dslabs) data("murders") 2.Store the state names in a vectors? state<-c(murders$state) state ## [1] "Alabama" "Alaska" "Arizona" ## [4] "Arkansas" "California" "Color...
1912 sym R (9947 sym/118 pcs)
Publish Document
1.How we load dataset? For loading data sets first we have to download Package “dslabs” then we run code library(dslabs) data("murders") 2.Store the state names in a vectors? state<-c(murders$state) state ## [1] "Alabama" "Alaska" "Arizona" ## [4] "Arkansas" "California" "Color...
1912 sym R (9947 sym/118 pcs)
Muhammad Bilal DS-5th (Assignment-01)
1.How we load dataset? For loading data sets first we have to download Package “dslabs” then we run code library(dslabs) data("murders") 2.Store the state names in a vectors? state<-c(murders$state) state ## [1] "Alabama" "Alaska" "Arizona" ## [4] "Arkansas" "California" "Color...
1912 sym R (9947 sym/118 pcs)