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
### Data Science Track ### Exploring Data ## Quiz 1 - plot 4 (includes 4 graphs) ## use local unix tools to strip down our data by issuing the following commands ## (remove the "#>" before issuing the commands): #> grep "^[12]\/2\/2007" household_power_consumption.txt > hpc_2days_noheader.txt #> head -1 household_powe...
/plot4.R
no_license
epinym/ExData_Plotting1
R
false
false
1,634
r
### Data Science Track ### Exploring Data ## Quiz 1 - plot 4 (includes 4 graphs) ## use local unix tools to strip down our data by issuing the following commands ## (remove the "#>" before issuing the commands): #> grep "^[12]\/2\/2007" household_power_consumption.txt > hpc_2days_noheader.txt #> head -1 household_powe...
# This program reads the data created by the replicators and downloaded from # Google in the previous step and compiles them into a master dataframe # ------------------------------------- # Compile replication lists into a master file # ------------------------------------- # Read in worksheet names of the replicati...
/programs/02_read_clean_replicationlist.R
no_license
AEADataEditor/report-aea-data-editor-2018
R
false
false
2,724
r
# This program reads the data created by the replicators and downloaded from # Google in the previous step and compiles them into a master dataframe # ------------------------------------- # Compile replication lists into a master file # ------------------------------------- # Read in worksheet names of the replicati...
# ctr+shift+c(一括コメント) #これにより深さと増加量のグラフをすべて生成 #initialize total_height<-0 total_increase<-0 ave_height<-0 ave_increase<-0 #filename before_workspace <- "/home/ax909424/r" after_workspace <- "/simulation_result" expand <- c("/reproduction","/homo_path","/bias","/both") date <- c(...
/r_workspace_master/source/create_4_image_ver1.3.R
no_license
kenty38/research_git_repository
R
false
false
4,030
r
# ctr+shift+c(一括コメント) #これにより深さと増加量のグラフをすべて生成 #initialize total_height<-0 total_increase<-0 ave_height<-0 ave_increase<-0 #filename before_workspace <- "/home/ax909424/r" after_workspace <- "/simulation_result" expand <- c("/reproduction","/homo_path","/bias","/both") date <- c(...
#' Tchau #' #' Description here #' #' @return nothing #' @export #' #' @examples #' '> tchau() #' [1] "Tchau, world!" tchau <- function() { print("Tchau, world!") }
/R/tchau.R
permissive
hugoharada/package00
R
false
false
170
r
#' Tchau #' #' Description here #' #' @return nothing #' @export #' #' @examples #' '> tchau() #' [1] "Tchau, world!" tchau <- function() { print("Tchau, world!") }
#' Sets the default breaks for a time axis #' #' \code{xgx_breaks_time} sets the default breaks for a time axis, #' given the units of the data and the units of the plot. #' It is inspired by scales::extended_breaks #' #' for the extended breaks function, weights is a set of 4 weights for #' \enumerate{ #' \item simp...
/R/xgx_breaks_time.R
permissive
Novartis/xgxr
R
false
false
3,142
r
#' Sets the default breaks for a time axis #' #' \code{xgx_breaks_time} sets the default breaks for a time axis, #' given the units of the data and the units of the plot. #' It is inspired by scales::extended_breaks #' #' for the extended breaks function, weights is a set of 4 weights for #' \enumerate{ #' \item simp...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot.gprd.R \name{plot.gprd} \alias{plot.gprd} \title{Plot Gaussian Process Regression for Regression Discontinuity} \usage{ \method{plot}{gprd}( x, from = "data_min", to = "data_max", n_points = NULL, ci_width = 0.95, data_color ...
/man/plot.gprd.Rd
no_license
duckmayr/gprd
R
false
true
2,227
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plot.gprd.R \name{plot.gprd} \alias{plot.gprd} \title{Plot Gaussian Process Regression for Regression Discontinuity} \usage{ \method{plot}{gprd}( x, from = "data_min", to = "data_max", n_points = NULL, ci_width = 0.95, data_color ...
#' Check package including congruence of attributes and data #' #' This function checks that the attributes listed in the metadata match the values in the data for each #' tabular data object. It may also optionally check if all creators have ORCIDs and have full access #' to all elements of the data package. #' #' @pa...
/R/qa_package.R
permissive
NCEAS/datamgmt
R
false
false
32,329
r
#' Check package including congruence of attributes and data #' #' This function checks that the attributes listed in the metadata match the values in the data for each #' tabular data object. It may also optionally check if all creators have ORCIDs and have full access #' to all elements of the data package. #' #' @pa...
\name{fsu-package} \alias{fsu-package} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Forecasting Functions for Time Series } \description{ Featuring methods and tools developed by the Foreacsting & Strategy Unit (National Technical University of Athens) \cr \url{https://fsu.gr}. } \de...
/man/fsu-package.Rd
no_license
vagtheodorou/fsu
R
false
false
462
rd
\name{fsu-package} \alias{fsu-package} %- Also NEED an '\alias' for EACH other topic documented here. \title{ Forecasting Functions for Time Series } \description{ Featuring methods and tools developed by the Foreacsting & Strategy Unit (National Technical University of Athens) \cr \url{https://fsu.gr}. } \de...
library(shiny) library(HistData) data(GaltonFamilies) fitGalton <- readRDS("galtonFit.rds") lowerConf <<- 0 upperConf <<- 0 fit <<- 0 predictHeight <- function(input) { newData = data.frame("mother" = input$mother, "father" = input$father, "gender" = input$gender, ...
/heightEstimator/server.R
no_license
KJBrock/DataProducts
R
false
false
1,397
r
library(shiny) library(HistData) data(GaltonFamilies) fitGalton <- readRDS("galtonFit.rds") lowerConf <<- 0 upperConf <<- 0 fit <<- 0 predictHeight <- function(input) { newData = data.frame("mother" = input$mother, "father" = input$father, "gender" = input$gender, ...
################################# ####### Synthetic examples ###### ######## Nested clusters ######## ################################# rm(list=ls()) library(MASS) library(ggplot2) library(reshape) library(reshape2) ### Define ggplot2 theme ### my_theme <- theme( panel.background = element_rect(fill = NA), ...
/code/synthetic-data-c-plot-new-kmeans.R
no_license
acabassi/klic-code
R
false
false
5,369
r
################################# ####### Synthetic examples ###### ######## Nested clusters ######## ################################# rm(list=ls()) library(MASS) library(ggplot2) library(reshape) library(reshape2) ### Define ggplot2 theme ### my_theme <- theme( panel.background = element_rect(fill = NA), ...
% Generated by roxygen2 (4.0.2): do not edit by hand \name{saveWidget} \alias{saveWidget} \title{Save a widget to an HTML file} \usage{ saveWidget(widget, file, selfcontained = TRUE, libdir = NULL) } \arguments{ \item{widget}{Widget to save} \item{file}{File to save HTML into} \item{selfcontained}{Whether to save the...
/man/saveWidget.Rd
no_license
hafen/htmlwidgets
R
false
false
646
rd
% Generated by roxygen2 (4.0.2): do not edit by hand \name{saveWidget} \alias{saveWidget} \title{Save a widget to an HTML file} \usage{ saveWidget(widget, file, selfcontained = TRUE, libdir = NULL) } \arguments{ \item{widget}{Widget to save} \item{file}{File to save HTML into} \item{selfcontained}{Whether to save the...
library(powdR) ### Name: bkg ### Title: Fit a background to XRPD data ### Aliases: bkg ### ** Examples data(soils) fit_bkg <- bkg(soils$granite)
/data/genthat_extracted_code/powdR/examples/bkg.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
152
r
library(powdR) ### Name: bkg ### Title: Fit a background to XRPD data ### Aliases: bkg ### ** Examples data(soils) fit_bkg <- bkg(soils$granite)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Prediction_operators.R \name{getPredictionProbabilities} \alias{getPredictionProbabilities} \title{Get probabilities for some classes.} \usage{ getPredictionProbabilities(pred, cl) } \arguments{ \item{pred}{[\code{\link{Prediction}}]\cr Predi...
/man/getPredictionProbabilities.Rd
no_license
abhik1368/mlr
R
false
true
1,447
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Prediction_operators.R \name{getPredictionProbabilities} \alias{getPredictionProbabilities} \title{Get probabilities for some classes.} \usage{ getPredictionProbabilities(pred, cl) } \arguments{ \item{pred}{[\code{\link{Prediction}}]\cr Predi...
spacetime.db = function( DS, p, B=NULL, grp=NULL ) { #// usage: low level function to convert data into bigmemory obects to permit parallel #// data access and maipulation #// B is the xyz data to work upon #/+ if (DS %in% "bigmemory.inla.filenames" ) { # create file backed bigmemory obj...
/spacetime/src/_Rfunctions/spacetime.methods/spacetime.db.r
no_license
fernandomayer/ecomod
R
false
false
18,463
r
spacetime.db = function( DS, p, B=NULL, grp=NULL ) { #// usage: low level function to convert data into bigmemory obects to permit parallel #// data access and maipulation #// B is the xyz data to work upon #/+ if (DS %in% "bigmemory.inla.filenames" ) { # create file backed bigmemory obj...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data-coastlines.R \docType{data} \name{coastlines} \alias{coastlines} \alias{Melbourne_coastline} \alias{Sydney_coastline} \alias{Brisbane_coastline} \title{Coastline coordinates} \format{\describe{ \item{\code{long}}{Longitude of coastline.}...
/man/coastlines.Rd
no_license
HughParsonage/grattanCharts
R
false
true
691
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data-coastlines.R \docType{data} \name{coastlines} \alias{coastlines} \alias{Melbourne_coastline} \alias{Sydney_coastline} \alias{Brisbane_coastline} \title{Coastline coordinates} \format{\describe{ \item{\code{long}}{Longitude of coastline.}...
#for splitting data library(caTools) split<-sample.split(all_data,SplitRatio=0.7) split train1<-subset(all_data,split="TRUE") test1<-subset(all_data,split="FALSE") train1 test1 model2<-lm(January ~.,data=train1) summary(model2) pred2<-predict(model2,test1) pred2 summary(model2) #for calculating err...
/Regression_Analysis.R
no_license
Gunjal15/Spatio-Temporal-Analysis-Of-Agro-Climatic-Parameters-Of-India-Using-Machine-Learning-Algorithms
R
false
false
995
r
#for splitting data library(caTools) split<-sample.split(all_data,SplitRatio=0.7) split train1<-subset(all_data,split="TRUE") test1<-subset(all_data,split="FALSE") train1 test1 model2<-lm(January ~.,data=train1) summary(model2) pred2<-predict(model2,test1) pred2 summary(model2) #for calculating err...
#' Dismounts veracrypt container directly from R #' #' This function dismounts the veracrypt container directly from R. Also check the sister function \code{\link{vc_mount}}. #' @param drive character: name of the drive from which to dismount the volume. Example - "Z://" #' @param vcexecutable character: name of the ve...
/R/vc_dismount.R
no_license
Anoopsinghrawat/snxt
R
false
false
1,039
r
#' Dismounts veracrypt container directly from R #' #' This function dismounts the veracrypt container directly from R. Also check the sister function \code{\link{vc_mount}}. #' @param drive character: name of the drive from which to dismount the volume. Example - "Z://" #' @param vcexecutable character: name of the ve...
## R programming assignment Deadline : 9-27-2015 makeCacheMatrix <- function(x = matrix()) { ## makeCacheMatrix: This function creates a special "matrix" object that can cache its inverse. m <- NULL ## m is set to null set <- function(y) { x <<- y m <<- NULL } get <- function() x set...
/cachematrix.R
no_license
tuliphs1113/ProgrammingAssignment2
R
false
false
941
r
## R programming assignment Deadline : 9-27-2015 makeCacheMatrix <- function(x = matrix()) { ## makeCacheMatrix: This function creates a special "matrix" object that can cache its inverse. m <- NULL ## m is set to null set <- function(y) { x <<- y m <<- NULL } get <- function() x set...
testlist <- list(genotype = c(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(detectRUNS:::genoConvertCpp,testlist) str(result)
/detectRUNS/inst/testfiles/genoConvertCpp/libFuzzer_genoConvertCpp/genoConvertCpp_valgrind_files/1609875257-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
203
r
testlist <- list(genotype = c(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(detectRUNS:::genoConvertCpp,testlist) str(result)
context("API methods") exercism_path <- "~/temp" exercism_key <- "test123" dir.create(exercism_path) Sys.setenv(EXERCISM_KEY = exercism_key) Sys.setenv(EXERCISM_PATH = path.expand(exercism_path)) on.exit({ unlink(exercism_path, recursive = TRUE, force = TRUE) Sys.unsetenv("EXERCISM_KEY") Sys.unsetenv("EXERCISM...
/tests/testthat/test-api.R
permissive
jonmcalder/exercism
R
false
false
1,414
r
context("API methods") exercism_path <- "~/temp" exercism_key <- "test123" dir.create(exercism_path) Sys.setenv(EXERCISM_KEY = exercism_key) Sys.setenv(EXERCISM_PATH = path.expand(exercism_path)) on.exit({ unlink(exercism_path, recursive = TRUE, force = TRUE) Sys.unsetenv("EXERCISM_KEY") Sys.unsetenv("EXERCISM...
############################################################################################################################ # checkModelList() # This checks user model list passed to MARSS(). # The main purpose is to make sure that MARSS.form functions will work not to make sure model is valid # Dim checks on ...
/R/checkModelList.r
permissive
nwfsc-timeseries/MARSS
R
false
false
4,990
r
############################################################################################################################ # checkModelList() # This checks user model list passed to MARSS(). # The main purpose is to make sure that MARSS.form functions will work not to make sure model is valid # Dim checks on ...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/edge_info.R \name{edge_info} \alias{edge_info} \title{Get detailed information on edges} \usage{ edge_info(graph) } \arguments{ \item{graph}{a graph object of class 'gv_graph'.} } \value{ a data frame containing information specific t...
/man/edge_info.Rd
no_license
taylorruss/DiagrammeR
R
false
false
469
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/edge_info.R \name{edge_info} \alias{edge_info} \title{Get detailed information on edges} \usage{ edge_info(graph) } \arguments{ \item{graph}{a graph object of class 'gv_graph'.} } \value{ a data frame containing information specific t...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/operations.R \name{log,ExpressionSet-method} \alias{log,ExpressionSet-method} \alias{expb} \alias{expb,numeric-method} \alias{expb,matrix-method} \alias{expb,ExpressionSet-method} \alias{exp,ExpressionSet-method} \alias{range,ExpressionSet-me...
/man/ExpressionSet-compute.Rd
no_license
linuxpham/xbioc
R
false
true
1,380
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/operations.R \name{log,ExpressionSet-method} \alias{log,ExpressionSet-method} \alias{expb} \alias{expb,numeric-method} \alias{expb,matrix-method} \alias{expb,ExpressionSet-method} \alias{exp,ExpressionSet-method} \alias{range,ExpressionSet-me...
\name{pcor.shrink} \alias{pcor.shrink} \alias{pvar.shrink} \title{Shrinkage Estimates of Partial Correlation and Partial Variance} \description{ The functions \code{pcor.shrink} and \code{pvar.shrink} compute shrinkage estimates of partial correlation and partial variance, respectively. } \usage{ pcor.shrink(x, ...
/man/pcor.shrink.Rd
no_license
cran/corpcor
R
false
false
3,611
rd
\name{pcor.shrink} \alias{pcor.shrink} \alias{pvar.shrink} \title{Shrinkage Estimates of Partial Correlation and Partial Variance} \description{ The functions \code{pcor.shrink} and \code{pvar.shrink} compute shrinkage estimates of partial correlation and partial variance, respectively. } \usage{ pcor.shrink(x, ...
#' @title Duplicate Genotypes #' @description Identify duplicate or very similar genotypes. #' #' @param g a \linkS4class{gtypes} object. #' @param num.shared either number of loci or percentage of loci two #' individuals must share to be considered duplicate individuals. #' @param num.cores number of CPU cores to ...
/R/dupGenotypes.R
no_license
PAMorin/strataG
R
false
false
2,537
r
#' @title Duplicate Genotypes #' @description Identify duplicate or very similar genotypes. #' #' @param g a \linkS4class{gtypes} object. #' @param num.shared either number of loci or percentage of loci two #' individuals must share to be considered duplicate individuals. #' @param num.cores number of CPU cores to ...
#R_Workshop_June2019 # what we did in the workshop in June 2019 # Tomo Eguchi # June 2019 # clean the workspace before do anything rm(list=ls()) # read the cleaned up version of our data file growth_data_1 <- read.csv(file = 'data/Growth data Nov 2008 cleaned.csv', na.strings = "") # remo...
/R_workshop_June2019.R
no_license
mteguchi/R_mini_course_2019
R
false
false
18,549
r
#R_Workshop_June2019 # what we did in the workshop in June 2019 # Tomo Eguchi # June 2019 # clean the workspace before do anything rm(list=ls()) # read the cleaned up version of our data file growth_data_1 <- read.csv(file = 'data/Growth data Nov 2008 cleaned.csv', na.strings = "") # remo...
# -------- # Коссова Е.В., Потанин Б.С. # Микроэконометрика качественных данных # Тема 2. Альтернативные спецификации распределений # в моделях бинарного выбора # -------- # Отключим scientific notation options(scipen = 999) #--------------------------------------------------- # Симуляция данных #...
/2. Тестирование гипотез о спецификации в моделях бинарного выбора.r
no_license
bogdanpotanin/Microeconometrics2
R
false
false
33,761
r
# -------- # Коссова Е.В., Потанин Б.С. # Микроэконометрика качественных данных # Тема 2. Альтернативные спецификации распределений # в моделях бинарного выбора # -------- # Отключим scientific notation options(scipen = 999) #--------------------------------------------------- # Симуляция данных #...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/playmoviespartner_functions.R \docType{package} \name{playmoviespartner_googleAuthR} \alias{playmoviespartner_googleAuthR} \alias{playmoviespartner_googleAuthR-package} \title{Google Play Movies Partner API Gets the delivery status of titles ...
/googleplaymoviespartnerv1.auto/man/playmoviespartner_googleAuthR.Rd
permissive
GVersteeg/autoGoogleAPI
R
false
true
702
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/playmoviespartner_functions.R \docType{package} \name{playmoviespartner_googleAuthR} \alias{playmoviespartner_googleAuthR} \alias{playmoviespartner_googleAuthR-package} \title{Google Play Movies Partner API Gets the delivery status of titles ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mcode.R \name{mcode} \alias{mcode} \title{Multivariate recode} \usage{ mcode(..., recodes, .fill = NA, .result, .factors = c("character", "numeric")) } \arguments{ \item{\dots}{One or more vectors of equal length.} \item{recodes}{A \sQuote...
/man/mcode.Rd
no_license
leeper/mcode
R
false
true
3,345
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/mcode.R \name{mcode} \alias{mcode} \title{Multivariate recode} \usage{ mcode(..., recodes, .fill = NA, .result, .factors = c("character", "numeric")) } \arguments{ \item{\dots}{One or more vectors of equal length.} \item{recodes}{A \sQuote...
## File Name: invariance_alignment_summary_optimization.R ## File Version: 0.07 invariance_alignment_summary_optimization <- function(object, digits) { align.pow <- object$align.pow align.scale <- object$align.scale cat("Optimization Function Value", "=", round(object$fopt[1],digits), "\n" ) cat("Optim...
/R/invariance_alignment_summary_optimization.R
no_license
hyunsooseol/sirt
R
false
false
855
r
## File Name: invariance_alignment_summary_optimization.R ## File Version: 0.07 invariance_alignment_summary_optimization <- function(object, digits) { align.pow <- object$align.pow align.scale <- object$align.scale cat("Optimization Function Value", "=", round(object$fopt[1],digits), "\n" ) cat("Optim...
#'@export get_perm_peaks <- function(file_name, chunk, perms, nchunks, chunksize, margin, smooth_ix_range, peak_pos_range, stat_fun, resid_fun, smooth_func, cores, libs, bandwidth, X, trait, covariates, s0, z0, zmin, ...
/R/get_perm_peaks.R
no_license
jean997/fret
R
false
false
2,744
r
#'@export get_perm_peaks <- function(file_name, chunk, perms, nchunks, chunksize, margin, smooth_ix_range, peak_pos_range, stat_fun, resid_fun, smooth_func, cores, libs, bandwidth, X, trait, covariates, s0, z0, zmin, ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/heat_tree--legend.R \name{inverse} \alias{inverse} \title{Generate the inverse of a function} \usage{ inverse(f, interval) } \arguments{ \item{f}{(\code{function} with one argument) A function to derive and inverse from} \item{interval}{(\co...
/man/inverse.Rd
permissive
seninp/metacoder
R
false
true
598
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/heat_tree--legend.R \name{inverse} \alias{inverse} \title{Generate the inverse of a function} \usage{ inverse(f, interval) } \arguments{ \item{f}{(\code{function} with one argument) A function to derive and inverse from} \item{interval}{(\co...
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function makeCacheMatrix <- function(x = matrix()) { ## set the invers Matrix to null inverse <- NULL set <- function(y) { x <<- y ## copy rhe matix to var x inverse <<- NULL ##...
/cachematrix.R
no_license
GalPeled/ProgrammingAssignment2
R
false
false
1,169
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()) { ## set the invers Matrix to null inverse <- NULL set <- function(y) { x <<- y ## copy rhe matix to var x inverse <<- NULL ##...
##================================================== # Dimensions for viewer ##================================================== niceDimensions <- function(n, nrow = NULL, ncol = NULL){ sqn <- sqrt(n) chooseDims <- c(!is.null(nrow) & !is.null(ncol), !is.null(nrow) & is.null(ncol), ...
/code/multiplot.R
no_license
CedricBezy/stat_sante_git
R
false
false
6,064
r
##================================================== # Dimensions for viewer ##================================================== niceDimensions <- function(n, nrow = NULL, ncol = NULL){ sqn <- sqrt(n) chooseDims <- c(!is.null(nrow) & !is.null(ncol), !is.null(nrow) & is.null(ncol), ...
### 2a AP 2021.1 ### Técnica de Análise de Dados de Transportes ### Prof. Dr. Manoel Mendonça de Castro Neto ### Aluno: Nelson de O. Quesado Filho ### Matrícula: 504117 # Bibliotecas utilizadas library(tidyverse) library(wesanderson) library(lmtest) #1a Questão: # (...) avaliar se o agregado (brita) da 1AP está com r...
/Nelson_Quesado_2AP_21_v5.R
no_license
nelsonquesado/tad-2021.1
R
false
false
18,623
r
### 2a AP 2021.1 ### Técnica de Análise de Dados de Transportes ### Prof. Dr. Manoel Mendonça de Castro Neto ### Aluno: Nelson de O. Quesado Filho ### Matrícula: 504117 # Bibliotecas utilizadas library(tidyverse) library(wesanderson) library(lmtest) #1a Questão: # (...) avaliar se o agregado (brita) da 1AP está com r...
#' createExperimentSample - Create a new experiment sample from a sample lot. #' #' \code{createExperimentSample} Creates a new instance of an entity. #' @param coreApi coreApi object with valid jsessionid #' @param experimentType experiment type to get as character string #' @param experimentBarcode experiment barcod...
/R/createExperimentSample.R
no_license
ceparman/CoreAPIV2_beta
R
false
false
1,950
r
#' createExperimentSample - Create a new experiment sample from a sample lot. #' #' \code{createExperimentSample} Creates a new instance of an entity. #' @param coreApi coreApi object with valid jsessionid #' @param experimentType experiment type to get as character string #' @param experimentBarcode experiment barcod...
# plotting GPP vs. R and color coding by season; JAZ & JK; 2018-03-09 #first part is creating dataframes with data we want to plot. #starts with reading in individual lake files and binding them into one data frame #then merges dataframes together (e.g., metabolism dataframe with loading data frame) #there is code in ...
/R_code/fingerprintplots.r
no_license
Atefeh786/catchment_metab_wg
R
false
false
11,807
r
# plotting GPP vs. R and color coding by season; JAZ & JK; 2018-03-09 #first part is creating dataframes with data we want to plot. #starts with reading in individual lake files and binding them into one data frame #then merges dataframes together (e.g., metabolism dataframe with loading data frame) #there is code in ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tests.R \name{summary.SpdModelTest} \alias{summary.SpdModelTest} \title{Summarise a \code{SpdModelTest} class object} \usage{ summary.SpdModelTest(object, ...) } \arguments{ \item{object}{A \code{SpdModelTest} class object produced using the ...
/man/summary.SpdModelTest.Rd
no_license
f-silva-archaeo/rcarbon
R
false
true
735
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tests.R \name{summary.SpdModelTest} \alias{summary.SpdModelTest} \title{Summarise a \code{SpdModelTest} class object} \usage{ summary.SpdModelTest(object, ...) } \arguments{ \item{object}{A \code{SpdModelTest} class object produced using the ...
## Format date to Type Date epc <- read.table("household_power_consumption.txt", header=TRUE, sep=";", na.strings = "?") epc$Date <- as.Date(t$Date, "%d/%m/%Y") ## Filter data set from Feb. 1, 2007 to Feb. 2, 2007 epct <- subset(t,Date >= as.Date("2007-2-1") & Date <= as.Date("2007-2-2")) ## Remove incom...
/plot2.R
no_license
xela005/ExData_Plotting1
R
false
false
902
r
## Format date to Type Date epc <- read.table("household_power_consumption.txt", header=TRUE, sep=";", na.strings = "?") epc$Date <- as.Date(t$Date, "%d/%m/%Y") ## Filter data set from Feb. 1, 2007 to Feb. 2, 2007 epct <- subset(t,Date >= as.Date("2007-2-1") & Date <= as.Date("2007-2-2")) ## Remove incom...
library(plyr) # Step 1 # Merge the training and test sets to create one data set ############################################################################### x_train <- read.table("./data/UCI HAR Dataset/train/X_train.txt") y_train <- read.table("./data/UCI HAR Dataset/train/y_train.txt") subject_train <- read.ta...
/run_analysis.R
no_license
brettearnest/GetAndCleanDataProject
R
false
false
2,371
r
library(plyr) # Step 1 # Merge the training and test sets to create one data set ############################################################################### x_train <- read.table("./data/UCI HAR Dataset/train/X_train.txt") y_train <- read.table("./data/UCI HAR Dataset/train/y_train.txt") subject_train <- read.ta...
library(dplyr) #check if the dataset exists and if not download and unzip the data: if (!file.exists("UCI HAR Dataset")){ Url <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" download.file(Url, destfile = "./data.zip", method = "curl") #unzip files unzip("data.zip") } ...
/run_analysis.R
no_license
ReettaH/Course-project_Getting-and-Cleaning-data
R
false
false
4,235
r
library(dplyr) #check if the dataset exists and if not download and unzip the data: if (!file.exists("UCI HAR Dataset")){ Url <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" download.file(Url, destfile = "./data.zip", method = "curl") #unzip files unzip("data.zip") } ...
\name{geom_step} \alias{geom_step} \title{Connect observations by stairs.} \usage{ geom_step(mapping = NULL, data = NULL, stat = "identity", position = "identity", direction = "hv", ...) } \arguments{ \item{direction}{direction of stairs: 'vh' for vertical then horizontal, or 'hv' for horizontal then vertical...
/man/geom_step.Rd
no_license
djmurphy420/ggplot2
R
false
false
1,567
rd
\name{geom_step} \alias{geom_step} \title{Connect observations by stairs.} \usage{ geom_step(mapping = NULL, data = NULL, stat = "identity", position = "identity", direction = "hv", ...) } \arguments{ \item{direction}{direction of stairs: 'vh' for vertical then horizontal, or 'hv' for horizontal then vertical...
######### Binomal Power Analysis of AUV Data ####### library(stringr) library(dplyr) library(tidyr) # Clear memory ---- rm(list=ls()) # Set working directory #### #w.dir<-dirname(rstudioapi::getActiveDocumentContext()$path) w.dir <- "~/PA_Binomial" w.dir # Set data directory - to read the data from #setwd(paste(w.d...
/DTV-NPZ-22092020.R
no_license
anitas-giraldo/PA_Binomial
R
false
false
2,982
r
######### Binomal Power Analysis of AUV Data ####### library(stringr) library(dplyr) library(tidyr) # Clear memory ---- rm(list=ls()) # Set working directory #### #w.dir<-dirname(rstudioapi::getActiveDocumentContext()$path) w.dir <- "~/PA_Binomial" w.dir # Set data directory - to read the data from #setwd(paste(w.d...
# Rutina para expandir un archivo con datos almacenados en forma de frecuencias datos <- data.frame(fumador=c(1,1,2,2,1,1,2,2), enfcard=c(rep(c(1,0),4)), sexo=c(rep(1,4), rep(2,4)), frecuencia=c(150,900,75,950,100,850,50,925)) head(datos) datos.expanded <- dat...
/expandirdataframe.R
no_license
jrlacalle/material_docente
R
false
false
555
r
# Rutina para expandir un archivo con datos almacenados en forma de frecuencias datos <- data.frame(fumador=c(1,1,2,2,1,1,2,2), enfcard=c(rep(c(1,0),4)), sexo=c(rep(1,4), rep(2,4)), frecuencia=c(150,900,75,950,100,850,50,925)) head(datos) datos.expanded <- dat...
library(magrittr) # para usar el operador %in% library(stringr) # para usar str_sub ### Primero le quitamos a los datos la info privada datos <- read.csv("VoluntariosEstados19s.csv") ### Vamos a inventar una funcion que nos deje la lada pero que quite el telefono sacalada <- function(telnumer){ result <- str_sub...
/R/R para emergencias/PruebaT01.r
no_license
kzapfe/AprendiendoComputoLibre
R
false
false
3,471
r
library(magrittr) # para usar el operador %in% library(stringr) # para usar str_sub ### Primero le quitamos a los datos la info privada datos <- read.csv("VoluntariosEstados19s.csv") ### Vamos a inventar una funcion que nos deje la lada pero que quite el telefono sacalada <- function(telnumer){ result <- str_sub...
# Applied Linear Regression, Third edition # Chapter 12 Logistic Regression # October 14, 2004; revised January 2011 for alr3 Version 2.0, R only require(alr3) ################################################################ # Balsam fir blowdown # blowBF # page 255 m1 <- glm(y ~ logb(D, 2), family=binom...
/ALR3_Book/Chapter12_Logistic Regression.R
no_license
PyRPy/ML_Py_Templates
R
false
false
5,381
r
# Applied Linear Regression, Third edition # Chapter 12 Logistic Regression # October 14, 2004; revised January 2011 for alr3 Version 2.0, R only require(alr3) ################################################################ # Balsam fir blowdown # blowBF # page 255 m1 <- glm(y ~ logb(D, 2), family=binom...
power <- read.table("household_power_consumption.txt", sep=";", header = TRUE, fill = FALSE, strip.white=TRUE, stringsAsFactors=FALSE) power$DateTime <- strptime( paste( power$Date, power$Time ), format="%d/%m/%Y %H:%M:%S" ) power$Date <- as.Date( power$Date, format="%d/%m/%Y" ) power <- subset( power, power$Date >= ...
/plot3.R
no_license
xaibeing/ExData_Plotting1
R
false
false
1,166
r
power <- read.table("household_power_consumption.txt", sep=";", header = TRUE, fill = FALSE, strip.white=TRUE, stringsAsFactors=FALSE) power$DateTime <- strptime( paste( power$Date, power$Time ), format="%d/%m/%Y %H:%M:%S" ) power$Date <- as.Date( power$Date, format="%d/%m/%Y" ) power <- subset( power, power$Date >= ...
cutltraj <- function(ltraj, criterion, value.NA = FALSE, nextr = TRUE, ...) { if (!inherits(ltraj, "ltraj")) stop("ltraj should be of class \"ltraj\"") infol <- infolocs(ltraj) res <- list() k <- 1 for (i in 1:length(ltraj)) { if (!is.null(infol)) { ...
/adehabitatLT/R/cutltraj.r
no_license
ingted/R-Examples
R
false
false
2,455
r
cutltraj <- function(ltraj, criterion, value.NA = FALSE, nextr = TRUE, ...) { if (!inherits(ltraj, "ltraj")) stop("ltraj should be of class \"ltraj\"") infol <- infolocs(ltraj) res <- list() k <- 1 for (i in 1:length(ltraj)) { if (!is.null(infol)) { ...
# set the file address: #setwd("/Users/obadiah/dialoguesystems") mydata <- read.csv("a.csv", header=TRUE, sep=",") # putting the number of words per utterance into a list for Speaker1 and Speaker2 Speaker1Counts <- subset(mydata, Speaker==1)$Counts Speaker2Counts <- subset(mydata, Speaker==2)$Counts # Median valu...
/hw2_R.R
no_license
mitchellirvin/dialoguesystems
R
false
false
1,817
r
# set the file address: #setwd("/Users/obadiah/dialoguesystems") mydata <- read.csv("a.csv", header=TRUE, sep=",") # putting the number of words per utterance into a list for Speaker1 and Speaker2 Speaker1Counts <- subset(mydata, Speaker==1)$Counts Speaker2Counts <- subset(mydata, Speaker==2)$Counts # Median valu...
#' DHS data is delivered in .zip files and the names of these zip files #' usually (but not always) encode the survey code (country, round, and #' release). These scheme means that at the listing stage the contents #' can not be easily renamed althought _we_ assume case-ignorant naming #' and later convert all names ...
/R/index.R
no_license
sakrejda/pdhs
R
false
false
4,093
r
#' DHS data is delivered in .zip files and the names of these zip files #' usually (but not always) encode the survey code (country, round, and #' release). These scheme means that at the listing stage the contents #' can not be easily renamed althought _we_ assume case-ignorant naming #' and later convert all names ...
#LIBRERIAS library(psych) library(tidyverse) library(ggplot2) library(ggpubr) library(nortest) library(plotly) library(htmlwidgets) library(Hmisc) library(ggcorrplot) library(stargazer) #DATA da <- DATA names(da) IB <- select(da, IB1:IB14) IB #DESCRIPTIVOS desc <- as.data.frame(psych::descr...
/plots.R
permissive
AngelGarciaODiana/R
R
false
false
2,590
r
#LIBRERIAS library(psych) library(tidyverse) library(ggplot2) library(ggpubr) library(nortest) library(plotly) library(htmlwidgets) library(Hmisc) library(ggcorrplot) library(stargazer) #DATA da <- DATA names(da) IB <- select(da, IB1:IB14) IB #DESCRIPTIVOS desc <- as.data.frame(psych::descr...
library(highcharter) suppressPackageStartupMessages(library(dplyr)) suppressPackageStartupMessages(library(purrr)) n <- 10 hc <- highchart() %>% hc_add_series(data = rnorm(n), name = "s1", id = "g1") %>% hc_add_series(data = rnorm(n), name = "s2", id = "g2") hc series <- data_frame( name = pa...
/devscripts/highcharter-issues-121.R
no_license
APKBridget/highcharter
R
false
false
511
r
library(highcharter) suppressPackageStartupMessages(library(dplyr)) suppressPackageStartupMessages(library(purrr)) n <- 10 hc <- highchart() %>% hc_add_series(data = rnorm(n), name = "s1", id = "g1") %>% hc_add_series(data = rnorm(n), name = "s2", id = "g2") hc series <- data_frame( name = pa...
testlist <- list(end = NULL, start = NULL, x = structure(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), .Dim = c(9L, 3L)), segment_end = structure(0, .Dim = c(1L, 1L)), segment_start = structure(0, .Dim = c(1L, 1L))) result <- do.call(dynutils::project_to_segments,testlist) str(r...
/dynutils/inst/testfiles/project_to_segments/AFL_project_to_segments/project_to_segments_valgrind_files/1609871889-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
326
r
testlist <- list(end = NULL, start = NULL, x = structure(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), .Dim = c(9L, 3L)), segment_end = structure(0, .Dim = c(1L, 1L)), segment_start = structure(0, .Dim = c(1L, 1L))) result <- do.call(dynutils::project_to_segments,testlist) str(r...
library(rhandsontable) shinyServer(function(input, output, session) { fname = tempfile() observe({ # remove button and isolate to update file automatically # after each table change input$saveBtn hot = isolate(input$hot) if (!is.null(hot)) { write.csv(hot, fname) print(fname) }...
/inst/examples/rhandsontable_datafile/server.R
permissive
P01010000/rhandsontable
R
false
false
600
r
library(rhandsontable) shinyServer(function(input, output, session) { fname = tempfile() observe({ # remove button and isolate to update file automatically # after each table change input$saveBtn hot = isolate(input$hot) if (!is.null(hot)) { write.csv(hot, fname) print(fname) }...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/inference_optimhelp.R \name{evaluate_logpostpdf} \alias{evaluate_logpostpdf} \title{Evaluate posterior density function} \usage{ evaluate_logpostpdf(map, zprior, U, obs, zref) } \arguments{ \item{map}{Mapping object. Usually a compound map, s...
/man/evaluate_logpostpdf.Rd
permissive
gschnabel/nucdataBaynet
R
false
true
1,266
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/inference_optimhelp.R \name{evaluate_logpostpdf} \alias{evaluate_logpostpdf} \title{Evaluate posterior density function} \usage{ evaluate_logpostpdf(map, zprior, U, obs, zref) } \arguments{ \item{map}{Mapping object. Usually a compound map, s...
library(tidyverse) library(dasper) library(foreach) library(doParallel) # Load data --------------------------------------------------------------- load("/home/dzhang/projects/RNA_seq_diag_mito/results/tidy_samp_metadata/mito_samp_metadata_tidy.rda") ref <- dasper:::.ref_load(ref = "/data/references/ensembl/gtf_gff3...
/scripts/aberrant_expression/1_get_gene_count_RSE.R
no_license
dzhang32/ATG7_RNAseq
R
false
false
4,571
r
library(tidyverse) library(dasper) library(foreach) library(doParallel) # Load data --------------------------------------------------------------- load("/home/dzhang/projects/RNA_seq_diag_mito/results/tidy_samp_metadata/mito_samp_metadata_tidy.rda") ref <- dasper:::.ref_load(ref = "/data/references/ensembl/gtf_gff3...
# The cleaned script can be found in Datasets/clean/prescriber-info-categorical-cleaned.csv # This script is designated to provide a CSV which we can use for modeling # The data cleaning done: # Remove all categorical variables, ie State, Gender, etc. # Remove all opiates. # Select the top 10 most frequently prescrib...
/Datasets/cleaning scripts/cleanPrescribersCategorical.R
no_license
lilwizeguy/COEN-281-Final-Project
R
false
false
2,282
r
# The cleaned script can be found in Datasets/clean/prescriber-info-categorical-cleaned.csv # This script is designated to provide a CSV which we can use for modeling # The data cleaning done: # Remove all categorical variables, ie State, Gender, etc. # Remove all opiates. # Select the top 10 most frequently prescrib...
\name{calcBgGD} \alias{calcBgGD} %- Also NEED an "\alias" for EACH other topic documented here. \title{ Calculate Biogas Production from Gas Density Data (GD-BMP) } \description{ \code{calcBgGD} (for \emph{calc}ulate \emph{b}io\emph{g}as from \emph{GD} (gas density) measurements) calculates cumulative biogas, metha...
/man/calcBgGD.Rd
no_license
sashahafner/biogas
R
false
false
9,821
rd
\name{calcBgGD} \alias{calcBgGD} %- Also NEED an "\alias" for EACH other topic documented here. \title{ Calculate Biogas Production from Gas Density Data (GD-BMP) } \description{ \code{calcBgGD} (for \emph{calc}ulate \emph{b}io\emph{g}as from \emph{GD} (gas density) measurements) calculates cumulative biogas, metha...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cfbd_games.R \name{cfbd_game_info} \alias{cfbd_game_info} \title{\strong{Get results information from games.}} \usage{ cfbd_game_info( year, week = NULL, season_type = "regular", team = NULL, home_team = NULL, away_team = NULL, ...
/man/cfbd_game_info.Rd
permissive
Engy-22/cfbfastR
R
false
true
3,743
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cfbd_games.R \name{cfbd_game_info} \alias{cfbd_game_info} \title{\strong{Get results information from games.}} \usage{ cfbd_game_info( year, week = NULL, season_type = "regular", team = NULL, home_team = NULL, away_team = NULL, ...
#Figures going into Thesis #Top-down experiment, Bottom-up experiment, and regional results #load libraries library(RgoogleMaps) library(maps) #source documents where data files are contained source("archived_scripts/Tara_thesis/ExclosureAnalysis_Summer2016.R") #Triangle exclosures (top-down) source("archived_script...
/archived_scripts/Tara_thesis/thesisfigures_tm.R
no_license
hurlbertlab/caterpillars-count-analysis
R
false
false
9,205
r
#Figures going into Thesis #Top-down experiment, Bottom-up experiment, and regional results #load libraries library(RgoogleMaps) library(maps) #source documents where data files are contained source("archived_scripts/Tara_thesis/ExclosureAnalysis_Summer2016.R") #Triangle exclosures (top-down) source("archived_script...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/apprunner_operations.R \name{apprunner_describe_custom_domains} \alias{apprunner_describe_custom_domains} \title{Return a description of custom domain names that are associated with an App Runner service} \usage{ apprunner_describe_custom_dom...
/cran/paws.compute/man/apprunner_describe_custom_domains.Rd
permissive
paws-r/paws
R
false
true
1,338
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/apprunner_operations.R \name{apprunner_describe_custom_domains} \alias{apprunner_describe_custom_domains} \title{Return a description of custom domain names that are associated with an App Runner service} \usage{ apprunner_describe_custom_dom...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions.R \name{read_from_fukan} \alias{read_from_fukan} \title{Read files generated in Fukan System.} \usage{ read_from_fukan(path_to_file) } \arguments{ \item{path_to_file}{The full path of the file you want to open} } \description{ This ...
/man/read_from_fukan.Rd
no_license
cristianmejia00/Opener5
R
false
true
503
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions.R \name{read_from_fukan} \alias{read_from_fukan} \title{Read files generated in Fukan System.} \usage{ read_from_fukan(path_to_file) } \arguments{ \item{path_to_file}{The full path of the file you want to open} } \description{ This ...
source("./packages.R") lapply(list.files(here::here("./R"), full.names = TRUE), source) library(knitrProgressBar) all_mzml_files <- dir("/mlab/data/archives/FTMS_raw/CESB/mzml_data", recursive = TRUE, full.names = TRUE, pattern = "mzML$") names(all_mzml_files) = gsub(".mzML$", "", basename(all_mzml_files)) all_zip_fil...
/lungcancer_all/msnbase_peakset.R
no_license
MoseleyBioinformaticsLab/manuscript.peakCharacterization
R
false
false
931
r
source("./packages.R") lapply(list.files(here::here("./R"), full.names = TRUE), source) library(knitrProgressBar) all_mzml_files <- dir("/mlab/data/archives/FTMS_raw/CESB/mzml_data", recursive = TRUE, full.names = TRUE, pattern = "mzML$") names(all_mzml_files) = gsub(".mzML$", "", basename(all_mzml_files)) all_zip_fil...
#' @title Create a classification, regression, survival, cluster, cost-sensitive classification or #' multilabel task. #' #' @description #' The task encapsulates the data and specifies - through its subclasses - #' the type of the task. #' It also contains a description object detailing further aspects of the data. #'...
/R/Task.R
no_license
pherephobia/mlr
R
false
false
7,728
r
#' @title Create a classification, regression, survival, cluster, cost-sensitive classification or #' multilabel task. #' #' @description #' The task encapsulates the data and specifies - through its subclasses - #' the type of the task. #' It also contains a description object detailing further aspects of the data. #'...
library(e1071) make_svm_plot_2d <- function(data, C){ svmfit <- svm(y ~., data=data, scale=FALSE, type='C-classification', shrinking=FALSE, kernel='linear', cost=C) # get svm direction svm_...
/notes/more_classification/svm_fun.R
no_license
francestong/stor390
R
false
false
3,082
r
library(e1071) make_svm_plot_2d <- function(data, C){ svmfit <- svm(y ~., data=data, scale=FALSE, type='C-classification', shrinking=FALSE, kernel='linear', cost=C) # get svm direction svm_...
library(fDMA) ### Name: print.altf2 ### Title: Prints 'altf2' Object. ### Aliases: print.altf2 ### ** Examples ## Not run: ##D wti <- crudeoil[-1,1] ##D drivers <- (lag(crudeoil[,-1],k=1))[-1,] ##D a <- altf2(y=wti,x=drivers) ##D ##D print(a) ## End(Not run)
/data/genthat_extracted_code/fDMA/examples/print.altf2.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
268
r
library(fDMA) ### Name: print.altf2 ### Title: Prints 'altf2' Object. ### Aliases: print.altf2 ### ** Examples ## Not run: ##D wti <- crudeoil[-1,1] ##D drivers <- (lag(crudeoil[,-1],k=1))[-1,] ##D a <- altf2(y=wti,x=drivers) ##D ##D print(a) ## End(Not run)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pickerOptions.R \name{pickerOptions} \alias{pickerOptions} \title{Options for `pickerInput`} \usage{ pickerOptions(actionsBox = NULL, container = NULL, countSelectedText = NULL, deselectAllText = NULL, dropdownAlignRight = NULL, dropupAut...
/man/pickerOptions.Rd
permissive
jcheng5/shinyWidgets
R
false
true
8,626
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pickerOptions.R \name{pickerOptions} \alias{pickerOptions} \title{Options for `pickerInput`} \usage{ pickerOptions(actionsBox = NULL, container = NULL, countSelectedText = NULL, deselectAllText = NULL, dropdownAlignRight = NULL, dropupAut...
# Load libraries ---------------------------------------------------------- library("RSQLite") library("lubridate") library("plyr") library("dplyr") library("ggplot2") # Data exploration -------------------------------------------------------- # Connect to db con <- dbConnect(drv="SQLite", "scrape/parkingTickets.db...
/explore/explore.R
no_license
jonnybaik/vancouver_parking_tickets
R
false
false
1,549
r
# Load libraries ---------------------------------------------------------- library("RSQLite") library("lubridate") library("plyr") library("dplyr") library("ggplot2") # Data exploration -------------------------------------------------------- # Connect to db con <- dbConnect(drv="SQLite", "scrape/parkingTickets.db...
.put.veg.module <- function(getveg.id, bety, input_veg, pfts, outfolder, dir, machine, model, start_date, end_date, new_site, host, overwrite){ ...
/modules/data.land/R/put.veg.module.R
permissive
serbinsh/pecan
R
false
false
2,384
r
.put.veg.module <- function(getveg.id, bety, input_veg, pfts, outfolder, dir, machine, model, start_date, end_date, new_site, host, overwrite){ ...
#' Performs linear regression. #' #' This is truly a great and much-needed function #' #' @param Y vector of outcomes. #' @param covData list of subjects (data corresponding to covariates) #' @return Coefficients \code{coeff} and p-values \code{pval}. #' @export #' @examples #' myLinearRegression(y,covData) myLinearR...
/R/myLinearRegression.R
no_license
himanshu11305/LR
R
false
false
747
r
#' Performs linear regression. #' #' This is truly a great and much-needed function #' #' @param Y vector of outcomes. #' @param covData list of subjects (data corresponding to covariates) #' @return Coefficients \code{coeff} and p-values \code{pval}. #' @export #' @examples #' myLinearRegression(y,covData) myLinearR...
rc<-ranicafe$Coffees weight<-(1/length(rc)) sum(rc*weight) mean(rc) rc<-c(rc, NA) tail(rc, n=5) mean(rc) mean(rc, na.rm=TRUE)
/Chapter02/source/2_5.R
no_license
qlrepdlxj/R
R
false
false
126
r
rc<-ranicafe$Coffees weight<-(1/length(rc)) sum(rc*weight) mean(rc) rc<-c(rc, NA) tail(rc, n=5) mean(rc) mean(rc, na.rm=TRUE)
library(data.tree) mydata = read.table("mushrooms.csv", header=TRUE, sep=",") calEntropy = function(dataset){ posits = sum(dataset[,"class"] == "e") negs = sum(dataset[,"class"] == "p") t = posits + negs if (posits == 0){ entropy = (-(negs/t)*log2(negs/t)) } else if (negs == 0){ entropy = (-(posits...
/ProjectDT.R
no_license
manism63/DecisionTree
R
false
false
6,458
r
library(data.tree) mydata = read.table("mushrooms.csv", header=TRUE, sep=",") calEntropy = function(dataset){ posits = sum(dataset[,"class"] == "e") negs = sum(dataset[,"class"] == "p") t = posits + negs if (posits == 0){ entropy = (-(negs/t)*log2(negs/t)) } else if (negs == 0){ entropy = (-(posits...
#logging log <- file(snakemake@log[[1]], open="wt") sink(log, append=TRUE) sink(log, append=TRUE, type="message") # Restore output to console #sink() #sink(type="message") #backup R-based installation if conda didn't work or wasn't used #we check if packages are installed first #fix for: libicui18n.so.68: cannot op...
/workflow/scripts/expansion.R
permissive
tgstoecker/A2TEA.Workflow
R
false
false
30,567
r
#logging log <- file(snakemake@log[[1]], open="wt") sink(log, append=TRUE) sink(log, append=TRUE, type="message") # Restore output to console #sink() #sink(type="message") #backup R-based installation if conda didn't work or wasn't used #we check if packages are installed first #fix for: libicui18n.so.68: cannot op...
Sparse.Feature <- function(test_seq){ if(class(test_seq)!="DNAStringSet"){stop("The dataset must be of class DNAStringSet")} if(length(unique(width(test_seq)))>1){stop("Each sequence must of equal length")} zz <- as.character(as.character(test_seq)) #########################################################sparse...
/R/Sparse.Feature.R
no_license
cran/EncDNA
R
false
false
846
r
Sparse.Feature <- function(test_seq){ if(class(test_seq)!="DNAStringSet"){stop("The dataset must be of class DNAStringSet")} if(length(unique(width(test_seq)))>1){stop("Each sequence must of equal length")} zz <- as.character(as.character(test_seq)) #########################################################sparse...
now <- Sys.Date() mode(now) class(now) "as.Date" as.Date("2010-12-31") as.Date("12/31/2010", format="%m/%d/%Y") "to str" format(Sys.Date()) as.character(Sys.Date()) format(Sys.Date(), format="%m/%d/%Y") "help strftime" # help(strftime) # %b Abbreviated month name (“Jan”) # %B Full month name (“January”) # %d Day as ...
/R/R_cookbook/strings_dates/date_example.R
no_license
RobLeggett/codes
R
false
false
920
r
now <- Sys.Date() mode(now) class(now) "as.Date" as.Date("2010-12-31") as.Date("12/31/2010", format="%m/%d/%Y") "to str" format(Sys.Date()) as.character(Sys.Date()) format(Sys.Date(), format="%m/%d/%Y") "help strftime" # help(strftime) # %b Abbreviated month name (“Jan”) # %B Full month name (“January”) # %d Day as ...
library("matrixStats") library("stats") asWhich <- function(probs, max) { idx <- as.integer(round(probs * max)) if (idx < 1L) { idx <- 1L } else if (idx > max) { idx <- max } idx } # asWhich() rowOrderStats_R <- function(x, probs, ..., useNames = NA) { ans <- apply(x, MARGIN = 1L, FUN = quantile, ...
/tests/rowOrderStats.R
no_license
HenrikBengtsson/matrixStats
R
false
false
2,336
r
library("matrixStats") library("stats") asWhich <- function(probs, max) { idx <- as.integer(round(probs * max)) if (idx < 1L) { idx <- 1L } else if (idx > max) { idx <- max } idx } # asWhich() rowOrderStats_R <- function(x, probs, ..., useNames = NA) { ans <- apply(x, MARGIN = 1L, FUN = quantile, ...
install.packages("tm") #텍스트 마이닝을 위한 패키지 install.packages("slam") #install.packages("dplyr") #install.packages("readr") #파일을 읽어오기 위한 패키지 library(tm) library(slam) library(dplyr) library(NLP4kec) library(readr) # 1. 원문 데이터 및 사전 불러오기 ---------------------------------------------------------------------------------------...
/HDC_textmining_project/script/day1/1.2_text_handling.R
no_license
NamyounKim/RWork
R
false
false
4,936
r
install.packages("tm") #텍스트 마이닝을 위한 패키지 install.packages("slam") #install.packages("dplyr") #install.packages("readr") #파일을 읽어오기 위한 패키지 library(tm) library(slam) library(dplyr) library(NLP4kec) library(readr) # 1. 원문 데이터 및 사전 불러오기 ---------------------------------------------------------------------------------------...
getItemizeDocs = function(functionName, section, keyword = "arguments", first = FALSE, maxSize = 12) { wd = getwd() fileName = paste0(wd, "/man/", functionName, ".Rd") arguments = readItems(fileName, keyword) htmlFile = paste0("html/section-", section, "/", functionName, "-", keyword, ".html") argumentsToHtm...
/R/readArguments.R
no_license
resplab/epicManual
R
false
false
6,137
r
getItemizeDocs = function(functionName, section, keyword = "arguments", first = FALSE, maxSize = 12) { wd = getwd() fileName = paste0(wd, "/man/", functionName, ".Rd") arguments = readItems(fileName, keyword) htmlFile = paste0("html/section-", section, "/", functionName, "-", keyword, ".html") argumentsToHtm...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/getBirds.R \name{getBirds} \alias{getBirds} \title{getBirds} \usage{ getBirds(object, points = NA, AOU = NA, years = NA, min.count = NA, max.count = NA, band = NA, interval = NA, visits = NA, times = NA, reps = NA, output = "dataframe") }...
/man/getBirds.Rd
no_license
joshuaeveleth/NCRNbirds
R
false
true
2,672
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/getBirds.R \name{getBirds} \alias{getBirds} \title{getBirds} \usage{ getBirds(object, points = NA, AOU = NA, years = NA, min.count = NA, max.count = NA, band = NA, interval = NA, visits = NA, times = NA, reps = NA, output = "dataframe") }...
mydata<-read.table("household_power_consumption.txt", sep=";", header=TRUE) mydata<- mydata[mydata[, "Date"] %in% c("1/2/2007", "2/2/2007"), ] dateTime<-strptime(paste(mydata$Date, mydata$Time), "%d/%m/%Y %H:%M") a1<-as.numeric(as.character(mydata$Sub_metering_1)) a2<-as.numeric(as.character(mydata$Sub_metering_2)) a3<...
/plot3.R
no_license
anutikin/ExData_Plotting1
R
false
false
706
r
mydata<-read.table("household_power_consumption.txt", sep=";", header=TRUE) mydata<- mydata[mydata[, "Date"] %in% c("1/2/2007", "2/2/2007"), ] dateTime<-strptime(paste(mydata$Date, mydata$Time), "%d/%m/%Y %H:%M") a1<-as.numeric(as.character(mydata$Sub_metering_1)) a2<-as.numeric(as.character(mydata$Sub_metering_2)) a3<...
.onLoad <- function(libname, pkgname) { # Runs when loaded but not attached to search() path; e.g., when a package just Imports (not Depends on) data.table "Please read FAQ 2.23 (vignette('datatable-faq')) which explains in detail why data.table adds one for loop to the start of base::cbind.data.frame and ...
/R/onLoad.R
no_license
halcyonhui/data.table
R
false
false
6,310
r
.onLoad <- function(libname, pkgname) { # Runs when loaded but not attached to search() path; e.g., when a package just Imports (not Depends on) data.table "Please read FAQ 2.23 (vignette('datatable-faq')) which explains in detail why data.table adds one for loop to the start of base::cbind.data.frame and ...
calcBetaStatus <- function(comm, status, dis.method, nulls, sub= "pol", occ= FALSE, years, zscore=FALSE){ ## calculate zscores? ## computes dispers...
/analysis/variability/src/beta.R
no_license
lponisio/hedgerow_assembly
R
false
false
1,762
r
calcBetaStatus <- function(comm, status, dis.method, nulls, sub= "pol", occ= FALSE, years, zscore=FALSE){ ## calculate zscores? ## computes dispers...
\name{CD4sim} \alias{CD4sim} \docType{data} \title{Simulated HIV data %% ~~ data name/kind ... ~~ } \description{ %% ~~ A concise (1-5 lines) description of the dataset. ~~ A simulated dataset of HIV patients undergoing treatment. At each timepoint treatment is initiated with increasing probability as CD4 values for...
/man/CD4sim.Rd
no_license
cran/FLIM
R
false
false
1,086
rd
\name{CD4sim} \alias{CD4sim} \docType{data} \title{Simulated HIV data %% ~~ data name/kind ... ~~ } \description{ %% ~~ A concise (1-5 lines) description of the dataset. ~~ A simulated dataset of HIV patients undergoing treatment. At each timepoint treatment is initiated with increasing probability as CD4 values for...
library(rstan) rstan_options(auto_write = TRUE) options(mc.cores = parallel::detectCores()) chain <- function(K) stan("code.stan", iter = 1000, chains = 1, data = list(K)) zvalues <- function(ch) { s = summary(ch)$summary z = s[, "mean"] / (s[, "sd"] / sqrt(s[, "n_eff"])) z[names(z) != "lp__"] } ch0 = chai...
/post/mcmc-z/code.r
no_license
tpapp/tpapp.github.io
R
false
false
433
r
library(rstan) rstan_options(auto_write = TRUE) options(mc.cores = parallel::detectCores()) chain <- function(K) stan("code.stan", iter = 1000, chains = 1, data = list(K)) zvalues <- function(ch) { s = summary(ch)$summary z = s[, "mean"] / (s[, "sd"] / sqrt(s[, "n_eff"])) z[names(z) != "lp__"] } ch0 = chai...
require(rvest) require(dplyr) require(ggplot2) dog_breeds <- read_html("https://www.olx.ua/zhivotnye/sobaki/q-%D1%81%D0%BE%D0%B1%D0%B0%D0%BA%D0%B0/") %>% html_node(".toplinks.x-normal") %>% html_nodes(".topLink.tdnone.parameter") %>% purrr::map_chr(html_attr, "href") %>% stringr::str_split(pattern = "/") %>...
/comunalka_dogs.R
no_license
RomanKyrychenko/library
R
false
false
9,337
r
require(rvest) require(dplyr) require(ggplot2) dog_breeds <- read_html("https://www.olx.ua/zhivotnye/sobaki/q-%D1%81%D0%BE%D0%B1%D0%B0%D0%BA%D0%B0/") %>% html_node(".toplinks.x-normal") %>% html_nodes(".topLink.tdnone.parameter") %>% purrr::map_chr(html_attr, "href") %>% stringr::str_split(pattern = "/") %>...
# Load packages into memory library(dplyr) library(ggplot2) library(statsr) data(arbuthnot) arbuthnot dim(arbuthnot) names(arbuthnot) arbuthnot$boys arbuthnot$girls[1] ggplot(data = arbuthnot, aes(x = year, y = girls)) + geom_point() ?ggplot 5218+4683 arbuthnot$boys + arbuthnot$girls...
/Week1/week1.R
no_license
bwbelljr/Intro-Prob-Data
R
false
false
1,578
r
# Load packages into memory library(dplyr) library(ggplot2) library(statsr) data(arbuthnot) arbuthnot dim(arbuthnot) names(arbuthnot) arbuthnot$boys arbuthnot$girls[1] ggplot(data = arbuthnot, aes(x = year, y = girls)) + geom_point() ?ggplot 5218+4683 arbuthnot$boys + arbuthnot$girls...
context("test-detect") data("awtew") test_that("hs_str_detect is the presence of a pattern", { expect_equal(hs_str_detect(c("a","b"),"a"), c(T,F)) expect_equal(sum(hs_str_detect(awtew, "[L|l]ord")), 240) }) test_that("hs_str_detect of factors works", { expect_equal(hs_str_detect(factor(c("a","b")),"a"), c(T,F))...
/tests/testthat/test-detect.R
no_license
gmcrosh/hypeRscan
R
false
false
471
r
context("test-detect") data("awtew") test_that("hs_str_detect is the presence of a pattern", { expect_equal(hs_str_detect(c("a","b"),"a"), c(T,F)) expect_equal(sum(hs_str_detect(awtew, "[L|l]ord")), 240) }) test_that("hs_str_detect of factors works", { expect_equal(hs_str_detect(factor(c("a","b")),"a"), c(T,F))...
# Davies et al. R code defining PWR plot helper functions. # # By Jim Regetz (NCEAS) # simple helper function for rescaling values rescale <- function(x, lower=NULL, upper=NULL, na.rm=TRUE) { if (is.null(lower)) { lower <- min(x, na.rm=na.rm) } if (is.null(upper)) { upper <- max(x, na.rm=na...
/pwr-plots.R
no_license
lizzieinvancouver/pwr
R
false
false
7,439
r
# Davies et al. R code defining PWR plot helper functions. # # By Jim Regetz (NCEAS) # simple helper function for rescaling values rescale <- function(x, lower=NULL, upper=NULL, na.rm=TRUE) { if (is.null(lower)) { lower <- min(x, na.rm=na.rm) } if (is.null(upper)) { upper <- max(x, na.rm=na...
batting<-read.csv('Batting.csv') print(head(batting)) str(batting) print(head(batting$AB)) print(head(batting$X2B)) #Creating a new column BA for calculating the batting average batting$BA <- batting$H/batting$AB print(tail(batting$BA,5)) batting$OBP <- (batting$H+batting$BB+batting$HBP)/(batting$AB+batting$BB+batt...
/Money_Ball_Project.R
no_license
aswin19031997/PractiseProjects
R
false
false
2,014
r
batting<-read.csv('Batting.csv') print(head(batting)) str(batting) print(head(batting$AB)) print(head(batting$X2B)) #Creating a new column BA for calculating the batting average batting$BA <- batting$H/batting$AB print(tail(batting$BA,5)) batting$OBP <- (batting$H+batting$BB+batting$HBP)/(batting$AB+batting$BB+batt...
#' Invoke a Data Viewer #' #' Invoke a spreadsheet-style data viewer on a matrix-like \code{R} object. #' #' @param x an \code{R} object that can be forecd to a character representation #'of a data frame. #' @param title the title for the viewer window. Defaults to the name of \code{x}. #' @return Invisibly returns \...
/R/View.r
permissive
Zhenglei-BCS/smwrQW
R
false
false
826
r
#' Invoke a Data Viewer #' #' Invoke a spreadsheet-style data viewer on a matrix-like \code{R} object. #' #' @param x an \code{R} object that can be forecd to a character representation #'of a data frame. #' @param title the title for the viewer window. Defaults to the name of \code{x}. #' @return Invisibly returns \...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data_documentation.R \docType{data} \name{math} \alias{math} \title{Math Achievement Dataset} \format{A data frame with xx rows and 6 variables: \describe{ \item{School}{Which school the subject attends} \item{Minority}{description} \it...
/man/math.Rd
no_license
jcberny/flexplot
R
false
true
603
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data_documentation.R \docType{data} \name{math} \alias{math} \title{Math Achievement Dataset} \format{A data frame with xx rows and 6 variables: \describe{ \item{School}{Which school the subject attends} \item{Minority}{description} \it...
makeCacheMatrix <- function(x = matrix()) { # Change numeric to matrix m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setInverse <- function(solve) m <<- solve # Change mean to solve getInverse <- function() m list(set = set, get = get, set...
/Test_makeCacheMatrix.R
no_license
Banelin/ProgrammingAssignment2
R
false
false
440
r
makeCacheMatrix <- function(x = matrix()) { # Change numeric to matrix m <- NULL set <- function(y) { x <<- y m <<- NULL } get <- function() x setInverse <- function(solve) m <<- solve # Change mean to solve getInverse <- function() m list(set = set, get = get, set...
#' Hover Plot #' #' @param database the database containing musical data you want to analyze. We suggest the billboard::spotify_track_data #' @param year_col a column of your df containing the years #' @param filtered_year a string, the year you want to look at #' @param x_axis a column of your df, the first dimension ...
/working_files/removed_functions_frompkg/plots.R
no_license
meakulpa/rubasic
R
false
false
3,860
r
#' Hover Plot #' #' @param database the database containing musical data you want to analyze. We suggest the billboard::spotify_track_data #' @param year_col a column of your df containing the years #' @param filtered_year a string, the year you want to look at #' @param x_axis a column of your df, the first dimension ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/charToRaw.R \name{charToRaw} \alias{charToRaw} \title{fun_name} \usage{ charToRaw(params) } \arguments{ \item{param}{fun_name} } \description{ kolejna funkcja podmieniona }
/man/charToRaw.Rd
no_license
granatb/RapeR
R
false
true
251
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/charToRaw.R \name{charToRaw} \alias{charToRaw} \title{fun_name} \usage{ charToRaw(params) } \arguments{ \item{param}{fun_name} } \description{ kolejna funkcja podmieniona }
# data will be generated from tau1=tau^2, tau2=tau^2/2, and tau3=tau^2/4 library(parallel) simRep <- 5000 # Replication times in one simulation pvalue.true <- .05 # Testing type I error b.var <- c(0) # The set of varaince of random covariates b as random slope smooth <- 1 # measurement error is added to M if smooth = ...
/full simulation/summer/size/seed1/seed1_new/test_highorder/test_usingpaper_s_2020.R
no_license
wma9/FMRI-project
R
false
false
10,539
r
# data will be generated from tau1=tau^2, tau2=tau^2/2, and tau3=tau^2/4 library(parallel) simRep <- 5000 # Replication times in one simulation pvalue.true <- .05 # Testing type I error b.var <- c(0) # The set of varaince of random covariates b as random slope smooth <- 1 # measurement error is added to M if smooth = ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/measures_multiclass.R \name{WKAPPA} \alias{WKAPPA} \title{Mean quadratic weighted kappa} \usage{ WKAPPA(truth, response) } \arguments{ \item{truth}{vector of true values} \item{response}{vector of predicted values} } \description{ Defined as...
/man/WKAPPA.Rd
no_license
pdwaggoner/measures
R
false
true
473
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/measures_multiclass.R \name{WKAPPA} \alias{WKAPPA} \title{Mean quadratic weighted kappa} \usage{ WKAPPA(truth, response) } \arguments{ \item{truth}{vector of true values} \item{response}{vector of predicted values} } \description{ Defined as...
# folder creation for NIR iterative predictions root<- "/datasets/work/af-tern-mal-deb/work/projects/ternlandscapes_2019/soilColour/spatialPredictions/tiles/" fols<- as.numeric(list.files(root, full.names = FALSE)) length(fols) fols<- fols[order(fols)] fols for (i in 1:length(fols)){ #make path se.fol<- fols...
/Production/DSM/SoilColour/tile_folder_creation.R
permissive
AusSoilsDSM/SLGA
R
false
false
409
r
# folder creation for NIR iterative predictions root<- "/datasets/work/af-tern-mal-deb/work/projects/ternlandscapes_2019/soilColour/spatialPredictions/tiles/" fols<- as.numeric(list.files(root, full.names = FALSE)) length(fols) fols<- fols[order(fols)] fols for (i in 1:length(fols)){ #make path se.fol<- fols...
visualize_cluster = function(gff, cluster, transcript_name){ require("stringr"); require("rtracklayer"); require("GenomicRanges") gr = import.gff(gff) gr_exon = gr[gr$type=="exon"] gr_exon = gr_exon[which(gr_exon$transcript_id %in% transcript_name)] gr_list_input = split(gr_exon, gr_exon$transcript_id) isof...
/DailyLogProgress/visualize_cluster_2:20.R
permissive
DennisWangJAX/AlternativeSplicingPacBio
R
false
false
2,717
r
visualize_cluster = function(gff, cluster, transcript_name){ require("stringr"); require("rtracklayer"); require("GenomicRanges") gr = import.gff(gff) gr_exon = gr[gr$type=="exon"] gr_exon = gr_exon[which(gr_exon$transcript_id %in% transcript_name)] gr_list_input = split(gr_exon, gr_exon$transcript_id) isof...
#!/usr/bin/env Rscript argv <- commandArgs(trailingOnly = TRUE) options(stringsAsFactors = FALSE) source('Util.R') if(length(argv) != 6) { q() } ld.idx <- as.integer(argv[1]) # e.g., ld.idx = 133 qtl.file <- argv[2] # e.g., qtl.file = 'cis-eqtl/geuvadis/133_qtl.txt.gz' geno.dir <- ...
/make.cammel-ptsd_ea.R
no_license
YPARK/cammel-gwas
R
false
false
5,718
r
#!/usr/bin/env Rscript argv <- commandArgs(trailingOnly = TRUE) options(stringsAsFactors = FALSE) source('Util.R') if(length(argv) != 6) { q() } ld.idx <- as.integer(argv[1]) # e.g., ld.idx = 133 qtl.file <- argv[2] # e.g., qtl.file = 'cis-eqtl/geuvadis/133_qtl.txt.gz' geno.dir <- ...
library(EpiModelHIV) orig <- readRDS("out/est/netest.rds") netstats <- readRDS("out/est/netstats.rds") epistats <- readRDS("out/est/epistats.rds") full_tx_eff <- rep(1, 3) param <- param_msm( netstats = netstats, epistats = epistats, hiv.test.rate = c(0.00385, 0.00385, 0.0069), hiv.test.late.prob = rep(0, 3)...
/R/utils-sim_calib_params.R
permissive
EpiModel/injectable-prep
R
false
false
2,056
r
library(EpiModelHIV) orig <- readRDS("out/est/netest.rds") netstats <- readRDS("out/est/netstats.rds") epistats <- readRDS("out/est/epistats.rds") full_tx_eff <- rep(1, 3) param <- param_msm( netstats = netstats, epistats = epistats, hiv.test.rate = c(0.00385, 0.00385, 0.0069), hiv.test.late.prob = rep(0, 3)...