Selçuk Korkmaz, PhD Profile picture
Apr 26 9 tweets 5 min read Twitter logo Read on Twitter
🧵1/8 Loading datasets from various sources is crucial for data analysis. In this thread, we'll explore how to read datasets from different sources and software using R! 📚 #RStats #DataScience Image
🧵2/8 CSV Files: The "read.csv" function is a go-to for reading comma-separated values files. For improved performance and more flexibility, consider using the "read_csv" function from the readr package or the fread function from the data.table package. 📃 #CSV #RStats
🧵3/8 Excel Files: The readxl package provides functions like "read_excel" for reading data from Excel files (.xls and .xlsx). Alternatively, the openxlsx package offers more features, including reading and writing Excel files. 📊 #Excel #RStats
🧵4/8 JSON Files: The jsonlite package offers an easy-to-use "fromJSON" function to read JSON data into R. It converts JSON objects to data frames, making it simple to work with JSON data. 📦 #JSON #RStats
🧵5/8 SQL Databases: The RMySQL, RSQLite, and RPostgreSQL packages allow you to connect to MySQL, SQLite, and PostgreSQL databases, respectively. Use "dbConnect" to establish a connection and "dbReadTable" to read the data into R. 🗄️ #SQL #RStats
🧵6/8 SPSS, SAS, Stata: The haven package provides functions like "read_spss," "read_sas," and "read_stata" to read datasets from SPSS, SAS, and Stata software. These functions make it easy to integrate data from various statistical software. 🔀 #StatsSoftware #RStats
🧵7/8 Web Scraping: The rvest package allows you to scrape data from websites. Use the "read_html" function to load web pages and "html_nodes" and "html_text" functions to extract specific data elements. 🌐 #WebScraping #RStats
🧵8/8 APIs: To access data from APIs, use the httr package. The "GET" function sends requests to APIs, and you can use the jsonlite package to convert the API response into data frames. 🌉 #APIs #RStats
With these packages and functions, you can now read data from various sources and software in R! This flexibility empowers you to perform diverse analyses and extract insights. Happy coding! 🎉 #RStats #DataScience

• • •

Missing some Tweet in this thread? You can try to force a refresh
 

Keep Current with Selçuk Korkmaz, PhD

Selçuk Korkmaz, PhD Profile picture

Stay in touch and get notified when new unrolls are available from this author!

Read all threads

This Thread may be Removed Anytime!

PDF

Twitter may remove this content at anytime! Save it as PDF for later use!

Try unrolling a thread yourself!

how to unroll video
  1. Follow @ThreadReaderApp to mention us!

  2. From a Twitter thread mention us with a keyword "unroll"
@threadreaderapp unroll

Practice here first or read more on our help page!

More from @selcukorkmaz

Apr 26
[1/8] 📚 Introducing #Quarto: A Versatile, New and Exciting Publishing Tool! 🌟
Quarto is a powerful, open-source, and user-friendly publishing framework that streamlines the process of creating beautiful books, documents, and websites. Let’s explore it now!
#RStats #DataScience Image
[2/8] 🤓 Language Agnostic: Quarto works seamlessly with multiple languages, including #Markdown, #LaTeX, #RMarkdown, and #Jupyter notebooks. So, whether you're a researcher or a creative writer, Quarto has you covered! 🌍
#DataScience #RStats
[3/8] 🔁 Format Flexibility: With Quarto, you can convert your content into various formats, such as PDF, HTML, EPUB, and even slide presentations. It makes sharing your work with diverse audiences a breeze! 🌬️
#RStats #DataScience
Read 8 tweets
Apr 26
🧵1/9 A deep dive into the history of #Backpropagation: A key technique in training multilayer architectures for neural networks. This powerful method revolutionized the way we train AI systems, leading to major breakthroughs in various domains. 🤖#DataScience #DeepLearning #AI Source: https://www.youtube...
🧵2/9 #Backpropagation is based on a simple concept: use gradient descent to optimize multilayer networks. By applying the chain rule for derivatives, it computes gradients efficiently, leading to optimized weight configurations in each layer of the network. #DataScience #AI
🧵3/9 The shift to Rectified Linear Units (ReLU) accelerated learning in deep networks, allowing training without unsupervised pre-training. This non-linear activation function proved more effective than its smoother predecessors like tanh(z) or 1/(1+exp(−z)). #ReLU #DataScience
Read 10 tweets
Apr 25
Thread: (1/9) You might have heard the term 'bootstrapping' thrown around in discussions about statistics, data analysis, or machine learning. But what does it mean, and why is it so powerful? Let's break it down in simple terms! #RStats #DataScience Source: https://mlcourse.ai...
(2/9) Bootstrapping is a resampling technique that involves taking multiple samples from the original dataset, each time with replacement. It's like drawing marbles from a bag, putting each one back after recording its color. This helps us understand the uncertainty in our data.
(3/9) In real-life situations, it's not always feasible to collect more data. Bootstrapping allows us to make the most of what we have, creating a 'pseudo-replica' of our dataset through resampling. This helps us understand the variability of our estimates. #RStats #DataScience
Read 9 tweets
Apr 25
🧵 1/10 🧵
🎯 Demystifying the #Apply Functions Family in #R 🎯

Are you an #Rstats enthusiast? Let's dive into the powerful 'apply' family of functions to help you manipulate and analyze data efficiently! 👩‍💻👨‍💻

#DataScience #RStats Source: https://r-coder.com...
🧵 2/10
Meet the Family! 🏡

There are six main functions in the 'apply' family:

1️⃣ apply()
2️⃣ lapply()
3️⃣ sapply()
4️⃣ vapply()
5️⃣ mapply()
6️⃣ tapply()

Each has its own use case and is designed to work with different data structures. Let's explore them! 🕵️‍♂️🔍

#RStats
🧵 3/10 🧵
1️⃣ apply()

Use apply() for applying a function across the rows or columns of a matrix or array.

Syntax: apply(X, MARGIN, FUN, ...)

X: array or matrix
MARGIN: 1 for rows, 2 for columns
FUN: function to apply
... : additional arguments

#RStats #DataScience
Read 10 tweets
Apr 24
1/ 🎯 Introduction 📌
The #caret package in #R is a powerful tool for data pre-processing, feature selection, and machine learning model training. In this thread, we'll explore some useful tips & tricks to help you get the most out of caret. #DataScience #MachineLearning #RStats Image
2/ 🧹 Data Pre-processing 📌
caret offers various data pre-processing techniques, like centering, scaling, and removing near-zero-variance predictors. Use the preProcess() function to apply these methods before model training.🧪 #RStats #DataScience
3/ ⚙️ Feature Selection 📌
Use the rfe() function for recursive feature elimination. This method helps you find the most important features in your dataset, improving model performance & interpretation.🌟 #RStats #DataScience
Read 8 tweets
Apr 24
1/🧶📝 Welcome to a Twitter thread discussing the pros & cons of the #R packages, #knitr and #sweave. These packages allow us to create dynamic, reproducible documents that integrate text, code, and results. Let's dive into the strengths and weaknesses of each. #Rstats
2/🔍 #knitr is a more recent and widely-used package that simplifies the creation of dynamic reports. It's an evolution of #sweave and supports various output formats, including PDF, HTML, and Word. Plus, it's compatible with Markdown and LaTeX! #Rstats
3/🌟 Pros of #knitr:
✅ Better syntax highlighting
✅ Cache system to speed up compilation
✅ Inline code chunks
✅ Flexible output hooks
✅ More output formats
✅ Integrates with other languages
Overall, it provides more control and customization in document creation. #RStats
Read 9 tweets

Did Thread Reader help you today?

Support us! We are indie developers!


This site is made by just two indie developers on a laptop doing marketing, support and development! Read more about the story.

Become a Premium Member ($3/month or $30/year) and get exclusive features!

Become Premium

Don't want to be a Premium member but still want to support us?

Make a small donation by buying us coffee ($5) or help with server cost ($10)

Donate via Paypal

Or Donate anonymously using crypto!

Ethereum

0xfe58350B80634f60Fa6Dc149a72b4DFbc17D341E copy

Bitcoin

3ATGMxNzCUFzxpMCHL5sWSt4DVtS8UqXpi copy

Thank you for your support!

Follow Us on Twitter!

:(