-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove par settings from demo functions
- Loading branch information
Jacqueline Maasch
authored and
Jacqueline Maasch
committed
Jan 8, 2020
1 parent
dc63c2a
commit efe71a4
Showing
4 changed files
with
163 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
^\.Rproj\.user$ | ||
^dev$ | ||
^cran-comments\.md$ | ||
^CRAN-RELEASE$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,164 @@ | ||
pd | ||
pwd | ||
con <- mongo("mtcars", url = "mongodb://readwrite:[email protected]:43942/jeroen_test") | ||
library("mongolite") | ||
install.packages(c("RSQLite", "sofa", "etseed", "elastic", "mongolite", "redux", "reshape2", "dplyr", "DBI", "RMongo")) | ||
con <- mongo("mtcars", url = "mongodb://readwrite:[email protected]:43942/jeroen_test") | ||
library("mongolite") | ||
library("RSQLite") # Used to connect to SQLite database | ||
library("RMongo") | ||
library("mongolite") | ||
library("RSQLite") # Used to connect to SQLite database | ||
library("DBI") | ||
library("dplyr") | ||
library("reshape2") | ||
con <- mongo("mtcars", url = "mongodb://readwrite:[email protected]:43942/jeroen_test") | ||
View(con) | ||
if(con$count() > 0) con$drop() | ||
con$insert(mtcars) | ||
stopifnot(con$count() == nrow(mtcars)) | ||
con$insert(mtcars) | ||
mydata <- con$find() | ||
m <- mongo(collection = "nycflights") | ||
m <- "" | ||
m$insert(mtcars) | ||
con <- mongo("mtcars", url = "mongodb://readwrite:[email protected]:43942/jeroen_test") | ||
con <- mongo("mtcars", url = "mongodb://readwrite:[email protected]:43942/jeroen_test") | ||
con$insert(cars) | ||
cars <- con$insert(cars) | ||
View(cars) | ||
con <- mongo("mtcars", url = "mongodb://readwrite:[email protected]:43942/jeroen_test") | ||
con <- con$insert(cars) | ||
cars | ||
cars$nInserted | ||
View(cars) | ||
cars$nInserted | ||
cars$nMatched | ||
mongo_data$distinct("carrier") | ||
View(mydata) | ||
x <- dbGetQuery(con,"select * from mpg") | ||
m <- mongo(collection="flightfact_mongodb",db="nycflights13") | ||
x <- dbGetQuery(mtcars ,"select * from mpg") | ||
head(mtcars) | ||
test <- mongo() | ||
mongo.collection <- mongo(collection = "HouseData") | ||
mongo.collection$insert(mydata) | ||
mongo.collection <- mongo(collection = "HouseData") | ||
mongo.collection$insert(mtcars) | ||
con <- mongo("mtcars", url = "mongodb://readwrite:[email protected]:43942/jeroen_test") | ||
cars <- con$insert(cars) | ||
cars <- con$insert(cars) | ||
mongo_data <- mongo(collection = "mydata") | ||
mongo_data <- mongo(collection = mydata) | ||
library(nycflights13) | ||
mongo_data <- mongo(collection = nycflights) | ||
mongo_data <- mongo(collection = mydata) | ||
mongo.collection <- mongo(collection = "HouseData") | ||
con <- mongo("mtcars", url = "mongodb://readwrite:[email protected]:43942/jeroen_test") | ||
cars <- con$insert(cars) | ||
con$insert(cars) | ||
con <- mongo("mtcars", url = "mongodb://readwrite:[email protected]:43942/jeroen_test") | ||
cars <- con$insert(cars) | ||
if(con$count() > 0) con$drop() | ||
con$insert(mtcars) | ||
stopifnot(con$count() == nrow(mtcars)) | ||
mydata <- con$find() | ||
mt_cars_mongo <- con$find() | ||
stopifnot(all.equal(mydata, mtcars)) | ||
con$drop() | ||
View(mydata) | ||
View(mt_cars_mongo) | ||
stopifnot(all.equal(mydata, mtcars)) | ||
con <- mongo("mtcars", url = "mongodb://readwrite:[email protected]:43942/jeroen_test") | ||
con | ||
head(con) | ||
#Display the data as it was read | ||
cars | ||
cars <- mongo("mtcars", url = "mongodb://readwrite:[email protected]:43942/jeroen_test") | ||
cars | ||
cars <- cars$insert(cars) | ||
cars_mongo <- mongo("mtcars", url = "mongodb://readwrite:[email protected]:43942/jeroen_test") | ||
#Display the data as it was read | ||
cars_mongo | ||
cars <- cars_mongo$insert(cars) | ||
if(cars$count() > 0) con$drop() | ||
#Create a data frame from the mongo lite data of mtcars | ||
mt_cars_mongo <- cars$find() | ||
if(cars$count() > 0) con$drop() | ||
if(cars$count() > 0) cars$drop() | ||
cars <- cars_mongo$insert(cars) | ||
cars_mongo <- mongo("mtcars", url = "mongodb://readwrite:[email protected]:43942/jeroen_test") | ||
#Display the data as it was read | ||
cars_mongo | ||
cars <- cars_mongo$insert(cars) | ||
if(cars$count() > 0) cars$drop() | ||
cars$insert(mtcars) | ||
stopifnot(cars$count() == nrow(mtcars)) | ||
cars <- cars_mongo$insert(cars) | ||
cars_mongo <- mongo("mtcars", url = "mongodb://readwrite:[email protected]:43942/jeroen_test") | ||
#Display the data as it was read | ||
cars_mongo | ||
cars <- cars_mongo$insert(cars) | ||
if(cars$count() > 0) cars$drop() | ||
mt_cars_mongo <- cars$find() | ||
cars_mongo <- mongo("mtcars", url = "mongodb://readwrite:[email protected]:43942/jeroen_test") | ||
if(cars$count() > 0) cars$drop() | ||
#Display the data as it was read | ||
cars_mongo | ||
#Create a data frame from the mongo lite data of mtcars | ||
mt_cars_mongo <- cars$find() | ||
# Connect to demo server | ||
con <- mongo("mtcars", url = "mongodb://readwrite:[email protected]:43942/jeroen_test") if(con$count() > 0) con$drop() | ||
# Connect to demo server | ||
con <- mongo("mtcars", url = "mongodb://readwrite:[email protected]:43942/jeroen_test") | ||
if(con$count() > 0) con$drop() | ||
con$insert(mtcars) | ||
stopifnot(con$count() == nrow(mtcars)) | ||
# Query data | ||
mydata <- con$find() | ||
stopifnot(all.equal(mydata, mtcars)) | ||
con$drop() | ||
# Connect to demo server | ||
cardata <- mongo("mtcars", url = "mongodb://readwrite:[email protected]:43942/jeroen_test") | ||
if(cardata$count() > 0) cardata$drop() | ||
cardata$insert(mtcars) | ||
stopifnot(cardata$count() == nrow(mtcars)) | ||
# Query data | ||
mydata <- cardata$find() | ||
stopifnot(all.equal(mydata, mtcars)) | ||
cardata$drop() | ||
cardata | ||
head(mydata) | ||
install.packages("ggthemes", repos = "http://cran.cnr.berkeley.edu") | ||
install.packages("ggthemes", repos = "http://cran.cnr.berkeley.edu") | ||
install.packages("ggthemes") | ||
library(rlang) | ||
library(purrr) | ||
library(devtools) | ||
library(roxygen2) | ||
library(testthat) | ||
library(knitr) | ||
#### DEV SANZO #### | ||
# Load packages for package dev. | ||
library(devtools) | ||
library(roxygen2) | ||
library(testthat) | ||
library(knitr) | ||
library(rlang) | ||
library(purrr) | ||
#install.packages(c("rlang", "purrr")) | ||
#install.packages(c("devtools", "roxygen2", "testthat", "knitr")) | ||
devtools::create("myfirstpackage") | ||
devtools::create("sanzo") | ||
install.packages("lodown") | ||
library("lodown") | ||
devtools::install_github("jmaasch/sanzo") | ||
?"::" | ||
knit_with_parameters('~/Desktop/PROGS/R_practice/sanzo/vignettes/sanzo_vignette.Rmd') | ||
version | ||
setwd("/Users/razel/Desktop/PROGS/R_practice/sanzo") | ||
devtools::check() | ||
install.packages("devtools") | ||
install.packages("knitr") | ||
devtools::check() | ||
install.packages("rmarkdown") | ||
devtools::check() | ||
version | ||
devtools::build_win() | ||
usethis::build_win() | ||
usethis::check_win_devel(pkg = "/Users/razel/Desktop/PROGS/R_practice/sanzo") | ||
devtools::check_win_devel(pkg = "/Users/razel/Desktop/PROGS/R_practice/sanzo") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters