Professional Documents
Culture Documents
Lab12
Lab12
Shreshth Malhotra
2024-03-21
#Q1) Creating a dataframe.
#connection_no <- c(1:20)
#customer_name <-
c("a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s"
,"t")
#village <-
c("aaa","bbb","ccc","ddd","eee","fff","ggg","hhh","iii","jjj","kkk","lll","mm
m","nnn","ooo","ppp","qqq","rrr","sss","ttt")
#month <-
c("jan","feb","march","april","may","june","july","aug","sep","oct","nov","de
c","jan","feb","march","april","may","june","july","aug")
#week1 <- c(10,20,30,40,50,60,70,30,40,20,10,50,90,70,50,20,40,80,30,20)
#week2 <- c(30,60,30,90,50,80,20,10,40,60,90,20,80,40,10,30,50,70,80,10)
#week3 <- c(60,50,40,90,10,50,30,70,90,40,50,50,30,10,20,30,50,70,90,40)
#week4 <- c(70,20,50,90,10,20,90,30,80,40,70,50,60,10,90,20,80,30,70,40)
#year <-
c(2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2012,2013,2014,2015,
2016,2017,2018,2019,2020)
#total_units=week1+week2+week3+week4
#bill_amount=total_units
#Electricity_bill <-
data.frame(connection_no,customer_name,village,month,week1,week2,week3,week4,
year,total_units,bill_amount)
#Electricity_bill
#Electricity_bill <-
data.frame(connection_no,customer_name,village,month,week1,week2,week3,week4,
year,total_units,bill_amount)
#Electricity_bill