Read from database and store in R as dataframe

0 votes

Hi, im new to R and want to connect to database, but cant read the table. How to read from database and store in R as dataframe? 

If i use below command to store directly from database to R, it return ssomeother datatype of variable.

Jul 29 in Data Analytics by radha
26 views

1 answer to this question.

0 votes

Your code would fetch you a MySQL object, so use dbReadTable() function 

Use code like below - 

> table_name <- dbReadTable(mydb,"new_table_name")
answered Jul 29 by anonymous
• 26,020 points

Related Questions In Data Analytics

0 votes
0 answers

Split a string and store it in multiple columns from a field in R

How to Split a string and store ...READ MORE

Jun 28 in Data Analytics by Anand
32 views
0 votes
1 answer
0 votes
1 answer

Reshape dataframe without “timevar” from long to wide format in R

Assuming that the data is in the ...READ MORE

answered Jun 13, 2018 in Data Analytics by CodingByHeart77
• 3,680 points
57 views
0 votes
1 answer

Difference between factor and as.factor in R programming

Hey @Ali, as.factor is a wrapper for ...READ MORE

answered Oct 29, 2018 in Data Analytics by Maverick
• 10,040 points
73 views
0 votes
1 answer

Want a command to be executed in Salt only if a directory is empty

You should consider using this inside your ...READ MORE

answered Jun 12, 2018 in DevOps Tools by Damon Salvatore
• 5,510 points
38 views
0 votes
1 answer

Creating A New MySQL User In Amazon RDS Environment

AWS RDS security groups documentation (a common ...READ MORE

answered Jul 18, 2018 in AWS by Priyaj
• 56,540 points
149 views
0 votes
1 answer

Using conditional to execute a command in salt

You can use unless inside your state ...READ MORE

answered Jul 23, 2018 in Other DevOps Questions by DareDev
• 6,810 points
76 views
0 votes
1 answer

Read data from various csv and store it in one dataframe

Use rbind() to join both data frames ...READ MORE

answered Jul 4 in Data Analytics by anonymous
• 26,020 points
22 views
0 votes
1 answer

Store a built in dataset or dataframe from R to database

dbWriteTable() function allows you to store data ...READ MORE

answered Jul 29 in Data Analytics by anonymous
• 26,020 points
19 views