content
large_stringlengths
0
6.46M
path
large_stringlengths
3
331
license_type
large_stringclasses
2 values
repo_name
large_stringlengths
5
125
language
large_stringclasses
1 value
is_vendor
bool
2 classes
is_generated
bool
2 classes
length_bytes
int64
4
6.46M
extension
large_stringclasses
75 values
text
stringlengths
0
6.46M
testlist <- list(A = structure(c(2.52532258911446e-250, 2.02369288536575e-320, 8.13585090186863e-174, 2.31612448027671e+77, 2.52532258911446e-250, 2.02369288536575e-320, 8.0864918911604e-174, 3.22543360226721e-312, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
/multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613103791-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
453
r
testlist <- list(A = structure(c(2.52532258911446e-250, 2.02369288536575e-320, 8.13585090186863e-174, 2.31612448027671e+77, 2.52532258911446e-250, 2.02369288536575e-320, 8.0864918911604e-174, 3.22543360226721e-312, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,...
context("Appending subsets") with_mock_crunch({ ds1 <- loadDataset("test ds") ds2 <- loadDataset("ECON.sav") test_that("If no filtering, 'where' and 'filter' are omitted", { expect_POST(appendDataset(ds1, ds2), 'https://app.crunch.io/api/datasets/1/batches/', '{"element":"sh...
/tests/testthat/test-append-subset.R
no_license
GitBrianLaw/rcrunch
R
false
false
3,808
r
context("Appending subsets") with_mock_crunch({ ds1 <- loadDataset("test ds") ds2 <- loadDataset("ECON.sav") test_that("If no filtering, 'where' and 'filter' are omitted", { expect_POST(appendDataset(ds1, ds2), 'https://app.crunch.io/api/datasets/1/batches/', '{"element":"sh...
#' Format the visual counts for expansion. #' @description Function formats the visual counts so that they can be expanded using the function \code{\link{expand_counts}}. This function will return an array where each cell corresponds to a 20-min counting block. Array dimensions correspond to date, 8-hr shift, hour per...
/R/prepare_visual_counts_for_expansion.R
no_license
jBernardADFG/ChenaSalchaTowerSonar
R
false
false
1,382
r
#' Format the visual counts for expansion. #' @description Function formats the visual counts so that they can be expanded using the function \code{\link{expand_counts}}. This function will return an array where each cell corresponds to a 20-min counting block. Array dimensions correspond to date, 8-hr shift, hour per...
## ************************************************************************** ## ## (c) 2018-2023 Guillaume Guénard ## Department de sciences biologiques, ## Université de Montréal ## Montreal, QC, Canada ## ## **Weighting Functions for Spatial Eigenvector Maps** ## ## This file is part of...
/R/weighting-functions.R
no_license
guenardg/codep
R
false
false
9,951
r
## ************************************************************************** ## ## (c) 2018-2023 Guillaume Guénard ## Department de sciences biologiques, ## Université de Montréal ## Montreal, QC, Canada ## ## **Weighting Functions for Spatial Eigenvector Maps** ## ## This file is part of...
#' Function to print color palettes #' @param n: Number of colors desired If omitted, uses all colours. #' @param name: Name of color palette (LaCroix flavor) desired. #' @export print.palette <- function(x, ...) { fpath <- system.file(package="LaCroixColoR", "data", "LassigueDMato.ttf") sysfonts::font_add("DMa...
/cache/johannesbjork|LaCroixColoR|R__print.palette.R
permissive
a-rosenberg/github-content-scraper
R
false
false
989
r
#' Function to print color palettes #' @param n: Number of colors desired If omitted, uses all colours. #' @param name: Name of color palette (LaCroix flavor) desired. #' @export print.palette <- function(x, ...) { fpath <- system.file(package="LaCroixColoR", "data", "LassigueDMato.ttf") sysfonts::font_add("DMa...
\donttest{ data(enterprises) # create a sdc_raster from point data with raster with # a resolution of 200m production <- sdc_raster(enterprises, variable = "production" , r = 200, min_count = 3) print(production) # plot the raster zlim <- c(0, 3e4) # show which raster cells are sensitive plot...
/example/protect_neighborhood.R
no_license
edwindj/sdcSpatial
R
false
false
601
r
\donttest{ data(enterprises) # create a sdc_raster from point data with raster with # a resolution of 200m production <- sdc_raster(enterprises, variable = "production" , r = 200, min_count = 3) print(production) # plot the raster zlim <- c(0, 3e4) # show which raster cells are sensitive plot...
unigrams <- readRDS('unigrams.Rds') bigrams <- readRDS('bigrams.Rds') trigrams <- readRDS('trigrams.Rds') quadgrams <- readRDS('quadgrams.Rds') fivegrams <- readRDS('fivegrams.Rds') source("cleanStrings.R") trim <- function (x) gsub("^\\s+|\\s+$", "", x) predictText <- function(txt, N = 3){ # reset max N ...
/NLPWordPrediction/global.R
no_license
pnandak/TextPred
R
false
false
1,668
r
unigrams <- readRDS('unigrams.Rds') bigrams <- readRDS('bigrams.Rds') trigrams <- readRDS('trigrams.Rds') quadgrams <- readRDS('quadgrams.Rds') fivegrams <- readRDS('fivegrams.Rds') source("cleanStrings.R") trim <- function (x) gsub("^\\s+|\\s+$", "", x) predictText <- function(txt, N = 3){ # reset max N ...
library(ape) testtree <- read.tree("4740_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="4740_0_unrooted.txt")
/codeml_files/newick_trees_processed/4740_0/rinput.R
no_license
DaniBoo/cyanobacteria_project
R
false
false
135
r
library(ape) testtree <- read.tree("4740_0.txt") unrooted_tr <- unroot(testtree) write.tree(unrooted_tr, file="4740_0_unrooted.txt")
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/deprec-truncate_phase.R \name{truncate_phase} \alias{truncate_phase} \title{Truncate single-case data} \usage{ truncate_phase( data, dvar, pvar, truncate = list(A = c(0, 0), B = c(0, 0)), na = TRUE ) } \arguments{ \item{data}{A sing...
/man/truncate_phase.Rd
no_license
cran/scan
R
false
true
2,007
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/deprec-truncate_phase.R \name{truncate_phase} \alias{truncate_phase} \title{Truncate single-case data} \usage{ truncate_phase( data, dvar, pvar, truncate = list(A = c(0, 0), B = c(0, 0)), na = TRUE ) } \arguments{ \item{data}{A sing...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/util.r \name{permuteWithRepeats} \alias{permuteWithRepeats} \title{Generate all permutations of input, reusing values in each result row} \usage{ permuteWithRepeats(x, unique = TRUE) } \arguments{ \item{x}{list or vector} \item{unique}{logic...
/man/permuteWithRepeats.Rd
no_license
jackwasey/jwutil
R
false
true
937
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/util.r \name{permuteWithRepeats} \alias{permuteWithRepeats} \title{Generate all permutations of input, reusing values in each result row} \usage{ permuteWithRepeats(x, unique = TRUE) } \arguments{ \item{x}{list or vector} \item{unique}{logic...
context("SpATS modeling") ## Helper function for testing base structure that has to be consistent ## for all STA objects independent of engine and options. expect_STA <- function(STA) { test_that(paste(deparse(substitute(STA)), "has correct STA structure"), { expect_is(STA, "STA") for (tr in names(STA...
/tests/testthat/test-fitTDSpATS.R
no_license
Biometris/statgenSTA
R
false
false
10,377
r
context("SpATS modeling") ## Helper function for testing base structure that has to be consistent ## for all STA objects independent of engine and options. expect_STA <- function(STA) { test_that(paste(deparse(substitute(STA)), "has correct STA structure"), { expect_is(STA, "STA") for (tr in names(STA...
hist_mean_var_plot <- function(obsdata, smeanData, svarData, title=NULL, quant=c(0.025,0.975), ...) { type <- var <- var2 <- value <- low <- high <- median <- NUL...
/R/hist_mean_var_plot.R
no_license
UUPharmacometrics/ncappc
R
false
false
4,283
r
hist_mean_var_plot <- function(obsdata, smeanData, svarData, title=NULL, quant=c(0.025,0.975), ...) { type <- var <- var2 <- value <- low <- high <- median <- NUL...
library (ggplot2) kk <- read.csv("kandydaci_sejm_2019_f4.csv", sep = ';', header=T, na.string="NA"); ggplot(kk) + geom_qq(aes(sample = glosy))
/qqplot.R
no_license
hrpunio/Erasmus2020_DS
R
false
false
145
r
library (ggplot2) kk <- read.csv("kandydaci_sejm_2019_f4.csv", sep = ';', header=T, na.string="NA"); ggplot(kk) + geom_qq(aes(sample = glosy))
data_weekly %>% ggplot(aes(x = weeks_from_today, y = online_express_visitors, group = 1)) + geom_line() + facet_wrap(~name, ncol = 5, scales = 'free_y') + scale_y_continuous(name = 'Express Visitors') + scale_x_discrete(name = 'Weeks from Current Day') + theme_minimal()
/Mode/roadster/spaces/~Archived Reports/Dealer Traffic Sudden Drop.1497fb2d9b87/notebook/cell-number-10.facf13761f3d.r
no_license
DMilmont/mode
R
false
false
273
r
data_weekly %>% ggplot(aes(x = weeks_from_today, y = online_express_visitors, group = 1)) + geom_line() + facet_wrap(~name, ncol = 5, scales = 'free_y') + scale_y_continuous(name = 'Express Visitors') + scale_x_discrete(name = 'Weeks from Current Day') + theme_minimal()
## Alan Arnholt ## Chapter 7 RR with R and RStudio ## 2/16/14 ## # load WDI package library(WDI) # Searches names and descriptions of available WDI series WDIsearch("fertilizer consumption") # fertilizer consumption per hectare of arable land FertConsumpData <- WDI(indicator = "AG.CON.FERT.ZS") head(FertConsumpData)...
/R-Scripts/Chapter7script.R
no_license
alanarnholt/STT4870
R
false
false
5,566
r
## Alan Arnholt ## Chapter 7 RR with R and RStudio ## 2/16/14 ## # load WDI package library(WDI) # Searches names and descriptions of available WDI series WDIsearch("fertilizer consumption") # fertilizer consumption per hectare of arable land FertConsumpData <- WDI(indicator = "AG.CON.FERT.ZS") head(FertConsumpData)...
testlist <- list(Rs = numeric(0), atmp = c(-6.73292524882432e+44, 1.25561609525069e+163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), relh = c(7.64681398433536e-304, -4.29227809743625e-307, 1.81037701089217e+87, -2.93112217825115e-158, 9.03412394302482e-46, 7.31195213563656e+256, -1.9392552...
/meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615864011-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
472
r
testlist <- list(Rs = numeric(0), atmp = c(-6.73292524882432e+44, 1.25561609525069e+163, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), relh = c(7.64681398433536e-304, -4.29227809743625e-307, 1.81037701089217e+87, -2.93112217825115e-158, 9.03412394302482e-46, 7.31195213563656e+256, -1.9392552...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DWL.R \name{DWL.Init} \alias{DWL.Init} \title{Interal Use Only} \usage{ DWL.Init() } \description{ Interal Use Only } \keyword{internal}
/man/DWL.Init.Rd
no_license
cran/EMSHS
R
false
true
227
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DWL.R \name{DWL.Init} \alias{DWL.Init} \title{Interal Use Only} \usage{ DWL.Init() } \description{ Interal Use Only } \keyword{internal}
EstimateAssetSufficiency <- function(availAsset_df,callInfo_df,resource_df){ # check whether the assets are sufficient per each call and for all calls # sufficient per call: amount(post haircut) of available assets for a call is larger than the call amount # sufficient for all calls: total amount(post haircut...
/src/generalFunctions/assetSufficiency.R
no_license
AcuoFS/acuo-allocation
R
false
false
3,305
r
EstimateAssetSufficiency <- function(availAsset_df,callInfo_df,resource_df){ # check whether the assets are sufficient per each call and for all calls # sufficient per call: amount(post haircut) of available assets for a call is larger than the call amount # sufficient for all calls: total amount(post haircut...
Sys.setlocale(category = "LC_CTYPE", locale = "ko_KR.UTF-8") setwd("~/Desktop/Justin/2018-1/Capstone/Data/Naver/") pw <- read.csv("박원순_Naver_2014.csv") ; head(pw) ss <- read.csv("서울시장_Naver_2014.csv") ; head(ss) jm <- read.csv("정몽준_Naver_2014.csv") ; head(jm) # pw1 <- pw[grep("박", pw$contents), ] # pw2 <- pw[grep("원순...
/VAR.R
no_license
Justin-A/Capstone_Design
R
false
false
7,586
r
Sys.setlocale(category = "LC_CTYPE", locale = "ko_KR.UTF-8") setwd("~/Desktop/Justin/2018-1/Capstone/Data/Naver/") pw <- read.csv("박원순_Naver_2014.csv") ; head(pw) ss <- read.csv("서울시장_Naver_2014.csv") ; head(ss) jm <- read.csv("정몽준_Naver_2014.csv") ; head(jm) # pw1 <- pw[grep("박", pw$contents), ] # pw2 <- pw[grep("원순...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/item_list.R \docType{class} \name{ItemList-class} \alias{ItemList-class} \alias{ItemList} \title{A class representing an Alveo Item List} \description{ A class representing an Alveo Item List } \section{Fields}{ \describe{ \item{\code{name}}...
/man/ItemList-class.Rd
permissive
Alveo/alveo-r
R
false
true
1,287
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/item_list.R \docType{class} \name{ItemList-class} \alias{ItemList-class} \alias{ItemList} \title{A class representing an Alveo Item List} \description{ A class representing an Alveo Item List } \section{Fields}{ \describe{ \item{\code{name}}...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/simSet.R \name{simSets} \alias{simSets} \title{simSets} \usage{ simSets(n = 1000, pA, pB, playTiebreak = TRUE, players = c("A", "B"), p2A = NULL, firstServeA = NULL, p2B = NULL, firstServeB = NULL, .progress = "none") } \arguments...
/man/simSets.Rd
no_license
durtal/servevolleyR
R
false
false
1,867
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/simSet.R \name{simSets} \alias{simSets} \title{simSets} \usage{ simSets(n = 1000, pA, pB, playTiebreak = TRUE, players = c("A", "B"), p2A = NULL, firstServeA = NULL, p2B = NULL, firstServeB = NULL, .progress = "none") } \arguments...
glmm_final_multi_random<-function(y,X,W,k,q_start,K,Delta_start,s,n,steps=1000,family,method, overdispersion,phi,nue=1,rnd.len,print.iter.final=FALSE,flushit, eps.final=1e-5,Q.min=1e-13,Q.max=20,Q.fac=5) { ## Print stuff. ia <- if(flushit) inter...
/R/glmm_final_multi_random.r
no_license
cran/glmmLasso
R
false
false
17,016
r
glmm_final_multi_random<-function(y,X,W,k,q_start,K,Delta_start,s,n,steps=1000,family,method, overdispersion,phi,nue=1,rnd.len,print.iter.final=FALSE,flushit, eps.final=1e-5,Q.min=1e-13,Q.max=20,Q.fac=5) { ## Print stuff. ia <- if(flushit) inter...
a <- read.table("household_power_consumption.txt", skip = 66637, nrows = 2880, sep = ";") h <- t(read.table("household_power_consumption.txt", nrows = 1, sep = ";")) h <- as.vector(h[,1]) colnames(a) <- h h <- paste(as.vector(a[,1]),as.vector(a[,2]),sep=" ") x <- strptime(h, format = "%d/%m/%Y %H:%M:%S"...
/plot2.R
no_license
monalisap90/ExData_Plotting1
R
false
false
445
r
a <- read.table("household_power_consumption.txt", skip = 66637, nrows = 2880, sep = ";") h <- t(read.table("household_power_consumption.txt", nrows = 1, sep = ";")) h <- as.vector(h[,1]) colnames(a) <- h h <- paste(as.vector(a[,1]),as.vector(a[,2]),sep=" ") x <- strptime(h, format = "%d/%m/%Y %H:%M:%S"...
#' @title Retrieves prior estimated models. #' #' @description Retrieve various models trained on \code{\link{GameDayPlays}} data. #' #' @details This function will retrieve various models based on the MLBAM data #' set and the openWAR framework. Currently this only returns the Run Expectancy Model. #' #' @param da...
/R/getModels.R
no_license
benjamin-stockton/openWAR
R
false
false
10,285
r
#' @title Retrieves prior estimated models. #' #' @description Retrieve various models trained on \code{\link{GameDayPlays}} data. #' #' @details This function will retrieve various models based on the MLBAM data #' set and the openWAR framework. Currently this only returns the Run Expectancy Model. #' #' @param da...
.DB.CONFIG <- 'db.config' .DATABASE.YML <- 'database.yml' .DB.CONNECTIONS <- 'db.connections' .RPORT.STORE <- 'rport.store' .DB.DRIVER <- 'db.driver' .RPORT.DB.CONFIG <- 'RPORT_DB_CONFIG' .OPTION.MAX.QUERY.LENGTH <- 'rport-max-sql-query-log-length' .OPTION.MAX.CON <- 'rport-max-db-driver-c...
/R/rport.R
permissive
adjust/rport
R
false
false
11,889
r
.DB.CONFIG <- 'db.config' .DATABASE.YML <- 'database.yml' .DB.CONNECTIONS <- 'db.connections' .RPORT.STORE <- 'rport.store' .DB.DRIVER <- 'db.driver' .RPORT.DB.CONFIG <- 'RPORT_DB_CONFIG' .OPTION.MAX.QUERY.LENGTH <- 'rport-max-sql-query-log-length' .OPTION.MAX.CON <- 'rport-max-db-driver-c...
test_that("mda + predict() works", { skip_on_cran() skip_if_not_installed("mda") suppressPackageStartupMessages(library(mda)) fit <- mda(Species ~ ., data = iris) x <- axe_call(fit) expect_equal(x$call, rlang::expr(dummy_call())) expect_error(update(x, subclasses = 4)) expect_equal(attr(x, "butcher_disa...
/tests/testthat/test-mda.R
permissive
tidymodels/butcher
R
false
false
3,297
r
test_that("mda + predict() works", { skip_on_cran() skip_if_not_installed("mda") suppressPackageStartupMessages(library(mda)) fit <- mda(Species ~ ., data = iris) x <- axe_call(fit) expect_equal(x$call, rlang::expr(dummy_call())) expect_error(update(x, subclasses = 4)) expect_equal(attr(x, "butcher_disa...
\name{mappa.hg19.1kb.50mer} \alias{mappa.hg19.1kb.50mer} \docType{data} \title{ mappa.hg19.1kb.50mer } \description{ Gene locus mappability data, calculated for: \itemize{ \item Build: hg19 \item Locus definition: 1kb \item K-Mer Reads: 50mer } These objects are used internally by the \code{chipenrich} ...
/man/mappa.hg19.1kb.50mer.Rd
no_license
wangk4/chipenrich.data
R
false
false
676
rd
\name{mappa.hg19.1kb.50mer} \alias{mappa.hg19.1kb.50mer} \docType{data} \title{ mappa.hg19.1kb.50mer } \description{ Gene locus mappability data, calculated for: \itemize{ \item Build: hg19 \item Locus definition: 1kb \item K-Mer Reads: 50mer } These objects are used internally by the \code{chipenrich} ...
get_remote_url <- function(path) { r <- git2r::repository(path, discover = TRUE) remote_names <- git2r::remotes(r) if (!length(remote_names)) { stopc("Failed to lookup git remotes") } remote_name <- "origin" if (!("origin" %in% remote_names)) { remote_name <- remote_names[1] warningc("No remote ...
/R/remote.R
no_license
zeehio/travis
R
false
false
1,074
r
get_remote_url <- function(path) { r <- git2r::repository(path, discover = TRUE) remote_names <- git2r::remotes(r) if (!length(remote_names)) { stopc("Failed to lookup git remotes") } remote_name <- "origin" if (!("origin" %in% remote_names)) { remote_name <- remote_names[1] warningc("No remote ...
library(crone) n <- 10 t <- 0:65 v <- heaviside(n - t, 0) * (1 - exp(-.15*t)) + heaviside(t - n, 0) * (1 - exp(-1.5)) * exp(-.15*(t - n)) plot(v ~ t, type = "l", ylim = c(0,1), yaxs = "i", ylab = "v", main = "Rescorla-Wagner Model in Step Funcion") abline(v = n, col = "red")
/products/Agent_Zero/code/Rescorla-WagnerStep.R
no_license
wmmurrah/computationalScience
R
false
false
309
r
library(crone) n <- 10 t <- 0:65 v <- heaviside(n - t, 0) * (1 - exp(-.15*t)) + heaviside(t - n, 0) * (1 - exp(-1.5)) * exp(-.15*(t - n)) plot(v ~ t, type = "l", ylim = c(0,1), yaxs = "i", ylab = "v", main = "Rescorla-Wagner Model in Step Funcion") abline(v = n, col = "red")
job_registry <- function() { .__JOB_REGISTRY__. } register_job <- function(job, registry = job_registry()) { registry[[job$id]] <- job } resolve_job <- function(id, registry = job_registry()) { # if we have an associated job object in the registry, use that if (exists(id, envir = registry)) return(regist...
/R/job-registry.R
no_license
anishsingh20/cloudml
R
false
false
907
r
job_registry <- function() { .__JOB_REGISTRY__. } register_job <- function(job, registry = job_registry()) { registry[[job$id]] <- job } resolve_job <- function(id, registry = job_registry()) { # if we have an associated job object in the registry, use that if (exists(id, envir = registry)) return(regist...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{rnaSeq} \alias{rnaSeq} \title{A sample RNA-seq dataset containing 4,000 genes and 8 individuals (4M, 4F), each with 15 immune-specific cell types present.} \format{ A data frame with columns: \describe{ \item{Male1...
/man/rnaSeq.Rd
no_license
JasonPBennett/GECO
R
false
true
8,529
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{rnaSeq} \alias{rnaSeq} \title{A sample RNA-seq dataset containing 4,000 genes and 8 individuals (4M, 4F), each with 15 immune-specific cell types present.} \format{ A data frame with columns: \describe{ \item{Male1...
##### ## ## Getting & Cleaning Data (https://class.coursera.org/getdata-008) Course Project ## ------------------------------------------------------------------------------- ## ## Instructions: ## ------------- ## ## 1. Set your working directory ## I'm fine with: setwd("~/coursera/getting_data/course_project") ##...
/run_analysis.R
no_license
szamehlg/GetAndCleanDataCourse
R
false
false
9,997
r
##### ## ## Getting & Cleaning Data (https://class.coursera.org/getdata-008) Course Project ## ------------------------------------------------------------------------------- ## ## Instructions: ## ------------- ## ## 1. Set your working directory ## I'm fine with: setwd("~/coursera/getting_data/course_project") ##...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/seAUC.R \name{seAUC} \alias{seAUC} \title{Calculates the standard error of the AUC} \usage{ seAUC(n, x, points) } \arguments{ \item{n}{a numeric value specifying the number of models in the best subset outputted by DesktopGARP} \item{x}{a ra...
/man/seAUC.Rd
no_license
AlassaneB/GARPTools
R
false
true
1,422
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/seAUC.R \name{seAUC} \alias{seAUC} \title{Calculates the standard error of the AUC} \usage{ seAUC(n, x, points) } \arguments{ \item{n}{a numeric value specifying the number of models in the best subset outputted by DesktopGARP} \item{x}{a ra...
# load data into R temp<-tempfile() file <-"https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(file,temp) data <-read.table(unz(temp,"household_power_consumption.txt"),skip=66637,nrows=2880,sep=';',na.string='?') unlink(temp) # convert the Date and Time variables to Da...
/plot1.R
no_license
xinmiaozhang/ExData_Plotting1
R
false
false
620
r
# load data into R temp<-tempfile() file <-"https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip" download.file(file,temp) data <-read.table(unz(temp,"household_power_consumption.txt"),skip=66637,nrows=2880,sep=';',na.string='?') unlink(temp) # convert the Date and Time variables to Da...
# data.csv contains phone calling data to customers. Customer consumes services of business house and next month customer have to pay. Company dials their customers to collect the payment. # Data I have for every call "call_type, system_disposition, call_originate_time, num_attempts, customer_profile, customer_id, pro...
/CallingPattern_LinearRegression.R
no_license
drishtiml/ML1
R
false
false
6,313
r
# data.csv contains phone calling data to customers. Customer consumes services of business house and next month customer have to pay. Company dials their customers to collect the payment. # Data I have for every call "call_type, system_disposition, call_originate_time, num_attempts, customer_profile, customer_id, pro...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/internal.R \name{backup} \alias{backup} \title{backup a file to backup/ folder, avoid overwriting it.} \usage{ backup(filename, ifbackup = TRUE) } \arguments{ \item{filename}{the file to backup} \item{ifbackup}{whether to backup} ...
/man/backup.Rd
no_license
cran/bookdownplus
R
false
true
428
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/internal.R \name{backup} \alias{backup} \title{backup a file to backup/ folder, avoid overwriting it.} \usage{ backup(filename, ifbackup = TRUE) } \arguments{ \item{filename}{the file to backup} \item{ifbackup}{whether to backup} ...
data <- read.csv("household_power_consumption.txt", header=TRUE, sep=';', na.strings="?", stringsAsFactors=FALSE) data$Date <- as.Date(data$Date, format="%d/%m/%Y") data <- subset(data, subset=(Date >= "2007-02-01" & Date <= "2007-02-02")) datetime <- paste(as.Date(data$Date), data$Time) data$Dateti...
/plot1.R
no_license
TylerCrain/Exploratory-Data-Project1
R
false
false
547
r
data <- read.csv("household_power_consumption.txt", header=TRUE, sep=';', na.strings="?", stringsAsFactors=FALSE) data$Date <- as.Date(data$Date, format="%d/%m/%Y") data <- subset(data, subset=(Date >= "2007-02-01" & Date <= "2007-02-02")) datetime <- paste(as.Date(data$Date), data$Time) data$Dateti...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cac.dist4cat_doc.R \docType{data} \name{cac.dist4cat} \alias{cac.dist4cat} \title{Distribution of 4 raters by Category and Subject - Subjects allocated in 2 groups A and B.} \format{This dataset has 15 rows (for the 15 subjects) and 4 c...
/man/cac.dist4cat.Rd
no_license
cran/irrCAC
R
false
true
853
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cac.dist4cat_doc.R \docType{data} \name{cac.dist4cat} \alias{cac.dist4cat} \title{Distribution of 4 raters by Category and Subject - Subjects allocated in 2 groups A and B.} \format{This dataset has 15 rows (for the 15 subjects) and 4 c...
#' Function to extract highest posterior density intervals. #' HPDI corresponds to the 'shortest' intervals that contain p fraction of the samples. #' @param x Samples of one parameter or a CMR_fit. #' @param p probability. Defaults to 0.95. #' @return returns hpdi and exact probability of the interval, either for the ...
/R/HPDI.R
no_license
josteist/Compadre
R
false
false
1,432
r
#' Function to extract highest posterior density intervals. #' HPDI corresponds to the 'shortest' intervals that contain p fraction of the samples. #' @param x Samples of one parameter or a CMR_fit. #' @param p probability. Defaults to 0.95. #' @return returns hpdi and exact probability of the interval, either for the ...
load("geo.Rdata") geo<-geo[!is.na(geo$month) & geo$month==9 & geo$year==2020,] load("df.Rdata") geo$indf<-geo$nces %in% unique(df$nces) ########################################### ##seda f<-function(nm) { tmp<-geo[!is.na(geo[[nm]]),] #tmp<-geo[,c("nces","seda","state_abb")] #tmp<-tmp[!is.na(tmp$seda),] ...
/C_geodesc.R
no_license
ben-domingue/orf
R
false
false
3,123
r
load("geo.Rdata") geo<-geo[!is.na(geo$month) & geo$month==9 & geo$year==2020,] load("df.Rdata") geo$indf<-geo$nces %in% unique(df$nces) ########################################### ##seda f<-function(nm) { tmp<-geo[!is.na(geo[[nm]]),] #tmp<-geo[,c("nces","seda","state_abb")] #tmp<-tmp[!is.na(tmp$seda),] ...
# Module UI #' @title mod_05_usage_ui and mod_05_usage_server #' @description A shiny Module to get the usage for the user defined window #' to show them how much their content is being used, when it is being used and #' who is using it. #' #' @param id shiny id #' @param input internal #' @param output inter...
/R/mod_05_usage.R
permissive
colearendt/connectAnalytics
R
false
false
20,491
r
# Module UI #' @title mod_05_usage_ui and mod_05_usage_server #' @description A shiny Module to get the usage for the user defined window #' to show them how much their content is being used, when it is being used and #' who is using it. #' #' @param id shiny id #' @param input internal #' @param output inter...
#' Unnest data along a column #' #' Unnesting is an (optional) explode operation coupled with a nested select to promote the sub-fields of #' the exploded top level array/map/struct to the top level. Hence, given \code{a}, an array with fields #' \code{a1, a2, a3}, then code{sdf_explode(df, a)} will produce output wit...
/R/unnest.R
permissive
dalloliogm/sparklyr.nested
R
false
false
3,234
r
#' Unnest data along a column #' #' Unnesting is an (optional) explode operation coupled with a nested select to promote the sub-fields of #' the exploded top level array/map/struct to the top level. Hence, given \code{a}, an array with fields #' \code{a1, a2, a3}, then code{sdf_explode(df, a)} will produce output wit...
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setinv <- function(inv) m <<- inv getinv <- funct...
/cachematrix.R
no_license
javieragsa/ProgrammingAssignment2
R
false
false
696
r
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setinv <- function(inv) m <<- inv getinv <- funct...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plotPbExprs.R \name{plotPbExprs} \alias{plotPbExprs} \alias{plotMedExprs} \title{Pseudobulk-level boxplot} \usage{ plotPbExprs( x, k = "meta20", features = "state", assay = "exprs", fun = c("median", "mean", "sum"), facet_by = c("...
/man/plotPbExprs.Rd
no_license
HelenaLC/CATALYST
R
false
true
3,466
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plotPbExprs.R \name{plotPbExprs} \alias{plotPbExprs} \alias{plotMedExprs} \title{Pseudobulk-level boxplot} \usage{ plotPbExprs( x, k = "meta20", features = "state", assay = "exprs", fun = c("median", "mean", "sum"), facet_by = c("...
# Change this global variable to match your own system's path ANQIS.ROOT.PATH <- "/Users/anqi_fu/Documents/workspace/" ANQIS.WIN.PATH <- "C:/Users/Anqi/Documents/Work/" SPENCERS.ROOT.PATH <- "/Users/spencer/0xdata/" ROOT.PATH <- ANQIS.ROOT.PATH DEV.PATH <- "h2o-3/h2o-r/h2o-package/R/" FULL.PATH <- paste(ROOT.PATH, DEV...
/h2o-r/H2O_Load.R
permissive
yuecong/h2o-3
R
false
false
1,098
r
# Change this global variable to match your own system's path ANQIS.ROOT.PATH <- "/Users/anqi_fu/Documents/workspace/" ANQIS.WIN.PATH <- "C:/Users/Anqi/Documents/Work/" SPENCERS.ROOT.PATH <- "/Users/spencer/0xdata/" ROOT.PATH <- ANQIS.ROOT.PATH DEV.PATH <- "h2o-3/h2o-r/h2o-package/R/" FULL.PATH <- paste(ROOT.PATH, DEV...
library(tidyverse) library(data.table) library(rvest) race_results <- function(x){ url <- read_html(x) #### Pull race names gp_name <- url %>% html_nodes('.limiter+ .bold') %>% html_text() if (length(gp_name) ==0) { gp_name <- ''} else { # fix race names gp_name <- trimws(gsub("\n","",gp_name)) ...
/F1_Winners_Analysis_Web_Scraping/f1_results.R
no_license
fatimamalikk/Data_Science_Portfolio
R
false
false
2,073
r
library(tidyverse) library(data.table) library(rvest) race_results <- function(x){ url <- read_html(x) #### Pull race names gp_name <- url %>% html_nodes('.limiter+ .bold') %>% html_text() if (length(gp_name) ==0) { gp_name <- ''} else { # fix race names gp_name <- trimws(gsub("\n","",gp_name)) ...
test_that("backlink works", { backlink_check <- backlink_Input("backId") expect_identical( backlink_check$children[[1]], "Back" ) })
/tests/testthat/test-backlink_Input.R
no_license
moj-analytical-services/shinyGovstyle
R
false
false
149
r
test_that("backlink works", { backlink_check <- backlink_Input("backId") expect_identical( backlink_check$children[[1]], "Back" ) })
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/chapters-auto.R \name{ch09} \alias{ch09} \alias{ch9} \title{Print examples of chapter 9 of 'R for Dummies'.} \usage{ ch09() ch9() } \description{ To print a listing of all examples of a chapter, use \code{ch9()}. To run all the examp...
/man/ch09.Rd
no_license
mafed/rfordummies
R
false
false
6,168
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/chapters-auto.R \name{ch09} \alias{ch09} \alias{ch9} \title{Print examples of chapter 9 of 'R for Dummies'.} \usage{ ch09() ch9() } \description{ To print a listing of all examples of a chapter, use \code{ch9()}. To run all the examp...
############################################################ ## I: Forecasting bus ridership by route ## ## Apoorva Bhide ## ## 16 August 2018 ## ############################################################ setwd('~/R ...
/cta_project.R
no_license
apoorvabhide/chicago_transit_authority_project
R
false
false
3,447
r
############################################################ ## I: Forecasting bus ridership by route ## ## Apoorva Bhide ## ## 16 August 2018 ## ############################################################ setwd('~/R ...
#Getting Data no_trans<-dbGetQuery(con,statement='select Mobile,Qty,Dt from sku_data where (Mobile!=\'NULL\' and SUB_CATEGORY!=\'CARRY BAG\' and DEPARTMENT!=\'NULL\' and Qty>0)') no_trans<-data.table(no_trans) no_trans<-no_trans[order(Mobile,-rank(Dt))] #Function data<-no_trans[,.(tqty=sum(Qty)),by=list(Mobile,D...
/avgitem_last3.R
no_license
Ashish0923/rewardz
R
false
false
776
r
#Getting Data no_trans<-dbGetQuery(con,statement='select Mobile,Qty,Dt from sku_data where (Mobile!=\'NULL\' and SUB_CATEGORY!=\'CARRY BAG\' and DEPARTMENT!=\'NULL\' and Qty>0)') no_trans<-data.table(no_trans) no_trans<-no_trans[order(Mobile,-rank(Dt))] #Function data<-no_trans[,.(tqty=sum(Qty)),by=list(Mobile,D...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/processing_functions.r \name{calculate_actions_per_AU} \alias{calculate_actions_per_AU} \title{Calculate average actions per WAU for each user group, subaggregate, and aggregate, and for each date range.} \usage{ calculate_actions_per_AU(lon...
/man/calculate_actions_per_AU.Rd
no_license
johnchower/flashreport
R
false
true
867
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/processing_functions.r \name{calculate_actions_per_AU} \alias{calculate_actions_per_AU} \title{Calculate average actions per WAU for each user group, subaggregate, and aggregate, and for each date range.} \usage{ calculate_actions_per_AU(lon...
\name{batchProcess-methods} \docType{methods} \alias{batchProcess} \alias{batchProcess-methods} \alias{batchProcess,MSImageSet-method} \title{Batch Pre-Processing on an Imaging Dataset} \description{ Batch apply multiple pre-processing steps on an imaging dataset. } \usage{ \S4method{batchProcess}{MSImageSet}(object...
/man/batchProcess-methods.Rd
no_license
DanGuo1223/Cardinal
R
false
false
3,812
rd
\name{batchProcess-methods} \docType{methods} \alias{batchProcess} \alias{batchProcess-methods} \alias{batchProcess,MSImageSet-method} \title{Batch Pre-Processing on an Imaging Dataset} \description{ Batch apply multiple pre-processing steps on an imaging dataset. } \usage{ \S4method{batchProcess}{MSImageSet}(object...
#creates a new file firstforest to test against the test data #---------------------------------------------------------------------------------- #churn <- read.csv("churn_tel.csv") churnTrain <- churn[800:3300, ] churnTest <- churn[1:500, ] fit <- randomForest( as.factor(Churn.) ~ Int.l.Plan + VMail.Plan + Cu...
/randomForestTest.R
no_license
shantanuraje/Churn-Prediction
R
false
false
1,004
r
#creates a new file firstforest to test against the test data #---------------------------------------------------------------------------------- #churn <- read.csv("churn_tel.csv") churnTrain <- churn[800:3300, ] churnTest <- churn[1:500, ] fit <- randomForest( as.factor(Churn.) ~ Int.l.Plan + VMail.Plan + Cu...
rm(list = ls()) setwd("C:/Users/User/Desktop/RandomForest") #---------------------------------------------------------------------------- # Load Data Set load("TrainingData40Var.RData") data <- trainingSetFinal # Create Data Set with all numeric Variables numerics <- which(sapply(data, is.numeric)) #------------...
/Missing_Values/Imputation.R
no_license
Marius239/BADS_SWT
R
false
false
746
r
rm(list = ls()) setwd("C:/Users/User/Desktop/RandomForest") #---------------------------------------------------------------------------- # Load Data Set load("TrainingData40Var.RData") data <- trainingSetFinal # Create Data Set with all numeric Variables numerics <- which(sapply(data, is.numeric)) #------------...
library(Smisc) ### Name: plotFun ### Title: Plot one or more functions on a single plot ### Aliases: plotFun ### ** Examples # A single function with a single argument f <- function(x) x^2 plotFun(f, c(-2, 3), col = "Black", lty = 2, las = 1) # A handful of beta density functions, note how they take a single argum...
/data/genthat_extracted_code/Smisc/examples/plotFun.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
794
r
library(Smisc) ### Name: plotFun ### Title: Plot one or more functions on a single plot ### Aliases: plotFun ### ** Examples # A single function with a single argument f <- function(x) x^2 plotFun(f, c(-2, 3), col = "Black", lty = 2, las = 1) # A handful of beta density functions, note how they take a single argum...
data <- read.csv(file="C:/Users/Madhumita/Downloads/bank-additional-full.csv",header=TRUE,sep=';') train <- data names(train) library(caTools) library(ROCR) library(e1071) set.seed(88) split <- sample.split(train$y, SplitRatio = 0.75) Train <- subset(train, split == TRUE) Test <- subset(train, split == FALSE)...
/Bank marketing analysis.R
no_license
MadhumitaSelvan/Bank-Telemarketing-Campaign-Analysis
R
false
false
1,096
r
data <- read.csv(file="C:/Users/Madhumita/Downloads/bank-additional-full.csv",header=TRUE,sep=';') train <- data names(train) library(caTools) library(ROCR) library(e1071) set.seed(88) split <- sample.split(train$y, SplitRatio = 0.75) Train <- subset(train, split == TRUE) Test <- subset(train, split == FALSE)...
#:# libraries library(digest) library(mlr) library(OpenML) library(farff) #:# config set.seed(1) #:# data dataset <- getOMLDataSet(data.name = "fried") head(dataset$data) #:# preprocessing head(dataset$data) #:# model task = makeRegrTask(id = "task", data = dataset$data, target = "Y") lrn = makeLearner("regr.svm", ...
/models/openml_fried/regression_Y/0889f68faa9a9c099c2f4a0d00ba38ce/code.R
no_license
lukaszbrzozowski/CaseStudies2019S
R
false
false
656
r
#:# libraries library(digest) library(mlr) library(OpenML) library(farff) #:# config set.seed(1) #:# data dataset <- getOMLDataSet(data.name = "fried") head(dataset$data) #:# preprocessing head(dataset$data) #:# model task = makeRegrTask(id = "task", data = dataset$data, target = "Y") lrn = makeLearner("regr.svm", ...
library(mboxr) ### Name: merge_mbox_all ### Title: Merging all mbox files in current directory into one tibble. ### Aliases: merge_mbox_all ### Keywords: merge_mbox_all ### ** Examples ## No test: # Changing working directory to temp for the demonstration purpose only. setwd(tempdir()) library(mboxr) test_path <- ...
/data/genthat_extracted_code/mboxr/examples/merge_mbox_all.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
555
r
library(mboxr) ### Name: merge_mbox_all ### Title: Merging all mbox files in current directory into one tibble. ### Aliases: merge_mbox_all ### Keywords: merge_mbox_all ### ** Examples ## No test: # Changing working directory to temp for the demonstration purpose only. setwd(tempdir()) library(mboxr) test_path <- ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/loadModels.R \name{loadModels} \alias{loadModels} \title{Load Built-in GAM formulas} \usage{ loadModels(gamSelect = "gam4") } \arguments{ \item{gamSelect}{character vector of models (Current options include gam0, gam1, gam2, gam3, gam4, gam5)...
/man/loadModels.Rd
no_license
tetratech/baytrends
R
false
true
993
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/loadModels.R \name{loadModels} \alias{loadModels} \title{Load Built-in GAM formulas} \usage{ loadModels(gamSelect = "gam4") } \arguments{ \item{gamSelect}{character vector of models (Current options include gam0, gam1, gam2, gam3, gam4, gam5)...
#' A code.title function #' #' this function allows you to create title for codes with date #' @param what content you want to put in the title #' @export #' examples #' title("nice") code.title <- function(what){ len <- nchar(what) cat("# -------------------------------------------------------------------------...
/gemini/R/title.R
no_license
yishan-guo/gemini
R
false
false
656
r
#' A code.title function #' #' this function allows you to create title for codes with date #' @param what content you want to put in the title #' @export #' examples #' title("nice") code.title <- function(what){ len <- nchar(what) cat("# -------------------------------------------------------------------------...
#' Clip (limit) the values in a vector #' #' \code{clip} constrains the values in numeric vector \code{x} to the range #' [\code{low},\code{high}] #' #' @note This function is deprecated. #' @note Code should be updated to use \code{\link{squish}} from the #' \code{scales} package. #' #' @param x A numeric vector #'...
/R/clip.R
no_license
briandconnelly/bdcR
R
false
false
671
r
#' Clip (limit) the values in a vector #' #' \code{clip} constrains the values in numeric vector \code{x} to the range #' [\code{low},\code{high}] #' #' @note This function is deprecated. #' @note Code should be updated to use \code{\link{squish}} from the #' \code{scales} package. #' #' @param x A numeric vector #'...
#Load libraries install.packages("GGally") install.packages("scales") install.packages("memisc") library(ggplot2) library(dplyr) library(scales) library(GGally) library(memisc) library(gridExtra) #Load data data(diamonds) head(diamonds) diamonds$volume = diamonds$x * diamonds$y * diamonds$z # Let's consider the p...
/Lesson2-R/lesson6/linear_test.R
no_license
Julius-Verne/Data_Analyst_ND
R
false
false
2,466
r
#Load libraries install.packages("GGally") install.packages("scales") install.packages("memisc") library(ggplot2) library(dplyr) library(scales) library(GGally) library(memisc) library(gridExtra) #Load data data(diamonds) head(diamonds) diamonds$volume = diamonds$x * diamonds$y * diamonds$z # Let's consider the p...
#read the data pwr<-read.table("household_power_consumption.txt", header=TRUE, sep = ";", stringsAsFactors = FALSE, dec=".") #subset as per dates dts<- c("1/2/2007", "2/2/2007") pwr<-pwr[pwr$Date %in% dts ,] #converting Global_active_power pwr$Global_active_power<-as.numeric(pwr$Global_active_power) pwr$Sub_metering_1<...
/plot3.R
no_license
pravekl/ExData_Plotting1
R
false
false
942
r
#read the data pwr<-read.table("household_power_consumption.txt", header=TRUE, sep = ";", stringsAsFactors = FALSE, dec=".") #subset as per dates dts<- c("1/2/2007", "2/2/2007") pwr<-pwr[pwr$Date %in% dts ,] #converting Global_active_power pwr$Global_active_power<-as.numeric(pwr$Global_active_power) pwr$Sub_metering_1<...
#' emlinkMARmov #' #' Expectation-Maximization algorithm for Record Linkage under the #' Missing at Random (MAR) assumption. #' #' @usage emlinkMARmov(patterns, nobs.a, nobs.b, p.m, iter.max, #' tol, p.gamma.k.m, p.gamma.k.u, prior.lambda, w.lambda, #' prior.pi, w.pi, address.field, gender.field, varnames) #' #' @param...
/R/emlinkMARmov.R
no_license
kosukeimai/fastLink
R
false
false
20,039
r
#' emlinkMARmov #' #' Expectation-Maximization algorithm for Record Linkage under the #' Missing at Random (MAR) assumption. #' #' @usage emlinkMARmov(patterns, nobs.a, nobs.b, p.m, iter.max, #' tol, p.gamma.k.m, p.gamma.k.u, prior.lambda, w.lambda, #' prior.pi, w.pi, address.field, gender.field, varnames) #' #' @param...
data("Gulk", package = "riverdist") library(raster) x <- sf::st_as_sf(sp::disaggregate(Gulk$sp)[1, ]) ## better to segmentize this one x <- sf::st_segmentize(x, 5) crs <- sf::st_crs(x) x <- sf::st_set_crs(x, NA) library(basf) buf <- 100 buffer <- sf::st_buffer(x, buf) ## use divisor to give rough num triangles mesh <...
/inst/example/snek0.R
no_license
Trackage/snek
R
false
false
958
r
data("Gulk", package = "riverdist") library(raster) x <- sf::st_as_sf(sp::disaggregate(Gulk$sp)[1, ]) ## better to segmentize this one x <- sf::st_segmentize(x, 5) crs <- sf::st_crs(x) x <- sf::st_set_crs(x, NA) library(basf) buf <- 100 buffer <- sf::st_buffer(x, buf) ## use divisor to give rough num triangles mesh <...
shinyUI( fluidPage( tags$head( # jQuery tags$script(src="http://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"), # Loading icon CSS tags$style(".loader, .loader:before, .loader:after { background: #000000; -webkit-animation: load1 1s infinite ease-in-out; animation: load1 1...
/ui.R
no_license
rlangefe/FintechHackathon
R
false
false
2,765
r
shinyUI( fluidPage( tags$head( # jQuery tags$script(src="http://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"), # Loading icon CSS tags$style(".loader, .loader:before, .loader:after { background: #000000; -webkit-animation: load1 1s infinite ease-in-out; animation: load1 1...
# { # 'created_on' : '5 May 2017', # 'aim_of_rscript' : 'Using proper and variable names in R', # 'coded_by' : 'Rishikesh Agrawani', # } arr = c(12, 45, 67) my_fav_fruits3 = c("Apple", "Pine apple", "Grape") .fruits = array( c("Apple", "Grape", "Orange") ) integers.vector = c(1, 5, 7, 9) print(arr) print(my_f...
/src/03_variables/varibale_naming.R
permissive
hygull/rscript
R
false
false
479
r
# { # 'created_on' : '5 May 2017', # 'aim_of_rscript' : 'Using proper and variable names in R', # 'coded_by' : 'Rishikesh Agrawani', # } arr = c(12, 45, 67) my_fav_fruits3 = c("Apple", "Pine apple", "Grape") .fruits = array( c("Apple", "Grape", "Orange") ) integers.vector = c(1, 5, 7, 9) print(arr) print(my_f...
#' @include utilities.R NULL #' Welch One-Way ANOVA Test #' #' @description Tests for equal means in a one-way design (not assuming equal #' variance). A wrapper around the base function #' \code{\link[stats]{oneway.test}()}. This is is an alternative to the #' standard one-way ANOVA in the situation where the ho...
/R/welch_anova_test.R
no_license
kassambara/rstatix
R
false
false
2,200
r
#' @include utilities.R NULL #' Welch One-Way ANOVA Test #' #' @description Tests for equal means in a one-way design (not assuming equal #' variance). A wrapper around the base function #' \code{\link[stats]{oneway.test}()}. This is is an alternative to the #' standard one-way ANOVA in the situation where the ho...
## Put comments here that give an overall description of what your ## functions do ## This function creates a list with functions makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setinverse <- function(inverse) m <<- inverse getinv...
/cachematrix.R
no_license
emirmkd/ProgrammingAssignment2
R
false
false
767
r
## Put comments here that give an overall description of what your ## functions do ## This function creates a list with functions makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setinverse <- function(inverse) m <<- inverse getinv...
source('~/NBS-DS/R/impala/transforms.R') # Unit tests for impala/transforms.R functions #' Tests the validity of timeseries unstacking for metrics #' with only total values (e.g. Facebook Page Likes) test.UnstackTimeseries.TotalsOnly = function() { InterpolationValidation(11) InterpolationValidation(28) } #' Tes...
/demonstrative/R/impala/transforms_utest.R
no_license
eric-czech/portfolio
R
false
false
3,384
r
source('~/NBS-DS/R/impala/transforms.R') # Unit tests for impala/transforms.R functions #' Tests the validity of timeseries unstacking for metrics #' with only total values (e.g. Facebook Page Likes) test.UnstackTimeseries.TotalsOnly = function() { InterpolationValidation(11) InterpolationValidation(28) } #' Tes...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/findStudiesInCluster.R \name{findStudiesInCluster} \alias{findStudiesInCluster} \title{Find the studies contributing each RAV} \usage{ findStudiesInCluster(RAVmodel, ind = NULL, studyTitle = FALSE) } \arguments{ \item{RAVmodel}{PCAGenomicSign...
/man/findStudiesInCluster.Rd
no_license
shbrief/GenomicSuperSignature
R
false
true
1,233
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/findStudiesInCluster.R \name{findStudiesInCluster} \alias{findStudiesInCluster} \title{Find the studies contributing each RAV} \usage{ findStudiesInCluster(RAVmodel, ind = NULL, studyTitle = FALSE) } \arguments{ \item{RAVmodel}{PCAGenomicSign...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RCMIP5.R \name{print.summary.cmip5data} \alias{print.summary.cmip5data} \title{Print the summary for a 'cmip5data' class object.} \usage{ \method{print}{summary.cmip5data}(x, ...) } \arguments{ \item{x}{A \code{\link{cmip5data}} object} \ite...
/man/print.summary.cmip5data.Rd
no_license
cran/RCMIP5
R
false
true
499
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RCMIP5.R \name{print.summary.cmip5data} \alias{print.summary.cmip5data} \title{Print the summary for a 'cmip5data' class object.} \usage{ \method{print}{summary.cmip5data}(x, ...) } \arguments{ \item{x}{A \code{\link{cmip5data}} object} \ite...
`putBack` <- function(n,blocklist,blockvalues){ x<-rep(0,n);nb<-length(blockvalues) for (i in 1:nb) { x[blocklist[i,1]:blocklist[i,2]]<-blockvalues[i]} return(x) }
/R/putBack.R
no_license
cran/homals
R
false
false
183
r
`putBack` <- function(n,blocklist,blockvalues){ x<-rep(0,n);nb<-length(blockvalues) for (i in 1:nb) { x[blocklist[i,1]:blocklist[i,2]]<-blockvalues[i]} return(x) }
context("listOMLDataSetQualities") skip_on_cran() test_that("listOMLDataSetQualities", { dsqs = .listOMLDataSetQualities() expect_data_frame(dsqs, min.rows = 64, ncols = 1) expect_set_equal(names(dsqs), "name") expect_character(dsqs$name, any.missing = FALSE, all.missing = FALSE) })
/tests/testthat/test_server_listOMLDataSetQualities.R
no_license
jonmcalder/openml-r
R
false
false
294
r
context("listOMLDataSetQualities") skip_on_cran() test_that("listOMLDataSetQualities", { dsqs = .listOMLDataSetQualities() expect_data_frame(dsqs, min.rows = 64, ncols = 1) expect_set_equal(names(dsqs), "name") expect_character(dsqs$name, any.missing = FALSE, all.missing = FALSE) })
library(shiny) # Compile a list of undergraduate concentrations available at Brown from the website, so # that if the concentrations are updated on the website, the list is also updated library(rvest) link <- html_session("https://bulletin.brown.edu/the-college/concentrations/") conc_list <- link %>% html_nodes("...
/shinyApp_BDegreeAdvisor.R
no_license
PHP2560-Statistical-Programming-R/r-package-courses-brown
R
false
false
1,639
r
library(shiny) # Compile a list of undergraduate concentrations available at Brown from the website, so # that if the concentrations are updated on the website, the list is also updated library(rvest) link <- html_session("https://bulletin.brown.edu/the-college/concentrations/") conc_list <- link %>% html_nodes("...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/delta_p.R \name{dP_cue_collex} \alias{dP_cue_collex} \title{Uni-directional measure \emph{Delta P} (Construction as the cue).} \usage{ dP_cue_collex(df, collstr_digit = NULL) } \arguments{ \item{df}{The output of \code{\link{assoc_prepare}}.}...
/man/dP_cue_collex.Rd
permissive
gederajeg/collogetr
R
false
true
865
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/delta_p.R \name{dP_cue_collex} \alias{dP_cue_collex} \title{Uni-directional measure \emph{Delta P} (Construction as the cue).} \usage{ dP_cue_collex(df, collstr_digit = NULL) } \arguments{ \item{df}{The output of \code{\link{assoc_prepare}}.}...
#!/usr/bin/env Rscript options(error=recover) library(phangorn) plotParameters <- par() triangleTest <- function(triangles,distMat) { for(i in 1:ncol(triangles)) { triangle <- triangles[,i] # print(paste("testing sample indices",triangle[1],triangle[2],triangle[3],"distances",distMat[triangle[1],triangle[2]],d...
/clr_vs_proportion_unifrac/megan_study/triangle_test_100.r
no_license
ruthgrace/InformationUniFrac
R
false
false
3,528
r
#!/usr/bin/env Rscript options(error=recover) library(phangorn) plotParameters <- par() triangleTest <- function(triangles,distMat) { for(i in 1:ncol(triangles)) { triangle <- triangles[,i] # print(paste("testing sample indices",triangle[1],triangle[2],triangle[3],"distances",distMat[triangle[1],triangle[2]],d...
# use tidy to return lm estimates and related information as a data frame library(broom) fit <- lm(R ~ BB, data = dat) tidy(fit) # add confidence intervals with tidy tidy(fit, conf.int = TRUE) # pipeline with lm, do, tidy dat %>% group_by(HR) %>% do(tidy(lm(R ~ BB, data = .), conf.int = TRUE)) %>% filter(term...
/7. Linear Regression/18. Broom.R
no_license
praveen556/R_Practice
R
false
false
690
r
# use tidy to return lm estimates and related information as a data frame library(broom) fit <- lm(R ~ BB, data = dat) tidy(fit) # add confidence intervals with tidy tidy(fit, conf.int = TRUE) # pipeline with lm, do, tidy dat %>% group_by(HR) %>% do(tidy(lm(R ~ BB, data = .), conf.int = TRUE)) %>% filter(term...
setGeneric('readGeolocationPoints', function(object) { standardGeneric('readGeolocationPoints') }) setMethod('readGeolocationPoints', 'SAR', function(object) { return(new('GeolocationPoints')) }) setMethod('readGeolocationPoints', 'Sentinel', function(object) { path <- file.path(object@address, 'annotatio...
/R/readGeolocationPoints.r
no_license
chezulkhairi/ragram
R
false
false
3,089
r
setGeneric('readGeolocationPoints', function(object) { standardGeneric('readGeolocationPoints') }) setMethod('readGeolocationPoints', 'SAR', function(object) { return(new('GeolocationPoints')) }) setMethod('readGeolocationPoints', 'Sentinel', function(object) { path <- file.path(object@address, 'annotatio...
rm(list=ls()) setwd("/Users/gigel/Documents/Speech EEG/Experiment 2/Experiment 2 datasets 3") library(car) dataCond <- read.csv("pow4_cond.csv") condLevels <-c(1:15) condFactor <-as.factor(condLevels) condFrame <- data.frame(condFactor) condBind <- cbind(dataCond$Vowel,dataCond$B,dataCond$D,dataCond$G,dataCond$K,dat...
/R Stats/pow4_analyses.R
no_license
phonemes-and-speech-entrainment/cv_syllables
R
false
false
1,792
r
rm(list=ls()) setwd("/Users/gigel/Documents/Speech EEG/Experiment 2/Experiment 2 datasets 3") library(car) dataCond <- read.csv("pow4_cond.csv") condLevels <-c(1:15) condFactor <-as.factor(condLevels) condFrame <- data.frame(condFactor) condBind <- cbind(dataCond$Vowel,dataCond$B,dataCond$D,dataCond$G,dataCond$K,dat...
### confBandCox.R --- #---------------------------------------------------------------------- ## author: Brice Ozenne ## created: apr 21 2017 (17:40) ## Version: ## last-updated: apr 28 2017 (10:59) ## By: Brice Ozenne ## Update #: 23 #------------------------------------------------------------------...
/R/confBandCox.R
no_license
PablitoCho/riskRegression
R
false
false
1,563
r
### confBandCox.R --- #---------------------------------------------------------------------- ## author: Brice Ozenne ## created: apr 21 2017 (17:40) ## Version: ## last-updated: apr 28 2017 (10:59) ## By: Brice Ozenne ## Update #: 23 #------------------------------------------------------------------...
# Time series data kings <- scan("http://robjhyndman.com/tsdldata/misc/kings.dat",skip=3) king.ts <- ts(kings) king.ts install.packages("TTR") library(TTR) par(mfrow=c(2 ,2)) plot(SMA(king.ts, n=2), main = "n=2") plot(SMA(king.ts, n=5), main = "n=5") plot(SMA(king.ts, n=10), main = "n=10") plot(SMA(king.ts, n=15), ma...
/Chapter04/scripts/TimeSeriesPrediction/mxNet.R
permissive
datascience4me/R-Data-Analysis-Projects
R
false
false
8,977
r
# Time series data kings <- scan("http://robjhyndman.com/tsdldata/misc/kings.dat",skip=3) king.ts <- ts(kings) king.ts install.packages("TTR") library(TTR) par(mfrow=c(2 ,2)) plot(SMA(king.ts, n=2), main = "n=2") plot(SMA(king.ts, n=5), main = "n=5") plot(SMA(king.ts, n=10), main = "n=10") plot(SMA(king.ts, n=15), ma...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/create_logo.R \name{create_logo} \alias{create_logo} \title{Customize useR! logo} \usage{ create_logo(colour = "#ffc0cb", year = 2020, folder) } \arguments{ \item{colour}{hex code of the colour for use and "!"} \item{year}{year of the confer...
/man/create_logo.Rd
permissive
lockedata/userlogo
R
false
true
520
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/create_logo.R \name{create_logo} \alias{create_logo} \title{Customize useR! logo} \usage{ create_logo(colour = "#ffc0cb", year = 2020, folder) } \arguments{ \item{colour}{hex code of the colour for use and "!"} \item{year}{year of the confer...
#'--- #' title: "PASS1A Rat Kidney: -- Modeling of RNASeq Data Expression" #' author: "Alec Steep & Jiayu Zhang (Code copied and adapted from Jun Z. Li)" #' date: "20200505" #' output: #' html_document: #' code_folding: hide #' toc: true #' highlight: zenburn #' #'--- #+ setup, includ...
/scripts/20200505_rnaseq-kidney-model-circadian-exercise_steep.R
no_license
steepale/20200309_rna-seq_steep
R
false
false
43,377
r
#'--- #' title: "PASS1A Rat Kidney: -- Modeling of RNASeq Data Expression" #' author: "Alec Steep & Jiayu Zhang (Code copied and adapted from Jun Z. Li)" #' date: "20200505" #' output: #' html_document: #' code_folding: hide #' toc: true #' highlight: zenburn #' #'--- #+ setup, includ...
\name{Rtwalk} \alias{Rtwalk} \docType{package} \Rdversion{1.0} \title{The R implementation of the 't-walk'} \description{ The 't-walk' is "A General Purpose Sampling Algorithm for Continuous Distributions", see http://www.cimat.mx/~jac/twalk/ for technical details. } \details{ % \tabular{ll}{ Package: ...
/Rtwalk/man/Rtwalk.Rd
permissive
andreschristen/t-walk
R
false
false
947
rd
\name{Rtwalk} \alias{Rtwalk} \docType{package} \Rdversion{1.0} \title{The R implementation of the 't-walk'} \description{ The 't-walk' is "A General Purpose Sampling Algorithm for Continuous Distributions", see http://www.cimat.mx/~jac/twalk/ for technical details. } \details{ % \tabular{ll}{ Package: ...
library(bayesutils) # Data n <- rep(50, 5) participant.errs <- c(0, 0, 20, 0, 1) s <- participant.errs dat <- list( "N" = length(n), "s" = s, "n" = n, "a_hyp" = 0, "b_hyp" = 1 ) inits <- function (){ list(ppi=runif(length(n))) } #Run the model: fit <- jags(d...
/Notes_scripts_bank/ex3_binomial-uniform_multiple_control_JAGS.R
no_license
npetraco/MATFOS705
R
false
false
1,352
r
library(bayesutils) # Data n <- rep(50, 5) participant.errs <- c(0, 0, 20, 0, 1) s <- participant.errs dat <- list( "N" = length(n), "s" = s, "n" = n, "a_hyp" = 0, "b_hyp" = 1 ) inits <- function (){ list(ppi=runif(length(n))) } #Run the model: fit <- jags(d...
## This script was used to determine the pKa for Tq-Ca-FLITS and jGCaMP7c from intensity data ## Part 1:contains # Fitting of model to the measurement data # Calculation of the dynamic range vs pH ## Part 2: contains # plotting the models with the measured data # add predictions require(modelr) #plotting data requi...
/R_scripts_for_modelling/pKa_intensity.R
no_license
Franka-van-der-Linden/Quantitative-Calcium-Imaging
R
false
false
5,213
r
## This script was used to determine the pKa for Tq-Ca-FLITS and jGCaMP7c from intensity data ## Part 1:contains # Fitting of model to the measurement data # Calculation of the dynamic range vs pH ## Part 2: contains # plotting the models with the measured data # add predictions require(modelr) #plotting data requi...
library(ape) library(phylotools) library(phangorn) PaupMaker <- function(path.ParentDir){ print("please cite the following when using these functions: Adams, R.H., Schield, D.R., Card, D.C., Corbin, A., Castoe, T.A., 2017. ThetaMater: Bayesian estimation of population size parameter h from genomic data. Bioinformati...
/R/Paup.Maker.R
no_license
eeiyowei/Misc.Statistics.Genetics.Models
R
false
false
4,695
r
library(ape) library(phylotools) library(phangorn) PaupMaker <- function(path.ParentDir){ print("please cite the following when using these functions: Adams, R.H., Schield, D.R., Card, D.C., Corbin, A., Castoe, T.A., 2017. ThetaMater: Bayesian estimation of population size parameter h from genomic data. Bioinformati...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/compute_objects.R \name{InstanceGroupsSetNamedPortsRequest} \alias{InstanceGroupsSetNamedPortsRequest} \title{InstanceGroupsSetNamedPortsRequest Object} \usage{ InstanceGroupsSetNamedPortsRequest(fingerprint = NULL, namedPorts = NULL) } \argu...
/googlecomputebeta.auto/man/InstanceGroupsSetNamedPortsRequest.Rd
permissive
Phippsy/autoGoogleAPI
R
false
true
808
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/compute_objects.R \name{InstanceGroupsSetNamedPortsRequest} \alias{InstanceGroupsSetNamedPortsRequest} \title{InstanceGroupsSetNamedPortsRequest Object} \usage{ InstanceGroupsSetNamedPortsRequest(fingerprint = NULL, namedPorts = NULL) } \argu...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/grass7_v_random.R \name{grass7_v_random} \alias{grass7_v_random} \title{QGIS algorithm v.random} \usage{ grass7_v_random( npoints = qgisprocess::qgis_default_value(), restrict = qgisprocess::qgis_default_value(), where = qgisprocess::qg...
/man/grass7_v_random.Rd
permissive
VB6Hobbyst7/r_package_qgis
R
false
true
3,786
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/grass7_v_random.R \name{grass7_v_random} \alias{grass7_v_random} \title{QGIS algorithm v.random} \usage{ grass7_v_random( npoints = qgisprocess::qgis_default_value(), restrict = qgisprocess::qgis_default_value(), where = qgisprocess::qg...
# load 2 packages that will be used to this assignment: # lubridate (Functions to work with date-times and time-spans); dplyr (Grammar of Data Manipulation) # all are in the CRAN if you need to install # all the exercises will be done using base plotting system # the data was downloaded from the course webpage and sav...
/code_graph3.R
no_license
marcelladane/ExData_Plotting1
R
false
false
1,819
r
# load 2 packages that will be used to this assignment: # lubridate (Functions to work with date-times and time-spans); dplyr (Grammar of Data Manipulation) # all are in the CRAN if you need to install # all the exercises will be done using base plotting system # the data was downloaded from the course webpage and sav...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/d.z.z.R \name{d.z.z} \alias{d.z.z} \title{d from z-statistic for Z-test} \usage{ d.z.z(z, sig = NA, n, a = 0.05) } \arguments{ \item{z}{z statistic} \item{sig}{population standard deviation} \item{n}{sample size} \item{a}{significance leve...
/man/d.z.z.Rd
no_license
Kebari2520/MOTE
R
false
true
1,664
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/d.z.z.R \name{d.z.z} \alias{d.z.z} \title{d from z-statistic for Z-test} \usage{ d.z.z(z, sig = NA, n, a = 0.05) } \arguments{ \item{z}{z statistic} \item{sig}{population standard deviation} \item{n}{sample size} \item{a}{significance leve...
# function to perform Games-Howel post-hoc test which does not assume equal variances and sample sizes # see: https://rpubs.com/aaronsc32/games-howell-test # src:https://stats.stackexchange.com/questions/83941/games-howell-post-hoc-test-in-r # #' @param y y has to be a numeric vector. #' @param x x has to be vector...
/FuelEconomy/posthocTGH.R
no_license
Many98/Cars93-analyses
R
false
false
6,478
r
# function to perform Games-Howel post-hoc test which does not assume equal variances and sample sizes # see: https://rpubs.com/aaronsc32/games-howell-test # src:https://stats.stackexchange.com/questions/83941/games-howell-post-hoc-test-in-r # #' @param y y has to be a numeric vector. #' @param x x has to be vector...
# F1.1-get ld snp information ## ================================================================================== ## Function: get_ldsnp_info_main ### Aim: To get HaploReg files from an input SNP file which contains a few SNPs and its corresponding risky population ### INPUT: index SNP list (a .csv file), with the ...
/R/F1.1-get_ldsnp_info.R
no_license
foreverycc/AlleleSNP_Package
R
false
false
13,859
r
# F1.1-get ld snp information ## ================================================================================== ## Function: get_ldsnp_info_main ### Aim: To get HaploReg files from an input SNP file which contains a few SNPs and its corresponding risky population ### INPUT: index SNP list (a .csv file), with the ...
cat("\014") # Clear your console rm(list = ls()) #clear your environment ########################## Load in header file ######################## # source(file.path("C:/Users/Nick/git/of-dollars-and-data/header.R")) ########################## Load in Libraries ########################## # library(dplyr) library(ggplo...
/analysis/18-nyse-benford-plots.R
no_license
intelliBrain/of-dollars-and-data
R
false
false
5,976
r
cat("\014") # Clear your console rm(list = ls()) #clear your environment ########################## Load in header file ######################## # source(file.path("C:/Users/Nick/git/of-dollars-and-data/header.R")) ########################## Load in Libraries ########################## # library(dplyr) library(ggplo...
library(keras) max_features <- 10000 maxlen <- 500 batch_size <- 32 cat("Loading data...\n") imdb <- dataset_imdb(num_words = max_features) c(c(input_train, y_train), c(input_test, y_test)) %<-% imdb cat(length(input_train), "train sequences\n") cat(length(input_test), "test sequences") cat("Pad sequences (sample...
/imdb using RNNs.R
no_license
marioem/Keras
R
false
false
1,514
r
library(keras) max_features <- 10000 maxlen <- 500 batch_size <- 32 cat("Loading data...\n") imdb <- dataset_imdb(num_words = max_features) c(c(input_train, y_train), c(input_test, y_test)) %<-% imdb cat(length(input_train), "train sequences\n") cat(length(input_test), "test sequences") cat("Pad sequences (sample...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/diff_stats.R \name{diff_stats} \alias{diff_stats} \title{Calculate differentiation statistics for a genind object} \usage{ diff_stats(x, phi_st = FALSE) } \arguments{ \item{x}{genind object (from package adegenet)} \item{phi_st}{Bool...
/man/diff_stats.Rd
no_license
grmunjal/mmod
R
false
false
1,937
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/diff_stats.R \name{diff_stats} \alias{diff_stats} \title{Calculate differentiation statistics for a genind object} \usage{ diff_stats(x, phi_st = FALSE) } \arguments{ \item{x}{genind object (from package adegenet)} \item{phi_st}{Bool...
cces16$abort1 <- recode(cces16$CC16_332a, "2=1; else=0") cces16$abort2 <- recode(cces16$CC16_332b, "2=1; else=0") cces16$abort3 <- recode(cces16$CC16_332c, "1=1; else=0") cces16$abort4 <- recode(cces16$CC16_332d, "1=1; else=0") cces16$abort5 <- recode(cces16$CC16_332e, "1=1; else=0") cces16$abort6 <- recode(cces16$CC...
/Economic Conservative/econ_social_relationship.R
no_license
ryanburge/cces
R
false
false
6,710
r
cces16$abort1 <- recode(cces16$CC16_332a, "2=1; else=0") cces16$abort2 <- recode(cces16$CC16_332b, "2=1; else=0") cces16$abort3 <- recode(cces16$CC16_332c, "1=1; else=0") cces16$abort4 <- recode(cces16$CC16_332d, "1=1; else=0") cces16$abort5 <- recode(cces16$CC16_332e, "1=1; else=0") cces16$abort6 <- recode(cces16$CC...
install.packages("spam") library(spam) install.packages("Matrix") library("Matrix") library("skmeans") #x=read.MM("C:/Users/anisboyka/Desktop/projettutore/sparse_matrix1.mtx") #x l=readMM(file = "C:/Users/anisboyka/Desktop/projettutore/sparse_matrix1.mtx") summary(l) j=as(l,"dgTMatrix") j help(readMM) str(j...
/Clustering Binome.R
no_license
mokhtarianis/datasciencecoursera
R
false
false
562
r
install.packages("spam") library(spam) install.packages("Matrix") library("Matrix") library("skmeans") #x=read.MM("C:/Users/anisboyka/Desktop/projettutore/sparse_matrix1.mtx") #x l=readMM(file = "C:/Users/anisboyka/Desktop/projettutore/sparse_matrix1.mtx") summary(l) j=as(l,"dgTMatrix") j help(readMM) str(j...
### Exercise 2: Data Frame Practice with dplyr ## This exercise need the "fueleconomy" package. Install and load it. ## You should have have access to the `vehicles` data.frame ## Install (if you haven't already) and load the `dplyr`package # You should have have access to the `vehicles` data.frame # Create a dat...
/exercise-2/exercise.R
permissive
lelogem/ch10-dplyr
R
false
false
868
r
### Exercise 2: Data Frame Practice with dplyr ## This exercise need the "fueleconomy" package. Install and load it. ## You should have have access to the `vehicles` data.frame ## Install (if you haven't already) and load the `dplyr`package # You should have have access to the `vehicles` data.frame # Create a dat...