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
library(ggplot2) library(VIM) library(mice) library(vcd) require(car) library(tabplot) library(PerformanceAnalytics) library(MASS) library(glmnet) # =============================================================================================== #setwd("~/movie") movie = read.csv("movie_metadata.csv") str(movies) # ===...
/movie_rating_prediction.r
no_license
AlexIKey/imdb_rating
R
false
false
11,981
r
library(ggplot2) library(VIM) library(mice) library(vcd) require(car) library(tabplot) library(PerformanceAnalytics) library(MASS) library(glmnet) # =============================================================================================== #setwd("~/movie") movie = read.csv("movie_metadata.csv") str(movies) # ===...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get.R \name{getworkouts} \alias{getworkouts} \title{Get workouts data} \usage{ getworkouts(token, startdate = NULL, enddate = NULL, offset = NULL, lastupdate = NULL, tz = "") } \arguments{ \item{token}{Your token obtained using \code{within...
/man/getworkouts.Rd
permissive
odaniel1/rwithings
R
false
true
725
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get.R \name{getworkouts} \alias{getworkouts} \title{Get workouts data} \usage{ getworkouts(token, startdate = NULL, enddate = NULL, offset = NULL, lastupdate = NULL, tz = "") } \arguments{ \item{token}{Your token obtained using \code{within...
##' .. content for \description{} (no empty lines) .. ##' ##' .. content for \details{} .. ##' ##' @title ##' @param .x is_01 <- function(x) { unix = unique(na.omit(x)) c1 = all(unix %in% c(0, 1)) c2 = all(c(0, 1) %in% unix) c1 & c2 }
/R/is_01.R
no_license
bcjaeger/length-of-stay
R
false
false
245
r
##' .. content for \description{} (no empty lines) .. ##' ##' .. content for \details{} .. ##' ##' @title ##' @param .x is_01 <- function(x) { unix = unique(na.omit(x)) c1 = all(unix %in% c(0, 1)) c2 = all(c(0, 1) %in% unix) c1 & c2 }
\name{controlCSCI} \alias{controlCSCI} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Function for control parameters for algorithms used in CSCI. } \description{ Allows chainging of default parameters. } \usage{ controlCSCI(power = 2/3, quan_p = c(0.25, 0.5, 0.75, 0.8, 0.85, 0.9,...
/man/controlCSCI.Rd
no_license
cran/csci
R
false
false
2,230
rd
\name{controlCSCI} \alias{controlCSCI} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Function for control parameters for algorithms used in CSCI. } \description{ Allows chainging of default parameters. } \usage{ controlCSCI(power = 2/3, quan_p = c(0.25, 0.5, 0.75, 0.8, 0.85, 0.9,...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/datastore_objects.R \name{Mutation} \alias{Mutation} \title{Mutation Object} \usage{ Mutation(insert = NULL, update = NULL, baseVersion = NULL, upsert = NULL, delete = NULL) } \arguments{ \item{insert}{The entity to insert} \item{update}{T...
/googledatastorev1.auto/man/Mutation.Rd
permissive
Phippsy/autoGoogleAPI
R
false
true
687
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/datastore_objects.R \name{Mutation} \alias{Mutation} \title{Mutation Object} \usage{ Mutation(insert = NULL, update = NULL, baseVersion = NULL, upsert = NULL, delete = NULL) } \arguments{ \item{insert}{The entity to insert} \item{update}{T...
make_comb_mat_from_matrix = function(x, mode, top_n_sets = Inf, min_set_size = -Inf) { # check whether x is a binary matrix if(is.data.frame(x)) { lc = sapply(x, function(x) { if(is.numeric(x)) { all(x == 0 | x == 1) } else if(is.logical(x)) { TRUE } else { FALSE } }) } else if(is.matrix...
/R/Upset.R
permissive
xydou0515/ComplexHeatmap
R
false
false
32,938
r
make_comb_mat_from_matrix = function(x, mode, top_n_sets = Inf, min_set_size = -Inf) { # check whether x is a binary matrix if(is.data.frame(x)) { lc = sapply(x, function(x) { if(is.numeric(x)) { all(x == 0 | x == 1) } else if(is.logical(x)) { TRUE } else { FALSE } }) } else if(is.matrix...
install.packages("sqldf") library(sqldf) library(googleVis) Fruits sqldf('select * from Fruits') sqldf("select * from Fruits where Fruit='Apples'") sqldf('select * from Fruits where Fruit=\'Apples\'') sqldf('select * from Fruits limit 3') sqldf('select * from Fruits limit 3,5') sqldf('select * from Fruits order by Ye...
/Part3/sec1-8_6.R
no_license
byeongmu-jo/r-lecture
R
false
false
1,646
r
install.packages("sqldf") library(sqldf) library(googleVis) Fruits sqldf('select * from Fruits') sqldf("select * from Fruits where Fruit='Apples'") sqldf('select * from Fruits where Fruit=\'Apples\'') sqldf('select * from Fruits limit 3') sqldf('select * from Fruits limit 3,5') sqldf('select * from Fruits order by Ye...
# get and save initial values for WHICH_CDAT WHICH_CDAT <- "WP" source("R/model_spline_cov.R") for (L in seq(5,20,5)) { data <- get_data(L) sinits <- smooth_cov(L=L, z=zstar, f=f) inits <- get_starts(data, sinits) save(sinits, inits, file=paste0("inits/",WHICH_CDAT,"_L",L,".RData")) }
/R/inits_spline_cov.R
no_license
MariaMcCrann/climate
R
false
false
293
r
# get and save initial values for WHICH_CDAT WHICH_CDAT <- "WP" source("R/model_spline_cov.R") for (L in seq(5,20,5)) { data <- get_data(L) sinits <- smooth_cov(L=L, z=zstar, f=f) inits <- get_starts(data, sinits) save(sinits, inits, file=paste0("inits/",WHICH_CDAT,"_L",L,".RData")) }
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { k <- NULL ## Setting the matrix set <- function( matrix ) { m <<- matrix k <<- NULL } ## Obta...
/cachematrix.R
no_license
charlescirotteau/Coursera_Project-
R
false
false
1,184
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()) { k <- NULL ## Setting the matrix set <- function( matrix ) { m <<- matrix k <<- NULL } ## Obta...
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/utils.r \name{parse_table} \alias{parse_table} \title{Parse a BQ-style identifier into project/dataset/table IDs.} \usage{ parse_table(table, project_id = NULL) } \arguments{ \item{table}{table name} \item{project_id}{(optional) proj...
/man/parse_table.Rd
no_license
lefko2000/bigrquery
R
false
false
576
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/utils.r \name{parse_table} \alias{parse_table} \title{Parse a BQ-style identifier into project/dataset/table IDs.} \usage{ parse_table(table, project_id = NULL) } \arguments{ \item{table}{table name} \item{project_id}{(optional) proj...
library(dplyr) ## read and prepare data data_tbl <- read.table("./data/household_power_consumption.txt", header=TRUE,sep=";",na.strings = "?",dec = ".") data_tbl[,1] <- as.Date(data_tbl[,1], "%d/%m/%Y") data_tbl2 <- subset(data_tbl, Date == "2007-02-02" | Date == "2007-02-01") data_tbl2 <- m...
/plot2.R
no_license
wcaspers/ExData_Plotting1
R
false
false
666
r
library(dplyr) ## read and prepare data data_tbl <- read.table("./data/household_power_consumption.txt", header=TRUE,sep=";",na.strings = "?",dec = ".") data_tbl[,1] <- as.Date(data_tbl[,1], "%d/%m/%Y") data_tbl2 <- subset(data_tbl, Date == "2007-02-02" | Date == "2007-02-01") data_tbl2 <- m...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/S.R \name{S} \alias{S} \title{S family functions search for matches to argument pattern.} \usage{ S(X, ..., ignore.case = T, perl = T, fixed = F, useBytes = F) } \description{ B is vectorised version of B0 First argument - X, a character vect...
/BS/man/S.Rd
no_license
plegum/R
R
false
true
798
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/S.R \name{S} \alias{S} \title{S family functions search for matches to argument pattern.} \usage{ S(X, ..., ignore.case = T, perl = T, fixed = F, useBytes = F) } \description{ B is vectorised version of B0 First argument - X, a character vect...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/person.R \docType{data} \name{person} \alias{person} \title{Person Data for dplyr Murder Mystery} \format{ A data frame with 10011 observations of 6 variables \describe{ \item{person_id}{Person id. Consistent across data frames} \item{nam...
/man/person.Rd
no_license
speegled/dplyrmurdermystery
R
false
true
1,234
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/person.R \docType{data} \name{person} \alias{person} \title{Person Data for dplyr Murder Mystery} \format{ A data frame with 10011 observations of 6 variables \describe{ \item{person_id}{Person id. Consistent across data frames} \item{nam...
#' Plot expert based judgements of directional change for animals #' #' Plot expert based judgements of directional change for animals #' @param data Dataframe derived from \code{animal_direction_frequencies()}. #' @param facet_by Character. Column name in which to produce facet sub plots. Default = NULL no facetting #...
/R/plot_animal_directions.R
no_license
jscamac/Alpine_Elicitation_Project
R
false
false
3,944
r
#' Plot expert based judgements of directional change for animals #' #' Plot expert based judgements of directional change for animals #' @param data Dataframe derived from \code{animal_direction_frequencies()}. #' @param facet_by Character. Column name in which to produce facet sub plots. Default = NULL no facetting #...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/allow.R \name{allow} \alias{allow} \title{allow} \usage{ allow(principal = NULL, permission = NULL) } \arguments{ \item{principal}{The user or group (principal) for which the access control applies. See \code{\link[=principal]{principal()}}} ...
/man/allow.Rd
permissive
cboettig/build.eml
R
false
true
486
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/allow.R \name{allow} \alias{allow} \title{allow} \usage{ allow(principal = NULL, permission = NULL) } \arguments{ \item{principal}{The user or group (principal) for which the access control applies. See \code{\link[=principal]{principal()}}} ...
resample_blocks_by_area = function ( x, y, NBoot, lookup_table, block_L, Grid_space, area_or_sites="area", shape=shape,lookup_tablename="lookup_table",lookuptables.folderpath,...) { if(missing(Grid_space)) { Grid_space = block_L/3 } if(Grid_space > block_L) { Grid_space = block_L } Grid = create_Grid...
/Functions/resample_blocks_by_area.R
no_license
EveSlavich/Block-Bootstrap
R
false
false
2,387
r
resample_blocks_by_area = function ( x, y, NBoot, lookup_table, block_L, Grid_space, area_or_sites="area", shape=shape,lookup_tablename="lookup_table",lookuptables.folderpath,...) { if(missing(Grid_space)) { Grid_space = block_L/3 } if(Grid_space > block_L) { Grid_space = block_L } Grid = create_Grid...
############################## # Exploratory Data Analysis # Course Project 1 # Jason Green # 1/11/2015 # Plot 1 ############################## # Set the working directory. setwd("~/GitHub/ExData_Plotting1/") # Download and Unzip data file: temp <- tempfile() download.file("https://d396qusza40orc.cloudfront.net/exdat...
/plot1.R
no_license
Convalytics/ExData_Plotting1
R
false
false
1,042
r
############################## # Exploratory Data Analysis # Course Project 1 # Jason Green # 1/11/2015 # Plot 1 ############################## # Set the working directory. setwd("~/GitHub/ExData_Plotting1/") # Download and Unzip data file: temp <- tempfile() download.file("https://d396qusza40orc.cloudfront.net/exdat...
#' #' Does bootstrapped SEs for LOLOG in a nice way #' @param #' @keywords #' @export #' @examples #' bootlog_process() #This function uses bootlog and processes everything into nice results bootlog_process <- function(lolog, seed =1, fits = seq(10,100,10), ...
/R/bootlog_process.R
no_license
duncan-clark/bootlog
R
false
false
1,549
r
#' #' Does bootstrapped SEs for LOLOG in a nice way #' @param #' @keywords #' @export #' @examples #' bootlog_process() #This function uses bootlog and processes everything into nice results bootlog_process <- function(lolog, seed =1, fits = seq(10,100,10), ...
NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") # Compare emissions from motor vehicle sources in Baltimore City # with emissions from motor vehicle sources in Los Angeles County, # California (fips == "06037"). Which city has seen greater changes # over time in motor vehicle e...
/plot6.R
no_license
arosati/Coursera_Exploratory_Proj2
R
false
false
910
r
NEI <- readRDS("summarySCC_PM25.rds") SCC <- readRDS("Source_Classification_Code.rds") # Compare emissions from motor vehicle sources in Baltimore City # with emissions from motor vehicle sources in Los Angeles County, # California (fips == "06037"). Which city has seen greater changes # over time in motor vehicle e...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dataDocs.R \docType{data} \name{gonnet} \alias{gonnet} \title{Gonnet substitution matrix} \format{An alignment object read with \code{\link[seqinr]{read.alignment}} function from seqinr package. A data frame with 0 observations on the followi...
/man/gonnet.Rd
no_license
richelbilderbeek/BALCONY
R
false
true
933
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dataDocs.R \docType{data} \name{gonnet} \alias{gonnet} \title{Gonnet substitution matrix} \format{An alignment object read with \code{\link[seqinr]{read.alignment}} function from seqinr package. A data frame with 0 observations on the followi...
rm(list=ls()) source("../../functions.R") getCol <- function(x,string){ output <- x[grep(string,x,fixed=TRUE)] if(length(output)==0) output <- NA return(output) } getVal <-function(uncurated,string) { gsub(string, "", apply(uncurated,1,getCol,string=string)) } uncurated <- read.csv("../uncurated/GSE13507_fu...
/curation/bladder/src/GSE13507_curation.r
no_license
tgerke/catd
R
false
false
2,146
r
rm(list=ls()) source("../../functions.R") getCol <- function(x,string){ output <- x[grep(string,x,fixed=TRUE)] if(length(output)==0) output <- NA return(output) } getVal <-function(uncurated,string) { gsub(string, "", apply(uncurated,1,getCol,string=string)) } uncurated <- read.csv("../uncurated/GSE13507_fu...
# To ensure all necessary packages are installed, run: # source("init.R") `%>%` = dplyr::`%>%` # DATA ---- # * Load Source Information ---- source("data_source_information.R") # Combine dataset list dataset_df = dplyr::bind_rows(lapply(dataset_list, data.frame, stringsAsFactors = FALSE)) dataset_picker_vector = dat...
/global.R
no_license
mvanbommel/SacCountyOpenData
R
false
false
5,550
r
# To ensure all necessary packages are installed, run: # source("init.R") `%>%` = dplyr::`%>%` # DATA ---- # * Load Source Information ---- source("data_source_information.R") # Combine dataset list dataset_df = dplyr::bind_rows(lapply(dataset_list, data.frame, stringsAsFactors = FALSE)) dataset_picker_vector = dat...
#' Add PROM to operation data #' #' Easy way to add PROM data to operation data. Preoperation and postoperation #' 1 year, 6 years and 10 years are added. #' Also an option to add reoperation PROM. #' #' @param dataOp Corresponds to dataOperations in SHPR datalayer. #' Variables needed are SubjectKey, P_Side, ...
/R/add_prom.R
permissive
swehip/shprplotfun
R
false
false
22,189
r
#' Add PROM to operation data #' #' Easy way to add PROM data to operation data. Preoperation and postoperation #' 1 year, 6 years and 10 years are added. #' Also an option to add reoperation PROM. #' #' @param dataOp Corresponds to dataOperations in SHPR datalayer. #' Variables needed are SubjectKey, P_Side, ...
# Load R Images & Packages #### library(here) library(rcarbon) library(nimbleCarbon) library(latex2exp) library(dplyr) load(here('R_images','cleaned_data.RData')) load(here('R_images','mcmc.m1.samples.RData')) load(here('R_images','mcmc.m2.samples.RData')) load(here('R_images','mcmc.m3.samples.RData')) load(here('R_im...
/manuscript/figures/main_figures.R
permissive
ercrema/bayesian_spd
R
false
false
15,047
r
# Load R Images & Packages #### library(here) library(rcarbon) library(nimbleCarbon) library(latex2exp) library(dplyr) load(here('R_images','cleaned_data.RData')) load(here('R_images','mcmc.m1.samples.RData')) load(here('R_images','mcmc.m2.samples.RData')) load(here('R_images','mcmc.m3.samples.RData')) load(here('R_im...
#' Carbonate Budget #' #' This function combines outputs of \code{pproduction}, \code{sproduction}, #' \code{perosion} & \code{serosion} to calculate overall carbonate budget #' #' @param pp object of class \code{carb} pertaining to primary production #' @param sp object of class \code{carb} pertaining to secondary pro...
/R/budget.R
permissive
halla1/caRbs
R
false
false
1,848
r
#' Carbonate Budget #' #' This function combines outputs of \code{pproduction}, \code{sproduction}, #' \code{perosion} & \code{serosion} to calculate overall carbonate budget #' #' @param pp object of class \code{carb} pertaining to primary production #' @param sp object of class \code{carb} pertaining to secondary pro...
## Simulation Setup 1 Codes ## setwd("C:/Users/xshen/Desktop/Reasearch Projects/Deep Learning Project/Simulation/Simulation1/DeepLearningSimulation1") source("./Source/SimulationSetUp.R") dataList <- simSetUp(); ped <- dataList$ped; info <- dataList$info; tag <- 1; func.frq <- 0.5; #number of funct...
/src/simCopy.R
no_license
shenxia4/kdn
R
false
false
1,796
r
## Simulation Setup 1 Codes ## setwd("C:/Users/xshen/Desktop/Reasearch Projects/Deep Learning Project/Simulation/Simulation1/DeepLearningSimulation1") source("./Source/SimulationSetUp.R") dataList <- simSetUp(); ped <- dataList$ped; info <- dataList$info; tag <- 1; func.frq <- 0.5; #number of funct...
#' Move pipe at the end of the search path() #' #' many packages reexport magrittr's pipe, in order to use this package we can #' use this function to place `pipe()` to the end of the search path so its pipes #' will mask the others. #' #' @return #' @export #' #' @examples pipe_first <- function(){ detach("package:p...
/R/zz.R
no_license
trinker/pipe
R
false
false
385
r
#' Move pipe at the end of the search path() #' #' many packages reexport magrittr's pipe, in order to use this package we can #' use this function to place `pipe()` to the end of the search path so its pipes #' will mask the others. #' #' @return #' @export #' #' @examples pipe_first <- function(){ detach("package:p...
## Creates cacheable matrix for inputting to ## cacheSolve() function which sets and gets ## the cached values makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { x <<- y inv <<- NULL } get <- function() x setInverse <- ...
/cachematrix.R
no_license
yms3590/ProgrammingAssignment2
R
false
false
1,057
r
## Creates cacheable matrix for inputting to ## cacheSolve() function which sets and gets ## the cached values makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { x <<- y inv <<- NULL } get <- function() x setInverse <- ...
#' Perform registration between two images. #' #' Register a pair of images either through the full or simplified interface #' to the ANTs registration method. #' #' @param fixed fixed image to which we register the moving image. #' @param moving moving image to be mapped to fixed space. #' @param typeofTransform A lin...
/R/antsRegistration.R
permissive
alainlompo/ANTsR
R
false
false
32,273
r
#' Perform registration between two images. #' #' Register a pair of images either through the full or simplified interface #' to the ANTs registration method. #' #' @param fixed fixed image to which we register the moving image. #' @param moving moving image to be mapped to fixed space. #' @param typeofTransform A lin...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data-movie.R \docType{data} \name{movie_450} \alias{movie_450} \title{Major League} \format{ igraph object } \source{ https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/T4HBA3 https://www.imdb.com/title/tt0097815 } \usa...
/man/movie_450.Rd
permissive
schochastics/networkdata
R
false
true
1,007
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data-movie.R \docType{data} \name{movie_450} \alias{movie_450} \title{Major League} \format{ igraph object } \source{ https://dataverse.harvard.edu/dataset.xhtml?persistentId=doi:10.7910/DVN/T4HBA3 https://www.imdb.com/title/tt0097815 } \usa...
#setwd("/Users/pwyatt/Desktop/PW/learning/dataScience/R") #getwd() #list.files() pollutantmean <- function(directory, pollutant = "sulfate", id = 1:332) { ## 'directory' is a character vector of length 1 indicating ## the location of the CSV files ## 'pollutant' is a character vector of length 1 indic...
/week_2/assign2/pollutantmean.R
no_license
astrofizkid/R_Programming
R
false
false
1,321
r
#setwd("/Users/pwyatt/Desktop/PW/learning/dataScience/R") #getwd() #list.files() pollutantmean <- function(directory, pollutant = "sulfate", id = 1:332) { ## 'directory' is a character vector of length 1 indicating ## the location of the CSV files ## 'pollutant' is a character vector of length 1 indic...
structure(list(field_name = c("record_id", "variable_00002", "variable_00003", "variable_00004", "variable_00005", "variable_00012", "variable_00013", "variable_00014", "variable_00015", "variable_00016", "variable_00017"), form_name = c("form_0001", "form_0001", "form_0001", "form_0001", "form_0001", "form_0003", ...
/inst/test-data/specific-redcapr/metadata-read/super-wide-3-subset.R
permissive
OuhscBbmc/REDCapR
R
false
false
3,997
r
structure(list(field_name = c("record_id", "variable_00002", "variable_00003", "variable_00004", "variable_00005", "variable_00012", "variable_00013", "variable_00014", "variable_00015", "variable_00016", "variable_00017"), form_name = c("form_0001", "form_0001", "form_0001", "form_0001", "form_0001", "form_0003", ...
# The vector pioneers has already been created for you pioneers <- c("GAUSS:1777", "BAYES:1702", "PASCAL:1623", "PEARSON:1857") # Split names from birth year split_math <- strsplit(pioneers, split = ":") # Convert to lowercase strings: split_low split_low=lapply(split_math,tolower) # Take a look at the structure of ...
/r-utilities/LApply_Sappply_Vapply.R
no_license
divakant01/Machine-Learning-Util
R
false
false
3,782
r
# The vector pioneers has already been created for you pioneers <- c("GAUSS:1777", "BAYES:1702", "PASCAL:1623", "PEARSON:1857") # Split names from birth year split_math <- strsplit(pioneers, split = ":") # Convert to lowercase strings: split_low split_low=lapply(split_math,tolower) # Take a look at the structure of ...
#load data rr<-array(NA,dim = c(108,200)) maxL<-array(NA,dim = c(108,200)) rENTR<-array(NA,dim = c(108,200)) ENTR<-array(NA,dim = c(108,200)) L<-array(NA,dim = c(108,200)) for (i in 1:108){ 'rr_downs' 'rr_downs200' 'rr_downs100' t<- paste0('~/rr_downs70',i,'.RData') #t<- paste0('~/arezoo/ansx',i,'.RData') ...
/crqa_import.R
no_license
arezoosh/crqa
R
false
false
707
r
#load data rr<-array(NA,dim = c(108,200)) maxL<-array(NA,dim = c(108,200)) rENTR<-array(NA,dim = c(108,200)) ENTR<-array(NA,dim = c(108,200)) L<-array(NA,dim = c(108,200)) for (i in 1:108){ 'rr_downs' 'rr_downs200' 'rr_downs100' t<- paste0('~/rr_downs70',i,'.RData') #t<- paste0('~/arezoo/ansx',i,'.RData') ...
## !/user/bin/env RStudio 1.1.423 ## -*- coding: utf-8 -*- ## assistant geomtry and Infographic ## 《R语言商务图表与数据可视化》 ## 课程讲师——杜雨 ## 课程机构——天善智能 rm(list = ls()) gc() ########第八章:ggplot辅助几何对象与信息图基础######## ####8.1 辅助图形操作辅助图形1——geom_rect矩形图#### library("showtext") library("ggplot2") library("magrittr") library("reshape...
/巨人前车/ggplot2/chapter8——assistant geomtry and Infographic.r
no_license
wangpanqiao/NoteBook-1
R
false
false
10,041
r
## !/user/bin/env RStudio 1.1.423 ## -*- coding: utf-8 -*- ## assistant geomtry and Infographic ## 《R语言商务图表与数据可视化》 ## 课程讲师——杜雨 ## 课程机构——天善智能 rm(list = ls()) gc() ########第八章:ggplot辅助几何对象与信息图基础######## ####8.1 辅助图形操作辅助图形1——geom_rect矩形图#### library("showtext") library("ggplot2") library("magrittr") library("reshape...
/plugins/MacAU/Golem/Golem.r
permissive
airwindows/airwindows
R
false
false
3,195
r
Data <- read.csv2("household_power_consumption.txt") Data$Date <- as.Date(Data$Date, format = "%d/%m/%Y") df <- Data[(Data$Date == "2007-02-01") | (Data$Date =="2007-02-02"),] df$Global_active_power <- as.numeric(df$Global_active_power) df <- transform(df, time = as.POSIXct(paste(Date, Time)), "%d/%m/%Y %H:%M:%S") plo...
/plot2.R
no_license
varunkamble/ExData_Plotting1
R
false
false
523
r
Data <- read.csv2("household_power_consumption.txt") Data$Date <- as.Date(Data$Date, format = "%d/%m/%Y") df <- Data[(Data$Date == "2007-02-01") | (Data$Date =="2007-02-02"),] df$Global_active_power <- as.numeric(df$Global_active_power) df <- transform(df, time = as.POSIXct(paste(Date, Time)), "%d/%m/%Y %H:%M:%S") plo...
library(ConnMatTools) ps <- c(0.7,0.5) # Fraction of eggs "marked" at each source site ks <- c(4,5) # Number of marked settlers among sample from each source site n.sample <- 20 # Total sample size. Must be >= sum(ks) phis0 = runif(3,min=0.05) phis0 = phis0 / sum(phis0) phis0 = phis0[1:2] # Don't include relative c...
/tests/test.connectivity_estimation.multinomial.R
no_license
cran/ConnMatTools
R
false
false
1,423
r
library(ConnMatTools) ps <- c(0.7,0.5) # Fraction of eggs "marked" at each source site ks <- c(4,5) # Number of marked settlers among sample from each source site n.sample <- 20 # Total sample size. Must be >= sum(ks) phis0 = runif(3,min=0.05) phis0 = phis0 / sum(phis0) phis0 = phis0[1:2] # Don't include relative c...
#' rust: Ratio-of-Uniforms Simulation with Transformation #' #' Uses the multivariate generalized ratio-of-uniforms method to simulate from a #' distribution with log-density \code{logf} (up to an additive constant). #' \code{logf} must be bounded, perhaps after a transformation of variable. #' #' @details #' #' The ma...
/R/rust.R
no_license
lbelzile/rust
R
false
false
2,745
r
#' rust: Ratio-of-Uniforms Simulation with Transformation #' #' Uses the multivariate generalized ratio-of-uniforms method to simulate from a #' distribution with log-density \code{logf} (up to an additive constant). #' \code{logf} must be bounded, perhaps after a transformation of variable. #' #' @details #' #' The ma...
fh<-file("household_power_consumption.txt","r"); dtable1<-read.table(text = grep("^[1,2]/2/2007",readLines(fh),value=TRUE),sep=";",na.strings="?",header=FALSE) colnames(dtable1)<-c("date","time","gap","grp","voltage","gi","sm1","sm2","sm3") dtable1$date<-as.Date(dtable1$date,"%d/%m/%Y") timestamp<-strptime(paste(dtable...
/plot4.R
no_license
akshaynayak/ExData_Plotting1
R
false
false
1,028
r
fh<-file("household_power_consumption.txt","r"); dtable1<-read.table(text = grep("^[1,2]/2/2007",readLines(fh),value=TRUE),sep=";",na.strings="?",header=FALSE) colnames(dtable1)<-c("date","time","gap","grp","voltage","gi","sm1","sm2","sm3") dtable1$date<-as.Date(dtable1$date,"%d/%m/%Y") timestamp<-strptime(paste(dtable...
GraphTranslation <- read.csv(paste0(TEMPLATE.PATH,"/GraphTranslation_V4.csv"), stringsAsFactors = FALSE) ReportTranslation <- read.csv(paste0(TEMPLATE.PATH,"/GeneralReportTranslation_V1.csv"), stringsAsFactors = FALSE) Languagechoose <- "EN" ### Function ### preptranslations <- function(TranslationType,GraphTransla...
/TranslationFunction.R
no_license
2diiKlaus/Webtool
R
false
false
1,369
r
GraphTranslation <- read.csv(paste0(TEMPLATE.PATH,"/GraphTranslation_V4.csv"), stringsAsFactors = FALSE) ReportTranslation <- read.csv(paste0(TEMPLATE.PATH,"/GeneralReportTranslation_V1.csv"), stringsAsFactors = FALSE) Languagechoose <- "EN" ### Function ### preptranslations <- function(TranslationType,GraphTransla...
################################################################################ #' @title calculate_impedances #' @description function to calculate impedances for the assets within the solution space. #' @param grid List containing initial grid data. #' @param solution_space dataframe containing possible cable...
/R/calculate_impedances.R
no_license
asiono/rein
R
false
false
1,777
r
################################################################################ #' @title calculate_impedances #' @description function to calculate impedances for the assets within the solution space. #' @param grid List containing initial grid data. #' @param solution_space dataframe containing possible cable...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/filter.R \name{filter.FDF} \alias{filter.FDF} \alias{filter_int} \alias{filter} \title{Return rows with matching conditions} \usage{ \method{filter}{FDF}(.data, ...) filter_int(.data, subset, check = TRUE) filter(.data, ..., .preserve = TRU...
/man/filter.Rd
no_license
privefl/bigdfr
R
false
true
1,539
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/filter.R \name{filter.FDF} \alias{filter.FDF} \alias{filter_int} \alias{filter} \title{Return rows with matching conditions} \usage{ \method{filter}{FDF}(.data, ...) filter_int(.data, subset, check = TRUE) filter(.data, ..., .preserve = TRU...
\name{remove_partition_methods} \alias{remove_partition_methods} \title{ Remove partition methods } \description{ Remove partition methods } \usage{ remove_partition_methods(method) } \arguments{ \item{method}{Name of the partition methods to be removed.} } \value{ No value is returned. } \author{ Zuguang Gu <z.gu@...
/man/remove_partition_methods.rd
permissive
liangdp1984/cola
R
false
false
372
rd
\name{remove_partition_methods} \alias{remove_partition_methods} \title{ Remove partition methods } \description{ Remove partition methods } \usage{ remove_partition_methods(method) } \arguments{ \item{method}{Name of the partition methods to be removed.} } \value{ No value is returned. } \author{ Zuguang Gu <z.gu@...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/predict_MCMC.R \name{sample_MCMCfit} \alias{sample_MCMCfit} \title{Random sample of the parameters of a FitInactivationMCMC object} \usage{ sample_MCMCfit(MCMC_fit, times, n_simulations) } \arguments{ \item{MCMC_fit}{An object of class \code{...
/man/sample_MCMCfit.Rd
no_license
albgarre/bioinactivation
R
false
true
1,162
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/predict_MCMC.R \name{sample_MCMCfit} \alias{sample_MCMCfit} \title{Random sample of the parameters of a FitInactivationMCMC object} \usage{ sample_MCMCfit(MCMC_fit, times, n_simulations) } \arguments{ \item{MCMC_fit}{An object of class \code{...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/auxiliaryFunctions.R \name{modelDensity} \alias{modelDensity} \title{evaluate the density in the current model} \usage{ modelDensity(x, nu, modelFamily = "Gauss") } \arguments{ \item{x}{vector with points where to evaluate the density} \item...
/man/modelDensity.Rd
no_license
cran/noisySBM
R
false
true
530
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/auxiliaryFunctions.R \name{modelDensity} \alias{modelDensity} \title{evaluate the density in the current model} \usage{ modelDensity(x, nu, modelFamily = "Gauss") } \arguments{ \item{x}{vector with points where to evaluate the density} \item...
install.packages('fpp2') library(fpp2) install.packages('uroot') library(uroot) library(forecast) #set the path in the below function setwd() to the project folder path in your local system before running the script setwd("C:\\Users\\Kiruba\\Data Analytics\\Stats\\Statistical_analysis") TimeSeries <- read.cs...
/Code/ts.r
no_license
Kirubabala/Statistical_analysis
R
false
false
2,806
r
install.packages('fpp2') library(fpp2) install.packages('uroot') library(uroot) library(forecast) #set the path in the below function setwd() to the project folder path in your local system before running the script setwd("C:\\Users\\Kiruba\\Data Analytics\\Stats\\Statistical_analysis") TimeSeries <- read.cs...
testlist <- list(A = structure(c(2.45549244874084e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 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), .Dim = c(5L, 7L)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_row...
/multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613101610-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
343
r
testlist <- list(A = structure(c(2.45549244874084e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 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), .Dim = c(5L, 7L)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_row...
\name{qualV-package} \alias{qualV-package} \alias{qualV} \title{Qualitative Validation Methods} \description{Qualitative methods for model validation.} \details{This package contains functions for a qualitative model comparison. Common quantitative deviance measures underestimate the similarity of patterns if th...
/man/qualV.Rd
no_license
cran/qualV
R
false
false
925
rd
\name{qualV-package} \alias{qualV-package} \alias{qualV} \title{Qualitative Validation Methods} \description{Qualitative methods for model validation.} \details{This package contains functions for a qualitative model comparison. Common quantitative deviance measures underestimate the similarity of patterns if th...
#' Generates misclassified data #' #' Takes a \code{data.frame} and produces misclassified data. #' Probabilities for the missclassification are given in \code{mc.matrix}. #' #' @param data.org \code{data.frame} containing the factor variables. Must be \code{factor}s. #' @param mc.matrix a \code{list} of matrices givin...
/R/misclass.R
no_license
CLINDA-AAU/simex-1
R
false
false
2,468
r
#' Generates misclassified data #' #' Takes a \code{data.frame} and produces misclassified data. #' Probabilities for the missclassification are given in \code{mc.matrix}. #' #' @param data.org \code{data.frame} containing the factor variables. Must be \code{factor}s. #' @param mc.matrix a \code{list} of matrices givin...
## This function takes creates setters and gutters for matrix inversion ## Function will initialize a matrix and then also initialize another matrix variable imv to ## cache the matrix inverse for consecutive usage ## To test this one can follow below steps ## m1 <- matrix(1/2, -1/4, -1, 3/4) ## myMatrix_object <- m...
/cachematrix.R
no_license
rbuddharaju/ProgrammingAssignment2
R
false
false
1,245
r
## This function takes creates setters and gutters for matrix inversion ## Function will initialize a matrix and then also initialize another matrix variable imv to ## cache the matrix inverse for consecutive usage ## To test this one can follow below steps ## m1 <- matrix(1/2, -1/4, -1, 3/4) ## myMatrix_object <- m...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{df_county_demographics} \alias{df_county_demographics} \title{A data.frame containing demographic statistics for each county in the United States.} \usage{ data(df_county_demographics) } \description{ A data.frame ...
/man/df_county_demographics.Rd
no_license
arilamstein/choroplethr
R
false
true
1,019
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{df_county_demographics} \alias{df_county_demographics} \title{A data.frame containing demographic statistics for each county in the United States.} \usage{ data(df_county_demographics) } \description{ A data.frame ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/6.f.threshold.R \name{thrshld} \alias{thrshld} \title{Apply threshold for MaxEnt projections of a species} \usage{ thrshld( mcmp, scn.nm = "", thrshld.i = 4:6, path.mdls = NULL, sp.nm = "species" ) } \arguments{ \item{mcmp}{Species ...
/man/thrshld.Rd
no_license
lizhizhong1992/ENMwizard
R
false
true
1,830
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/6.f.threshold.R \name{thrshld} \alias{thrshld} \title{Apply threshold for MaxEnt projections of a species} \usage{ thrshld( mcmp, scn.nm = "", thrshld.i = 4:6, path.mdls = NULL, sp.nm = "species" ) } \arguments{ \item{mcmp}{Species ...
testlist <- list(Rs = numeric(0), atmp = numeric(0), relh = numeric(0), temp = c(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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
/meteor/inst/testfiles/ET0_Makkink/libFuzzer_ET0_Makkink/ET0_Makkink_valgrind_files/1612737348-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
426
r
testlist <- list(Rs = numeric(0), atmp = numeric(0), relh = numeric(0), temp = c(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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0...
# add library library(rmongodb) # connection with mongodb use R mongo<-mongo.create(host="127.0.0.1") # check is connection ok print(mongo.is.connected(mongo)) # API for rmongodb: https://github.com/mongosoup/rmongodb query <- mongo.bson.from.JSON('{"first-name" : "Amark"}') ; cursor <- mongo.find(mongo, "linkedin....
/practice/rmongodb-example.R
no_license
zhou-dong/r-study
R
false
false
2,511
r
# add library library(rmongodb) # connection with mongodb use R mongo<-mongo.create(host="127.0.0.1") # check is connection ok print(mongo.is.connected(mongo)) # API for rmongodb: https://github.com/mongosoup/rmongodb query <- mongo.bson.from.JSON('{"first-name" : "Amark"}') ; cursor <- mongo.find(mongo, "linkedin....
testlist <- list(a = 0L, b = 0L, x = c(-870514740L, -867237888L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L)) result <- do.call(grattan:::anyOutside,testlist) str(result)
/grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610056717-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
269
r
testlist <- list(a = 0L, b = 0L, x = c(-870514740L, -867237888L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L)) result <- do.call(grattan:::anyOutside,testlist) str(result)
ell2 <- function(ro=.7,const=1) { par(mfrow=c(1,1),mar=c(2,2,1,2)) zex=sqrt(const/(1-ro^2)) z1=seq(from=-zex,to=zex,length=200) DI=const-(1-ro^2)*z1^2 z2Pl=ro*z1+sqrt(DI);z2Mi=ro*z1-sqrt(DI) matplot(z1,cbind(z2Pl,z2Mi),type="l",col=1,lty=1,lwd=3, axes=F,xlab="",ylab="") segments(0,-10...
/RcodeData/ell2.r
no_license
tmuntianu/advancedstatistics
R
false
false
902
r
ell2 <- function(ro=.7,const=1) { par(mfrow=c(1,1),mar=c(2,2,1,2)) zex=sqrt(const/(1-ro^2)) z1=seq(from=-zex,to=zex,length=200) DI=const-(1-ro^2)*z1^2 z2Pl=ro*z1+sqrt(DI);z2Mi=ro*z1-sqrt(DI) matplot(z1,cbind(z2Pl,z2Mi),type="l",col=1,lty=1,lwd=3, axes=F,xlab="",ylab="") segments(0,-10...
source(here::here("R", "environment.R")) # Read in and combine pubmed tables input_dir <- here("data", "tables") output_dir <- here("data") abstracts <- fs::dir_ls(input_dir) %>% str_subset("abstract") %>% map_dfr(read_csv) databanks <- fs::dir_ls(input_dir) %>% str_subset("databanks") %>% map_dfr(read_c...
/R/05_analyze-abs-si.R
no_license
maia-sh/trn-pop
R
false
false
1,170
r
source(here::here("R", "environment.R")) # Read in and combine pubmed tables input_dir <- here("data", "tables") output_dir <- here("data") abstracts <- fs::dir_ls(input_dir) %>% str_subset("abstract") %>% map_dfr(read_csv) databanks <- fs::dir_ls(input_dir) %>% str_subset("databanks") %>% map_dfr(read_c...
ChronContSplit <- function(migrationData, dataType, groupBy, groupings, chronological, selectedIDs){ # Step 1: Create a dataframe with an ID and Grouping column data <- data.frame(matrix(ncol = 0, nrow = length(groupings) * length(selectedIDs))) data$grouping <- rep(groupings, times = length(selectedIDs)) da...
/Data Explorer App/Scripts/Backend/Visual Plots/Continuous-Split.R
no_license
shuyelin06/Data-Explorer
R
false
false
2,514
r
ChronContSplit <- function(migrationData, dataType, groupBy, groupings, chronological, selectedIDs){ # Step 1: Create a dataframe with an ID and Grouping column data <- data.frame(matrix(ncol = 0, nrow = length(groupings) * length(selectedIDs))) data$grouping <- rep(groupings, times = length(selectedIDs)) da...
#' subset by grep #' @param df the dataframe to subset #' @param grepstring the namestring of the colomns to grab, greplstyle #' @export subset_grep = function(df, grepstring) { df[,which(grepl(grepstring, names(df )))] }
/OpenGeoHub 2019/predict_tiles/GlobalLUR_R/subset_grep.R
no_license
mengluchu/globalLUR
R
false
false
225
r
#' subset by grep #' @param df the dataframe to subset #' @param grepstring the namestring of the colomns to grab, greplstyle #' @export subset_grep = function(df, grepstring) { df[,which(grepl(grepstring, names(df )))] }
# Obtain the data and download the file from this url url <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" download.file(url, destfile = "/Users/inesanchondo/Desktop/Coursera/GettingandCleaningData-Ines/Project/ Dataset.zip", method = "curl") # 1 Reads the data. T...
/run_analysis.R
no_license
ianchondo/Getting-and-Cleaning-Data-
R
false
false
3,009
r
# Obtain the data and download the file from this url url <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" download.file(url, destfile = "/Users/inesanchondo/Desktop/Coursera/GettingandCleaningData-Ines/Project/ Dataset.zip", method = "curl") # 1 Reads the data. T...
##### part 2: pathway transformation ###### library(pathifier) PDS<-quantify_pathways_deregulation(as.matrix(plasma_raw), row.names(plasma_raw),metabolites.list,pathway.list,as.logical(c(training_norm_pheno,testing_norm_pheno)), attempts = 5, min_exp=0, min_std=0) qpdmat <- matrix(as.data.frame(PDS$scores), nrow=len...
/part2_dimension_transformation.r
no_license
scarlettcanny/lilikoi
R
false
false
551
r
##### part 2: pathway transformation ###### library(pathifier) PDS<-quantify_pathways_deregulation(as.matrix(plasma_raw), row.names(plasma_raw),metabolites.list,pathway.list,as.logical(c(training_norm_pheno,testing_norm_pheno)), attempts = 5, min_exp=0, min_std=0) qpdmat <- matrix(as.data.frame(PDS$scores), nrow=len...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions.R \name{read_ydrive_write} \alias{read_ydrive_write} \title{A function} \usage{ read_ydrive_write( filenames, csv = F, xlsx = F, xls = F, outpath = "data/original/", col_types = "text" ) } \description{ A function } \exa...
/man/read_ydrive_write.Rd
no_license
srhoads/srhoads
R
false
true
424
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions.R \name{read_ydrive_write} \alias{read_ydrive_write} \title{A function} \usage{ read_ydrive_write( filenames, csv = F, xlsx = F, xls = F, outpath = "data/original/", col_types = "text" ) } \description{ A function } \exa...
load("../marPack6.RData") load("../true-table.Rdata") Nrep = 1 eps = 12 geoMod = c(0.333333333333333,0.333333333333333,0.333333333333333) queryMod = c(0.25,0.25,0.25,0.25) source("../sim.R")
/tests/sim/20210907-sim/sim6/launch.R
no_license
jlivsey/Dvar
R
false
false
194
r
load("../marPack6.RData") load("../true-table.Rdata") Nrep = 1 eps = 12 geoMod = c(0.333333333333333,0.333333333333333,0.333333333333333) queryMod = c(0.25,0.25,0.25,0.25) source("../sim.R")
#Exploratory Data Analysis assignment. # Have total emissions from PM2.5 decreased in the United States from 1999 to 2008? # Using the base plotting system, make a plot showing the total PM2.5 emission from # all sources for each of the years 1999, 2002, 2005, and 2008. #Download file if not exist #Here, it is assu...
/plot1.R
no_license
iamcyrilc/ExploratoryDataAnalysis
R
false
false
1,146
r
#Exploratory Data Analysis assignment. # Have total emissions from PM2.5 decreased in the United States from 1999 to 2008? # Using the base plotting system, make a plot showing the total PM2.5 emission from # all sources for each of the years 1999, 2002, 2005, and 2008. #Download file if not exist #Here, it is assu...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/lgcpStructures.R \name{getCovParameters.GPrealisation} \alias{getCovParameters.GPrealisation} \title{getCovParameters.GPrealisation function} \usage{ \method{getCovParameters}{GPrealisation}(obj, ...) } \arguments{ \item{obj}{an GPrea...
/man/getCovParameters.GPrealisation.Rd
no_license
bentaylor1/lgcp
R
false
false
490
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/lgcpStructures.R \name{getCovParameters.GPrealisation} \alias{getCovParameters.GPrealisation} \title{getCovParameters.GPrealisation function} \usage{ \method{getCovParameters}{GPrealisation}(obj, ...) } \arguments{ \item{obj}{an GPrea...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classes.R \name{rpf.numSpec} \alias{rpf.numSpec} \alias{rpf.numSpec,rpf.base-method} \alias{rpf_numSpec_wrapper} \title{Length of the item model vector} \usage{ rpf.numSpec(m) } \arguments{ \item{m}{item model} } \description{ Length of the i...
/rpf/man/rpf.numSpec.Rd
no_license
akhikolla/TestedPackages-NoIssues
R
false
true
418
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/classes.R \name{rpf.numSpec} \alias{rpf.numSpec} \alias{rpf.numSpec,rpf.base-method} \alias{rpf_numSpec_wrapper} \title{Length of the item model vector} \usage{ rpf.numSpec(m) } \arguments{ \item{m}{item model} } \description{ Length of the i...
# R version during development: # > R.version.string # [1] "R version 3.2.0 (2015-04-16)" # # 32bit R used during development: # > .Machine$sizeof.pointer # [1] 4 # # packages required other than base rtools: # install.packages("XML") # install.packages("xlsx") # install.packages("dplyr") # # package versions during sc...
/kpi_lookup_extraction/kpi_lookup.R
no_license
YrAuYong/modelXmlProcessing
R
false
false
14,076
r
# R version during development: # > R.version.string # [1] "R version 3.2.0 (2015-04-16)" # # 32bit R used during development: # > .Machine$sizeof.pointer # [1] 4 # # packages required other than base rtools: # install.packages("XML") # install.packages("xlsx") # install.packages("dplyr") # # package versions during sc...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/convenience.R \name{TrajsStatsReplaceNAs} \alias{TrajsStatsReplaceNAs} \title{Replace NAs in a data frame} \usage{ TrajsStatsReplaceNAs( df, column, replacementValue = mean(df[, column], na.rm = TRUE), flagColumn = NULL ) } \arguments...
/man/TrajsStatsReplaceNAs.Rd
no_license
JimMcL/trajr
R
false
true
1,342
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/convenience.R \name{TrajsStatsReplaceNAs} \alias{TrajsStatsReplaceNAs} \title{Replace NAs in a data frame} \usage{ TrajsStatsReplaceNAs( df, column, replacementValue = mean(df[, column], na.rm = TRUE), flagColumn = NULL ) } \arguments...
# This file is generated by make.paws. Please do not edit here. #' @importFrom paws.common get_config new_operation new_request send_request #' @include apigatewayv2_service.R NULL #' Creates an Api resource #' #' @description #' Creates an Api resource. #' #' See [https://www.paws-r-sdk.com/docs/apigatewayv2_create_a...
/R/apigatewayv2_operations.R
no_license
cran/paws.networking
R
false
false
130,293
r
# This file is generated by make.paws. Please do not edit here. #' @importFrom paws.common get_config new_operation new_request send_request #' @include apigatewayv2_service.R NULL #' Creates an Api resource #' #' @description #' Creates an Api resource. #' #' See [https://www.paws-r-sdk.com/docs/apigatewayv2_create_a...
library(plotrix) # Create data for the graph. x <- c(21, 62, 10, 53) labels <- c("London", "New York", "Singapore", "Mumbai") # Give the chart file a name. png(file = "city.jpg") # Plot the chart. pie(x,labels) # Save the file. dev.off() # Give the chart file a name. png(file = "city_title_colours.jpg") # Plot th...
/PieChart.R
no_license
robot9xvt/R-Demo
R
false
false
984
r
library(plotrix) # Create data for the graph. x <- c(21, 62, 10, 53) labels <- c("London", "New York", "Singapore", "Mumbai") # Give the chart file a name. png(file = "city.jpg") # Plot the chart. pie(x,labels) # Save the file. dev.off() # Give the chart file a name. png(file = "city_title_colours.jpg") # Plot th...
# title: "Stressed Lake Tool" # author: "Nathan Johnson" # date: "2015-06-17" # ui.R library(shiny) library(leaflet) library(ROracle) library(RColorBrewer) library(maptools) library(maps) library(mapproj) library(pander) library(xtable) library(rmarkdown) # stationMetaData <- read.csv("stressedLake - app/listOfStre...
/ui.R
no_license
natefromcolorado/SWFWMD-Stressed-Lake-App
R
false
false
2,647
r
# title: "Stressed Lake Tool" # author: "Nathan Johnson" # date: "2015-06-17" # ui.R library(shiny) library(leaflet) library(ROracle) library(RColorBrewer) library(maptools) library(maps) library(mapproj) library(pander) library(xtable) library(rmarkdown) # stationMetaData <- read.csv("stressedLake - app/listOfStre...
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810576853402e+146, 4.12396251261199e-221, 0), .Dim = c(5L, 1L))) result <- do.call(CNull:::communities_individual_based_sampling_beta,testlist) str(result)
/CNull/inst/testfiles/communities_individual_based_sampling_beta/AFL_communities_individual_based_sampling_beta/communities_individual_based_sampling_beta_valgrind_files/1615835260-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
270
r
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22810576853402e+146, 4.12396251261199e-221, 0), .Dim = c(5L, 1L))) result <- do.call(CNull:::communities_individual_based_sampling_beta,testlist) str(result)
testlist <- list(includeM = -146297202L, includeSRID = -1443269339L, includeZ = 854927390L, wkt = c("cskswwyfiqgqfuxupsdy", "tt", "yxgbhozjgphuzzsfbanm", NA, "litkln", NA, NA, NA, NA, NA, "dvfgfqxjgkovfqpqspbl", NA, NA, "hlfjvhtvddpbhnxnc", "ckpugrhmluwmqgzwcijv", NA, "jio", NA, "xlbpxksrsajgqkwktlo...
/issuestests/wk/inst/testfiles/cpp_wkt_translate_wksxp/cpp_wkt_translate_wksxp_output/log_8a280a21ee509742d5a4679f6cf29011a49beccd/cpp_wkt_translate_wksxp-test.R
no_license
akhikolla/RcppDeepStateTest
R
false
false
563
r
testlist <- list(includeM = -146297202L, includeSRID = -1443269339L, includeZ = 854927390L, wkt = c("cskswwyfiqgqfuxupsdy", "tt", "yxgbhozjgphuzzsfbanm", NA, "litkln", NA, NA, NA, NA, NA, "dvfgfqxjgkovfqpqspbl", NA, NA, "hlfjvhtvddpbhnxnc", "ckpugrhmluwmqgzwcijv", NA, "jio", NA, "xlbpxksrsajgqkwktlo...
#' #' @importFrom utils packageDescription .onAttach <- function(libname, pkgname){ pkg.version <- packageDescription("bmmix", fields = "Version") startup.txt <- paste("\n === bmmix", pkg.version, "is loaded ===\n") startup.txt <- paste(startup.txt, "Information & Documentation -> check the R-epi project:...
/R/zzz.R
no_license
thibautjombart/bmmix
R
false
false
532
r
#' #' @importFrom utils packageDescription .onAttach <- function(libname, pkgname){ pkg.version <- packageDescription("bmmix", fields = "Version") startup.txt <- paste("\n === bmmix", pkg.version, "is loaded ===\n") startup.txt <- paste(startup.txt, "Information & Documentation -> check the R-epi project:...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/google-functions.R \name{dist_google} \alias{dist_google} \title{Return travel network distances and time using the Google Maps API} \usage{ dist_google(from, to, google_api = Sys.getenv("GOOGLEDIST"), g_units = "metric", mode = c("bicyclin...
/man/dist_google.Rd
permissive
seanolondon/stplanr
R
false
true
2,857
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/google-functions.R \name{dist_google} \alias{dist_google} \title{Return travel network distances and time using the Google Maps API} \usage{ dist_google(from, to, google_api = Sys.getenv("GOOGLEDIST"), g_units = "metric", mode = c("bicyclin...
\name{coefs.plsRnp} \alias{coefs.plsRnp} \title{Coefficients for bootstrap computations of PLSR models} \description{ A function passed to \code{boot} to perform bootstrap. } \usage{ coefs.plsRnp(dataRepYtt,ind,nt,modele, maxcoefvalues,wwetoile,ifbootfail) } \arguments{ \item{dataRepYtt}{components' coordinates to bo...
/man/coefs.plsRnp.rd
no_license
weecology/plsRglm
R
false
false
1,452
rd
\name{coefs.plsRnp} \alias{coefs.plsRnp} \title{Coefficients for bootstrap computations of PLSR models} \description{ A function passed to \code{boot} to perform bootstrap. } \usage{ coefs.plsRnp(dataRepYtt,ind,nt,modele, maxcoefvalues,wwetoile,ifbootfail) } \arguments{ \item{dataRepYtt}{components' coordinates to bo...
power_consumption<-read.table("C:/Users/i53074/Desktop/Data Science/Data Exploration/Assignment 1/household_power_consumption.txt",sep=";",header = T) power_consumption_needed<-subset(power_consumption,Date == "1/2/2007" | Date == "2/2/2007") global_active_power<-as.numeric(as.character(power_consumption_needed$Global_...
/plot3.R
no_license
yanqilin0713/ExData_Plotting1
R
false
false
1,108
r
power_consumption<-read.table("C:/Users/i53074/Desktop/Data Science/Data Exploration/Assignment 1/household_power_consumption.txt",sep=";",header = T) power_consumption_needed<-subset(power_consumption,Date == "1/2/2007" | Date == "2/2/2007") global_active_power<-as.numeric(as.character(power_consumption_needed$Global_...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_lines_range.R \name{get_lines_range} \alias{get_lines_range} \title{Scrape SportsBook Review's Historical Betting Lines} \usage{ get_lines_range( sport = "NFL", bet_type = "spread", period = "full", start_date = 20191222, end_da...
/man/get_lines_range.Rd
permissive
Tubbz-alt/bettoR
R
false
true
1,576
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_lines_range.R \name{get_lines_range} \alias{get_lines_range} \title{Scrape SportsBook Review's Historical Betting Lines} \usage{ get_lines_range( sport = "NFL", bet_type = "spread", period = "full", start_date = 20191222, end_da...
# 1 - Trabalhando com colunas de um data.frame : #Para selecionar ou trabalhar separadamente com um campo/(coluna) #do seu data.frame, deve-se utilizar o $ : conf <- (covidao$New_cases) conf #Aqui recebeu a coluna 'New_cases' --> Novos_casos; #Tentaremos criar um vetor contendo infos somente do Brasil : cov...
/Projeto_Covid19/modelo_02.R
no_license
CarlosViniMSouza/R-Basic
R
false
false
904
r
# 1 - Trabalhando com colunas de um data.frame : #Para selecionar ou trabalhar separadamente com um campo/(coluna) #do seu data.frame, deve-se utilizar o $ : conf <- (covidao$New_cases) conf #Aqui recebeu a coluna 'New_cases' --> Novos_casos; #Tentaremos criar um vetor contendo infos somente do Brasil : cov...
context("cross validation") df <- data.frame(x = 1:100) test_that("seed enables reproducible results", { expect_identical( crossv_mc(df, n = 3, seed = 10), crossv_mc(df, n = 3, seed = 10) ) expect_false(identical( crossv_mc(df, n = 3, seed = 10), crossv_mc(df, n = 3, seed = 234) )) expect...
/tests/testthat/test-cross_validation.R
no_license
drsimonj/modelr
R
false
false
503
r
context("cross validation") df <- data.frame(x = 1:100) test_that("seed enables reproducible results", { expect_identical( crossv_mc(df, n = 3, seed = 10), crossv_mc(df, n = 3, seed = 10) ) expect_false(identical( crossv_mc(df, n = 3, seed = 10), crossv_mc(df, n = 3, seed = 234) )) expect...
# quiz1 solution -- there are often many different for each problem # I've left some "scaffolding" in place to show how I set up and/or verify my solutions # 1. Create a vector that contains 20 numbers. # (You may choose whatever numbers you like, # but make sure there are some duplicates.) cintRob <- c(1:5,2:6,3:...
/Week1 - hands on lab.R
no_license
LovinSpoonful/Week1
R
false
false
4,206
r
# quiz1 solution -- there are often many different for each problem # I've left some "scaffolding" in place to show how I set up and/or verify my solutions # 1. Create a vector that contains 20 numbers. # (You may choose whatever numbers you like, # but make sure there are some duplicates.) cintRob <- c(1:5,2:6,3:...
library(qualvar) ### Name: DM ### Title: Deviation from the mode (DM) ### Aliases: DM ### ** Examples x <- rmultinom(1, 100, rep_len(0.25, 4)) x <- as.vector(t(x)) names(x) <- c("a", "b", "c", "d") DM(x) df <- rmultinom(10, 100, rep_len(0.25, 4)) df <- as.data.frame(t(df)) names(df) <- c("a", "b", "c", "d") apply(...
/data/genthat_extracted_code/qualvar/examples/DM.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
334
r
library(qualvar) ### Name: DM ### Title: Deviation from the mode (DM) ### Aliases: DM ### ** Examples x <- rmultinom(1, 100, rep_len(0.25, 4)) x <- as.vector(t(x)) names(x) <- c("a", "b", "c", "d") DM(x) df <- rmultinom(10, 100, rep_len(0.25, 4)) df <- as.data.frame(t(df)) names(df) <- c("a", "b", "c", "d") apply(...
# # This is the server logic of a Shiny web application. You can run the # application by clicking 'Run App' above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # # I use the project here as a template for my app: https://github.com/pspachtholz/BookRecommender # as we...
/server.R
no_license
jackw117/movie-recommender
R
false
false
8,341
r
# # This is the server logic of a Shiny web application. You can run the # application by clicking 'Run App' above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # # I use the project here as a template for my app: https://github.com/pspachtholz/BookRecommender # as we...
findFn <- function(string, maxPages = 100, sortby = NULL, verbose = 1, ...) { ## ## 1. Define internal function ## parseLinks <- function(links) { lnk <- paste0("https://search.r-project.org",sub(".*url=\\\"(.*)\\\" .*$", "\\1", links, use...
/R/findFn.R
no_license
sbgraves237/sos
R
false
false
8,633
r
findFn <- function(string, maxPages = 100, sortby = NULL, verbose = 1, ...) { ## ## 1. Define internal function ## parseLinks <- function(links) { lnk <- paste0("https://search.r-project.org",sub(".*url=\\\"(.*)\\\" .*$", "\\1", links, use...
zip.fsreg_2 <- function(target, dataset, iniset = NULL, threshold = 0.05, wei = NULL, tol = 2, ncores = 1) { dm <- dim(dataset) if ( is.null(dm) ) { n <- length(target) p <- 1 } else { n <- dm[1] ## sample size p <- dm[2] ## number of variables } devi <- dof <- numeric( p ) ...
/R/zip.fsreg_2.R
no_license
cran/MXM
R
false
false
7,330
r
zip.fsreg_2 <- function(target, dataset, iniset = NULL, threshold = 0.05, wei = NULL, tol = 2, ncores = 1) { dm <- dim(dataset) if ( is.null(dm) ) { n <- length(target) p <- 1 } else { n <- dm[1] ## sample size p <- dm[2] ## number of variables } devi <- dof <- numeric( p ) ...
# PreRequisites: You have installed Revolution R Enterprise 7.5.0 or higher on the machine and SQL Server 2016 CTP3 or higher on the database server # Install required R libraries for this walkthrough if they are not installed. # See https://msdn.microsoft.com/en-us/library/mt591989.aspx on install directions. if ...
/DataScienceFromAtoZ/Script/Script/Part_5/script_3_RSQL_R_Walkthrough.R
no_license
bcafferky/shared
R
false
false
12,958
r
# PreRequisites: You have installed Revolution R Enterprise 7.5.0 or higher on the machine and SQL Server 2016 CTP3 or higher on the database server # Install required R libraries for this walkthrough if they are not installed. # See https://msdn.microsoft.com/en-us/library/mt591989.aspx on install directions. if ...
require(shiny) shinyUI(fluidPage( titlePanel("Predict Horsepower from MPG"), sidebarLayout( sidebarPanel( sliderInput("sliderMPG", "What is the MPG of the car?", 10, 35, value = 20), checkboxInput("showModel1", "Show/Hide Model 1", value = ...
/reactive_example/ui.R
no_license
lawrence-tomaziefski/Data_Projects
R
false
false
804
r
require(shiny) shinyUI(fluidPage( titlePanel("Predict Horsepower from MPG"), sidebarLayout( sidebarPanel( sliderInput("sliderMPG", "What is the MPG of the car?", 10, 35, value = 20), checkboxInput("showModel1", "Show/Hide Model 1", value = ...
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/consume.r \name{consume} \alias{consume} \title{Consumes the first n elements of an iterator} \usage{ consume(iterator, n = 0) } \arguments{ \item{iterator}{an iterator object} \item{n}{The number of elements to consume.} } \value{ N...
/man/consume.Rd
permissive
arturochian/itertools2
R
false
false
846
rd
% Generated by roxygen2 (4.1.0): do not edit by hand % Please edit documentation in R/consume.r \name{consume} \alias{consume} \title{Consumes the first n elements of an iterator} \usage{ consume(iterator, n = 0) } \arguments{ \item{iterator}{an iterator object} \item{n}{The number of elements to consume.} } \value{ N...
#Fetching dataset into R fetch_data <- function() { dataFile <- "household_power_consumption.csv" if(file.exists(dataFile)) { # if already downloaded, read the data directly dat <- read.csv(dataFile) dat$DateTime <- strptime(dat$DateTime, "%Y-%m-%d %H:%M:%S") dat }else { ...
/fetch_data.R
no_license
saicool/ExData_Plotting1
R
false
false
1,295
r
#Fetching dataset into R fetch_data <- function() { dataFile <- "household_power_consumption.csv" if(file.exists(dataFile)) { # if already downloaded, read the data directly dat <- read.csv(dataFile) dat$DateTime <- strptime(dat$DateTime, "%Y-%m-%d %H:%M:%S") dat }else { ...
context("spark_install_find") test_that("spark_install_find failure on invalid version", { skip_on_cran() testthat::expect_error( spark_install_find(version = "9.9.9") ) })
/R/tests/testthat/spark_install_find.R
permissive
eedeleon/spark-install
R
false
false
185
r
context("spark_install_find") test_that("spark_install_find failure on invalid version", { skip_on_cran() testthat::expect_error( spark_install_find(version = "9.9.9") ) })
#hack to avoid "no visible global function definition" utils::globalVariables(c("chr_hg19", "pos_hg19")) #' Add GWAS data from GRASP to list #' #' \code{addGrasp} returns a list with the nineteenth element as dataframe with GWAS data from the GRASP database \url{grasp.nhlbi.nih.gov/}. #' #' This gives basic informati...
/mglR/R/addGrasp_function.R
no_license
klh64/mglR
R
false
false
1,407
r
#hack to avoid "no visible global function definition" utils::globalVariables(c("chr_hg19", "pos_hg19")) #' Add GWAS data from GRASP to list #' #' \code{addGrasp} returns a list with the nineteenth element as dataframe with GWAS data from the GRASP database \url{grasp.nhlbi.nih.gov/}. #' #' This gives basic informati...
#Logistic Regression starts here library(MASS) attach(Boston) library(class) crime = rep(0, length(crim)) crime[crim > median(crim)] = 1 Boston = data.frame(Boston, crime) #First half is train train = 1:(dim(Boston)[1] / 2) test = (dim(Boston)[1] / 2 + 1):length(crim) train_data = Boston[train, ] tes...
/Assignment_4/5_13.R
no_license
manoj13691/Applied-Machine-Learning
R
false
false
1,803
r
#Logistic Regression starts here library(MASS) attach(Boston) library(class) crime = rep(0, length(crim)) crime[crim > median(crim)] = 1 Boston = data.frame(Boston, crime) #First half is train train = 1:(dim(Boston)[1] / 2) test = (dim(Boston)[1] / 2 + 1):length(crim) train_data = Boston[train, ] tes...
"hall.fame" <- structure(list(first = c("HANK", "JERRY", "SPARKY", "BOBBY", "JOE", "TOMMIE", "LUIS", "EDDIE", "BERNIE", "ETHAN", "DICK", "GENE", "BOB", "BILL", "SANDY", "FELIPE", "JESUS", "MATTY", "JOEY", "RUBEN", "DAVE", "JOHN", "CAP", "LUIS", "LUKE", "JIMMY", "TONY", "RICHIE", "ALAN", "BOB", "JOE", "RICK", "JIMMY...
/data/hall.fame.R
no_license
jverzani/UsingR
R
false
false
222,765
r
"hall.fame" <- structure(list(first = c("HANK", "JERRY", "SPARKY", "BOBBY", "JOE", "TOMMIE", "LUIS", "EDDIE", "BERNIE", "ETHAN", "DICK", "GENE", "BOB", "BILL", "SANDY", "FELIPE", "JESUS", "MATTY", "JOEY", "RUBEN", "DAVE", "JOHN", "CAP", "LUIS", "LUKE", "JIMMY", "TONY", "RICHIE", "ALAN", "BOB", "JOE", "RICK", "JIMMY...
## Functions to create USSC-themed D3.js templates in R ## Zoe Meers ## The United States Studies Centre at the University of Sydney #' D3.js Ideal Point Estimation for legislative roll call data #' @description #' This function creates a D3.js ideal point estimation graph for legislative roll call data. #' @section ...
/R/r2d3.R
no_license
USStudiesCentre/ussc_draft
R
false
false
1,237
r
## Functions to create USSC-themed D3.js templates in R ## Zoe Meers ## The United States Studies Centre at the University of Sydney #' D3.js Ideal Point Estimation for legislative roll call data #' @description #' This function creates a D3.js ideal point estimation graph for legislative roll call data. #' @section ...
# A comparison of summative and multiplicative methods for aggregating envrionmental condition indices # Author: Peter Kullberg, peter.kullberg@ymparisto.fi library(tidyverse) # Load the calculators source("src/calculators.R") # Create a value space that covers all five variables evenly d1f <- seq(0, 1, by = 0.1) d2f...
/src/compare_methods.R
permissive
PKullberg/compensation_method_comparison
R
false
false
2,874
r
# A comparison of summative and multiplicative methods for aggregating envrionmental condition indices # Author: Peter Kullberg, peter.kullberg@ymparisto.fi library(tidyverse) # Load the calculators source("src/calculators.R") # Create a value space that covers all five variables evenly d1f <- seq(0, 1, by = 0.1) d2f...
library(dplyr) ss.bounds <- readRDS("ss.bounds.rds") alpha <- 0.025 method <- 'wald' scenario <- 25 param <- 1 anal_type <- "mice" ss <- ss.bounds%>% dplyr::filter(method == "wald", scenario.id == scenario) do_val <- 0.1 x1 <- parallel::mclapply(X = 1:10000, mc.cores = parallel::detec...
/sim_pgms/wald/do10/2xcontH1_sc25_do10_mice.R
no_license
yuliasidi/nibinom_apply
R
false
false
3,326
r
library(dplyr) ss.bounds <- readRDS("ss.bounds.rds") alpha <- 0.025 method <- 'wald' scenario <- 25 param <- 1 anal_type <- "mice" ss <- ss.bounds%>% dplyr::filter(method == "wald", scenario.id == scenario) do_val <- 0.1 x1 <- parallel::mclapply(X = 1:10000, mc.cores = parallel::detec...
## Subset MDS to selected points subsetMDS <- function(m,sel) { mm <- new('mds',points=getPoints(m)[sel,],R.square=NULL,stress=NULL) mm } pause = function() { if (interactive()) { invisible(readline(prompt = "Press <Enter> to continue...")) }...
/chroGPS/R/diffFactors.R
no_license
singlecoated/chroGPS2
R
false
false
3,375
r
## Subset MDS to selected points subsetMDS <- function(m,sel) { mm <- new('mds',points=getPoints(m)[sel,],R.square=NULL,stress=NULL) mm } pause = function() { if (interactive()) { invisible(readline(prompt = "Press <Enter> to continue...")) }...
library(tidylda) library(textmineR) library(tidyverse) topics_by_class <- rowMeans(dtm_bigram) * big_theta topics_by_class <- by( data = topics_by_class, INDICES = doc_class, FUN = function(x){ if(is.null(nrow(x))) { x / sum(x) } else { y <- colSums(x) y / sum(y) } } ) topics_...
/R/07_topics_by_category.R
no_license
TommyJones/comps
R
false
false
748
r
library(tidylda) library(textmineR) library(tidyverse) topics_by_class <- rowMeans(dtm_bigram) * big_theta topics_by_class <- by( data = topics_by_class, INDICES = doc_class, FUN = function(x){ if(is.null(nrow(x))) { x / sum(x) } else { y <- colSums(x) y / sum(y) } } ) topics_...
filename <- "getdata_dataset.zip" ## Download and unzip the dataset: if (!file.exists(filename)){ fileURL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip " download.file(fileURL, filename, method="curl") } if (!file.exists("UCI HAR Dataset")) { unzip(filena...
/run_analysis.R
no_license
MSpoden/datasciencecoursera
R
false
false
2,056
r
filename <- "getdata_dataset.zip" ## Download and unzip the dataset: if (!file.exists(filename)){ fileURL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip " download.file(fileURL, filename, method="curl") } if (!file.exists("UCI HAR Dataset")) { unzip(filena...