How to create a new table in database from R

0 votes

How to create a new table in database from R?

Sep 25, 2019 in Data Analytics by ch
• 3,450 points
3,359 views

1 answer to this question.

0 votes

Use dbGetQuery to create a table by writing create a statement as below.

Ex:

> db = dbConnect(odbc(),
               Driver = "MySQL ODBC 5.3 ANSI Driver",
               Server = "127.0.0.1",
               database = "wrgwrgrge",
               uid = "fawgawrgwrg",
               pwd = "sdawf")

> dbGetQuery(db,"create table dummy ( Id INT PRIMARY KEY,Name VARCHAR(5))")
data frame with 0 columns and 0 rows
answered Oct 14, 2019 by Cherukuri
• 33,030 points

Related Questions In Data Analytics

0 votes
1 answer

How to create a new R6 Class in R?

You have to first create an object ...READ MORE

answered Jul 5, 2018 in Data Analytics by DataKing99
• 8,250 points
1,289 views
0 votes
1 answer

How to create dummy variables based on a categorical variable of lists in R?

You can use mtabulate in the following way: library(qdapTools) cbind(data[1], ...READ MORE

answered Apr 13, 2018 in Data Analytics by CodingByHeart77
• 3,750 points
2,623 views
0 votes
1 answer

How to convert a sentence to word table in R?

Try the following code: sentence <- c("case sweden", ...READ MORE

answered Jun 21, 2018 in Data Analytics by Sahiti
• 6,370 points
1,509 views
0 votes
1 answer

How to create a box-plot using “plotly” in R?

You can use this command to create ...READ MORE

answered Jul 4, 2018 in Data Analytics by CodingByHeart77
• 3,750 points
7,809 views
+1 vote
1 answer

How to create a 2D array of vectors of different lengths in R programming?

You can try making a list of matrices ...READ MORE

answered Feb 1, 2019 in Data Analytics by Sophie may
• 10,620 points
1,695 views
0 votes
1 answer

How to create a date variable in R?

Create a string with date notation as ...READ MORE

answered Jul 16, 2019 in Data Analytics by anonymous
8,306 views
0 votes
1 answer

How to create a Heatmap in R?

Its very simple. Use heatmap function and ...READ MORE

answered Nov 3, 2019 in Data Analytics by Cherukuri
• 33,030 points
740 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 30, 2019 in Data Analytics by anonymous
• 33,030 points
1,091 views
0 votes
2 answers

How to create a table in R without external file?

Tibble also creates a table-like structure. Use below ...READ MORE

answered Sep 3, 2019 in Data Analytics by anonymous
• 33,030 points
3,017 views
+1 vote
5 answers

How to remove NA values from a Vector in R?

Hello team, you can use na.omit x <- c(NA, 3, ...READ MORE

answered Dec 9, 2020 in Data Analytics by anonymous
• 82,840 points
195,121 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP