product_name        <- c("Laptop", "Smartphone", "Tablet", "Headphones", "Smartwatch", "Printer", "Keyboard", "Monitor")
unit_price      	<- c(185000, 95000, 68000, 12500, 28000, 42000, 8500, 56000)
units_sold      	<- c(35, 80, 45, 160, 90, 38, 210, 52)
unit_cost       	<- c(150000, 76000, 52000, 6500, 19000, 33000, 4200, 43000)
advertising     	<- c(180000, 220000, 90000, 60000, 85000, 45000, 50000, 75000)
orders          	<- c(35, 78, 44, 150, 88, 36, 200, 50)
returned_orders 	<- c(2, 5, 2, 12, 6, 3, 8, 2)

product_data <- data.frame(product_name, unit_price, units_sold, unit_cost, advertising, orders, returned_orders)
print(product_data)

cat("First five records",'\n')
head(product_data, 5)

cat("No of rows :", nrow(product_data),'\n')
cat("No of Columns :", ncol(product_data),'\n')

cat("Variable names:",'\n')
print(names(product_data))

cat("Structure of the data frame: ",'\n')
str(product_data)

Embed on website

To embed this project on your website, copy the following code and paste it into your website's HTML: