Different type of difficulties and problem faced by programmer, super user and AI Creator on digital world. Some of technical solutions that faced and overcome or solve by me with this tips and tricks.
Tuesday, October 15, 2024
Tuesday, October 8, 2024
Monday, October 7, 2024
Wednesday, October 2, 2024
Tuesday, September 3, 2024
Monday, August 19, 2024
Monday, August 21, 2023
R Language Fetching Data From Excel Sheet
R Language Query Data on Excel Sheet Column Header :-
Install xlsx Package :-
install.packages("xlsx") Verify and Load the "xlsx" Package:- # Verify the package is installed. any(grepl("xlsx",installed.packages())) # Load the library into R workspace. library("xlsx") Reading the Excel File:- # Read the first worksheet in the file input.xlsx. data <- read.xlsx("student_list.xlsx", sheetIndex = 1) print(data) #Data Query in Excel Sheet Column Header :- retval <- subset(data, Blood.Group == "O+") print(retval)
Reading a CSV File :-data <- read.csv("Mutual Fund List.csv")print(data) print(is.data.frame(data)) print(ncol(data)) print(nrow(data)) # Get the max salary from data frame. sal <- max(data$salary) print(sal) # Get the max salary from data frame. sal <- max(data$salary) # Get the person detail having max salary. retval <- subset(data, salary == max(salary)) print(retval) #Get all the people working in IT department retval <- subset( data, dept == "IT") print(retval) #Get the persons in IT department whose salary is greater than 600 info <- subset(data, salary > 600 & dept == "IT") print(info) #Get the people who joined on or after 2014 retval <- subset(data, as.Date(start_date) > as.Date("2014-01-01")) print(retval) # Write filtered data into a new file. write.csv(retval,"output.csv") newdata <- read.csv("output.csv") print(newdata)
Subscribe to:
Posts (Atom)
Python Blitz Bits: Zippy Snippets & Spark Projects for Instant Coding Wins
Python Blitz Bits: Zippy Snippets & Spark Projects for Instant Coding Wins
-
R Language Query Data on Excel Sheet Column Header :- Install xlsx Package :- install.packages("xlsx") Verify and Load the ...
-
FACE RECOGNITION SYSTEM THAT MACHING FACE FROM STORED MULTIPLE PERSON IMAGE WITH MAXIMUM ACCURACY Python Code Is Now Here : ( Write and Te...
-
Modern Mining Business Global Companies like Newmont Corporation (USA), Barrick Gold Corporation (Canada), AngloGold Ashanti (South Afri...
