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
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/geom-spatial-xline.R \docType{data} \name{annotation_spatial_hline} \alias{annotation_spatial_hline} \alias{annotation_spatial_vline} \alias{GeomSpatialXline} \title{Projected horizontal and vertical lines} \format{ An object of class \code{G...
/man/annotation_spatial_hline.Rd
no_license
paleolimbot/ggspatial
R
false
true
2,478
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/geom-spatial-xline.R \docType{data} \name{annotation_spatial_hline} \alias{annotation_spatial_hline} \alias{annotation_spatial_vline} \alias{GeomSpatialXline} \title{Projected horizontal and vertical lines} \format{ An object of class \code{G...
#### Information Theoretic Functions as Alternatives for the infotheo package ######### # ## requires LoadPackages source("loadPackages.R") # to estimate Entropy # The infotheo package is quite slow and a lot of the implemented filters rely # heavivly on estimation of entropies and information criteria. Therefore we ...
/NewFilter/InfoTheo.R
no_license
koehnden/is-seminar
R
false
false
3,190
r
#### Information Theoretic Functions as Alternatives for the infotheo package ######### # ## requires LoadPackages source("loadPackages.R") # to estimate Entropy # The infotheo package is quite slow and a lot of the implemented filters rely # heavivly on estimation of entropies and information criteria. Therefore we ...
#Models #after model selction (in 4_7) #Model attack#### model10_1<-lm(phen_int~PC1+PC2,as.data.frame(allplants)) model10_2<-glm(Mrub_sch_s_pres~PC1+PC2,as.data.frame(allplants),family="binomial") model10_3<-lm(suit_neigh~PC1+PC2,as.data.frame(allplants)) model10_4<-glm(attack_f~phen_int+Mrub_sch_s_pres+phen_int:Mrub_s...
/code/4_7_SEMs_seeds_scaled_PCA.R
no_license
aliciavaldes1501/neighbourhood-effects
R
false
false
1,459
r
#Models #after model selction (in 4_7) #Model attack#### model10_1<-lm(phen_int~PC1+PC2,as.data.frame(allplants)) model10_2<-glm(Mrub_sch_s_pres~PC1+PC2,as.data.frame(allplants),family="binomial") model10_3<-lm(suit_neigh~PC1+PC2,as.data.frame(allplants)) model10_4<-glm(attack_f~phen_int+Mrub_sch_s_pres+phen_int:Mrub_s...
testlist <- list(pts = integer(0), ends = NULL, starts = NULL, sorted_ends = 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, 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, 0...
/IntervalSurgeon/inst/testfiles/rcpp_depth/AFL_rcpp_depth/rcpp_depth_valgrind_files/1609857611-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
711
r
testlist <- list(pts = integer(0), ends = NULL, starts = NULL, sorted_ends = 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, 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, 0...
library(tidyverse) library(haven) library(estimatr) library(texreg) data <- read_dta("final_dataset.dta") ## replicate table 4 # reg any_lagged_killed secular_close_race, cl(cluster_var) lag_killed1 <- with(data, lm_robust(any_lagged_killed ~ secular_close_race, clusters = cluster...
/replication/lagged_prediction.r
no_license
belledon/plsc_504_term_paper
R
false
false
1,956
r
library(tidyverse) library(haven) library(estimatr) library(texreg) data <- read_dta("final_dataset.dta") ## replicate table 4 # reg any_lagged_killed secular_close_race, cl(cluster_var) lag_killed1 <- with(data, lm_robust(any_lagged_killed ~ secular_close_race, clusters = cluster...
library(FITSio) library(digest) some_spectra <- data.frame( mjd=as.integer(rep(53433, 9)), plate=as.integer(rep(1678, 9)), fiberid=as.integer(rep(425, 9)) ) aui_make_tile<-function(spectra_ids, plot_width, plot_height) { if ( ! is.data.frame(spectra_ids) | ! is.integer(spectra_ids$mjd...
/aspectuiplot.R
no_license
bloerg/aspectui_spectra_generator
R
false
false
4,721
r
library(FITSio) library(digest) some_spectra <- data.frame( mjd=as.integer(rep(53433, 9)), plate=as.integer(rep(1678, 9)), fiberid=as.integer(rep(425, 9)) ) aui_make_tile<-function(spectra_ids, plot_width, plot_height) { if ( ! is.data.frame(spectra_ids) | ! is.integer(spectra_ids$mjd...
library(conflicted) library(tidyverse) library(lubridate) library(svglite) library(tictoc) filter <- dplyr::filter tic("Load data") iowa_raw <- read_csv( "https://data.iowa.gov/api/views/m3tr-qhgy/rows.csv?accessType=DOWNLOAD", col_types = cols_only(col_character(), `Category Name` = col_character(), `Item Descr...
/What we're drinking in quarantine.R
permissive
TrueBirch/QuarantineDrinking
R
false
false
13,223
r
library(conflicted) library(tidyverse) library(lubridate) library(svglite) library(tictoc) filter <- dplyr::filter tic("Load data") iowa_raw <- read_csv( "https://data.iowa.gov/api/views/m3tr-qhgy/rows.csv?accessType=DOWNLOAD", col_types = cols_only(col_character(), `Category Name` = col_character(), `Item Descr...
#################################################################################################### #################################################################################################### ## GET REFERENCE DATA FROM AD GRID FOR ACCURACY ASSESSMENT OF RESULTS ## Contact remi.dannunzio@fao.org ## 2018/04/06...
/scripts_mozambique/s5_decision_tree/merge_clip_colorize_dt_20180521.R
no_license
lecrabe/moz_lulc
R
false
false
2,449
r
#################################################################################################### #################################################################################################### ## GET REFERENCE DATA FROM AD GRID FOR ACCURACY ASSESSMENT OF RESULTS ## Contact remi.dannunzio@fao.org ## 2018/04/06...
# 40-Houses # # # Copyright © 2016: Majid Einian # Licence: GPL-3 # rm(list=ls()) starttime <- proc.time() cat("\n\n================ Houses =====================================\n") library(yaml) Settings <- yaml.load_file("Settings.yaml") library(readxl) library(data.table) HouseTables <- data.table(read_excel(S...
/R/Archive/June 2020 (removed code files)/222-HouseAsset.R
no_license
sadraheydari/IRHEIS
R
false
false
2,616
r
# 40-Houses # # # Copyright © 2016: Majid Einian # Licence: GPL-3 # rm(list=ls()) starttime <- proc.time() cat("\n\n================ Houses =====================================\n") library(yaml) Settings <- yaml.load_file("Settings.yaml") library(readxl) library(data.table) HouseTables <- data.table(read_excel(S...
mtq <- mf_get_mtq() mf_map(mtq) expect_silent(mf_prop(x = mtq, var = "POP", inches = .4, symbol = "circle", val_max = 90000, col = "tomato1", border = "blue", lwd = 1, leg_pos = "right", leg_title = "Population", leg_title_cex =...
/inst/tinytest/test_map_p.R
no_license
riatelab/mapsf
R
false
false
1,437
r
mtq <- mf_get_mtq() mf_map(mtq) expect_silent(mf_prop(x = mtq, var = "POP", inches = .4, symbol = "circle", val_max = 90000, col = "tomato1", border = "blue", lwd = 1, leg_pos = "right", leg_title = "Population", leg_title_cex =...
source('main.R') png(filename='output/plot2.png') plot(times,x$Global_active_power,type="l", ylab="Global Active Power (kilowatts)",xlab='',bg = "transparent") dev.off()
/plot2.R
no_license
maxkrut/Ex-Data-Analysis-plotting-1
R
false
false
172
r
source('main.R') png(filename='output/plot2.png') plot(times,x$Global_active_power,type="l", ylab="Global Active Power (kilowatts)",xlab='',bg = "transparent") dev.off()
#' The Supermatrix function #' #' Not really a matrix! This function allows you to perform multiple pairwise association tests between numerical/categorical variables (phenotypes) and aligned amino-acid sites (categorical), create a matrix of p-values and adjust them by several p-value adjustment methods. For numeric v...
/R/supermatrix.R
no_license
GRealesM/superwise
R
false
false
5,521
r
#' The Supermatrix function #' #' Not really a matrix! This function allows you to perform multiple pairwise association tests between numerical/categorical variables (phenotypes) and aligned amino-acid sites (categorical), create a matrix of p-values and adjust them by several p-value adjustment methods. For numeric v...
testlist <- list(A = structure(3.23955766589332e-227, .Dim = c(1L, 1L)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_rows,testlist) str(result)
/multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613112789-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
180
r
testlist <- list(A = structure(3.23955766589332e-227, .Dim = c(1L, 1L)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_rows,testlist) str(result)
model{ # priors for within site model (process) beta ~ dnorm(0, 1/10^2) sigma ~ dunif(0, 100) tau <- 1/sigma^2 ### priors for intercept model mu.alpha ~ dnorm(0, 1/100^2) sigma.alpha ~ dunif(0, 100) tau.alpha <- 1/sigma.alpha^2 ### prior...
/sbs_bayes/models/hier1_lognormal_JAGS.R
permissive
elahi/sbs_analysis
R
false
false
1,134
r
model{ # priors for within site model (process) beta ~ dnorm(0, 1/10^2) sigma ~ dunif(0, 100) tau <- 1/sigma^2 ### priors for intercept model mu.alpha ~ dnorm(0, 1/100^2) sigma.alpha ~ dunif(0, 100) tau.alpha <- 1/sigma.alpha^2 ### prior...
#' Search shards. #' #' @export #' @param index One or more indeces #' @param routing A character vector of routing values to take into account when determining #' which shards a request would be executed against. #' @param preference Controls a preference of which shard replicas to execute the search #' request on. ...
/R/search_shards.R
permissive
toledobastos/elastic
R
false
false
1,464
r
#' Search shards. #' #' @export #' @param index One or more indeces #' @param routing A character vector of routing values to take into account when determining #' which shards a request would be executed against. #' @param preference Controls a preference of which shard replicas to execute the search #' request on. ...
x<-read.table("household_power_consumption.txt",header=TRUE, sep=";", na.strings="?", colClasses=c(Date='factor', Time='factor', rep("numeric",7))) time<-paste(x$Date, x$Time) x$Time <- strptime(time, "%d/%m/%Y %H:%M:%S") x$Date <- as.Date(x$Date, "%d/%m/%Y") x <- subset(x, x$Date<="2007-02-02") x <- subset(x, x$Date>=...
/plot3.R
no_license
martasen/ExData_Plotting1
R
false
false
694
r
x<-read.table("household_power_consumption.txt",header=TRUE, sep=";", na.strings="?", colClasses=c(Date='factor', Time='factor', rep("numeric",7))) time<-paste(x$Date, x$Time) x$Time <- strptime(time, "%d/%m/%Y %H:%M:%S") x$Date <- as.Date(x$Date, "%d/%m/%Y") x <- subset(x, x$Date<="2007-02-02") x <- subset(x, x$Date>=...
\name{getCompleteMarketPricesCompressed} \alias{>BF_Prices} \alias{getCompleteMarketPricesCompressed} \alias{getMarketPrices} \alias{getMarketPricesCompressed} \title{Prices on betfair markets.} \usage{ getCompleteMarketPricesCompressed(marketId, currencyCode = "EUR", server = getOption("bfServer"), output = getOptio...
/man/BF_Prices.Rd
no_license
277jah/betfairly
R
false
false
4,028
rd
\name{getCompleteMarketPricesCompressed} \alias{>BF_Prices} \alias{getCompleteMarketPricesCompressed} \alias{getMarketPrices} \alias{getMarketPricesCompressed} \title{Prices on betfair markets.} \usage{ getCompleteMarketPricesCompressed(marketId, currencyCode = "EUR", server = getOption("bfServer"), output = getOptio...
# Assignment: ASSIGNMENT 4 # Name: Lastname, Firstname # Date: 2010-02-14 ## Load the ggplot2 package library(ggplot2) theme_set(theme_minimal()) ## Set the working directory to the root of your DSC 520 directory setwd("/home/jdoe/Workspaces/dsc520") ## Load the `data/r4ds/heights.csv` to heights_df <- read.csv("dat...
/assignments/assignment04/assignment_04_LastnameFirstname.R
permissive
earellanofranco/dsc520
R
false
false
3,093
r
# Assignment: ASSIGNMENT 4 # Name: Lastname, Firstname # Date: 2010-02-14 ## Load the ggplot2 package library(ggplot2) theme_set(theme_minimal()) ## Set the working directory to the root of your DSC 520 directory setwd("/home/jdoe/Workspaces/dsc520") ## Load the `data/r4ds/heights.csv` to heights_df <- read.csv("dat...
# Parkinsons Data Set parkinsonsgenes <- readLines(parkinsonsidpath) # Annotate a set of genes to pathways ann<-getAnn(parkinsonsgenes[1:10]) result <- printAnn(ann) write.table(result,file="ParkinsonResultsPathways", col.names=NA,sep="\t") # Annotate a set of genes to sub-pathways based on KEGG Orthology (KO) identifi...
/Subpathwayminer/SubpathwayMiner.R
no_license
StephHippo/GeneSetAnalysisSurvey
R
false
false
1,431
r
# Parkinsons Data Set parkinsonsgenes <- readLines(parkinsonsidpath) # Annotate a set of genes to pathways ann<-getAnn(parkinsonsgenes[1:10]) result <- printAnn(ann) write.table(result,file="ParkinsonResultsPathways", col.names=NA,sep="\t") # Annotate a set of genes to sub-pathways based on KEGG Orthology (KO) identifi...
getData <- function(connectionDetails, cohortId, outcomeIds, cdmDatabaseSchema, cdmDatabaseName, cohortDatabaseSchema, cohortTable, oracleTempSchema, standardCo...
/R/helpers.R
permissive
ohdsi-studies/TkrPredictSimple
R
false
false
4,840
r
getData <- function(connectionDetails, cohortId, outcomeIds, cdmDatabaseSchema, cdmDatabaseName, cohortDatabaseSchema, cohortTable, oracleTempSchema, standardCo...
compareGroups.fit <- function(X, y, Xext, selec, method, timemax, alpha, min.dis, max.ylev, max.xlev, include.label, Q1, Q3, simplify, ref, ref.no, fact.ratio, ref.y, p.corrected, compute.ratio, include.miss, oddsratio.method, chisq.test.perm, byrow, chisq.test.B, chisq.test.seed, Date.format, var.e...
/R/compareGroups.fit.R
no_license
doc4child/test
R
false
false
8,468
r
compareGroups.fit <- function(X, y, Xext, selec, method, timemax, alpha, min.dis, max.ylev, max.xlev, include.label, Q1, Q3, simplify, ref, ref.no, fact.ratio, ref.y, p.corrected, compute.ratio, include.miss, oddsratio.method, chisq.test.perm, byrow, chisq.test.B, chisq.test.seed, Date.format, var.e...
library(dplyr) przezycia <- archivist::aread("pbiecek/Przewodnik/arepo/609491e5ec491f240cbeafe377743e21") przezycia <- filter(przezycia, Year == 2009)[, c("Age", "Tx", "Gender")] write.csv(przezycia, "przezyciaUciete.csv", row.names = FALSE)
/PraceDomowe/PD10/gr2/MateuszBakala/ucinaniePrzezyc.R
no_license
Levinaanna/TechnikiWizualizacjiDanych2018
R
false
false
248
r
library(dplyr) przezycia <- archivist::aread("pbiecek/Przewodnik/arepo/609491e5ec491f240cbeafe377743e21") przezycia <- filter(przezycia, Year == 2009)[, c("Age", "Tx", "Gender")] write.csv(przezycia, "przezyciaUciete.csv", row.names = FALSE)
# average ----------------------------------------------------------------- myseed=1988 testday <- 31 path <- "/home/whale/Documents/click" submission <- read.csv(paste0(path,"/submission",testday,".csv"),colClasses = c("character")) model1<- read.csv(paste0(path,"/fm4_106deviceip.csv")) model1 <- as.data.frame(model1...
/modelensemble.R
permissive
gau2112/kaggle-click
R
false
false
2,648
r
# average ----------------------------------------------------------------- myseed=1988 testday <- 31 path <- "/home/whale/Documents/click" submission <- read.csv(paste0(path,"/submission",testday,".csv"),colClasses = c("character")) model1<- read.csv(paste0(path,"/fm4_106deviceip.csv")) model1 <- as.data.frame(model1...
## ----------------------------------------------------------------------------- library(oce) library(proj4) library(mapproj) data(coastlineWorld) lon <- coastlineWorld[['longitude']] lat <- coastlineWorld[['latitude']] ## ----projection-existing, fig.height=4, dpi=100------------------------------- par(mar=c(3, 3, 1...
/_site/assets/2014-02-10-oce-map-projection.R
no_license
dankelley/dankelley.github.io
R
false
false
681
r
## ----------------------------------------------------------------------------- library(oce) library(proj4) library(mapproj) data(coastlineWorld) lon <- coastlineWorld[['longitude']] lat <- coastlineWorld[['latitude']] ## ----projection-existing, fig.height=4, dpi=100------------------------------- par(mar=c(3, 3, 1...
library(glmnet) mydata = read.table("../../../../TrainingSet/FullSet/Correlation/central_nervous_system.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.03,family="gaussian",standardize=TRUE) sink('./central_nerv...
/Model/EN/Correlation/central_nervous_system/central_nervous_system_015.R
no_license
esbgkannan/QSMART
R
false
false
382
r
library(glmnet) mydata = read.table("../../../../TrainingSet/FullSet/Correlation/central_nervous_system.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.03,family="gaussian",standardize=TRUE) sink('./central_nerv...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_mode.R \name{get_mode} \alias{get_mode} \title{Compute Mode} \usage{ get_mode(x) } \arguments{ \item{x}{a vector. Can be numeric, factor or character vector.} } \description{ Compute the mode in a given vector. Mode is the most frequent ...
/man/get_mode.Rd
no_license
kassambara/rstatix
R
false
true
608
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_mode.R \name{get_mode} \alias{get_mode} \title{Compute Mode} \usage{ get_mode(x) } \arguments{ \item{x}{a vector. Can be numeric, factor or character vector.} } \description{ Compute the mode in a given vector. Mode is the most frequent ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/paws.directconnect_operations.R \name{delete_lag} \alias{delete_lag} \title{Deletes the specified link aggregation group (LAG)} \usage{ delete_lag(lagId) } \arguments{ \item{lagId}{[required] The ID of the LAG.} } \description{ Deletes the sp...
/service/paws.directconnect/man/delete_lag.Rd
permissive
CR-Mercado/paws
R
false
true
526
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/paws.directconnect_operations.R \name{delete_lag} \alias{delete_lag} \title{Deletes the specified link aggregation group (LAG)} \usage{ delete_lag(lagId) } \arguments{ \item{lagId}{[required] The ID of the LAG.} } \description{ Deletes the sp...
# # This is a Shiny web application. You can run the application by clicking # the 'Run App' button above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) library(shinydashboard) library(tigris) library(ggplot2) library(lubridate) library(mapview) librar...
/proj3/app.R
no_license
mghuneim/424project3
R
false
false
20,155
r
# # This is a Shiny web application. You can run the application by clicking # the 'Run App' button above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) library(shinydashboard) library(tigris) library(ggplot2) library(lubridate) library(mapview) librar...
print("Entering loop number 1") Sys.sleep(5)
/script.R
no_license
danbarke/biostat625
R
false
false
45
r
print("Entering loop number 1") Sys.sleep(5)
# ------------------------------------------------------------------------------ # Libraries library(dplyr) library(readr) library(stringr) library(caret) # ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------ #...
/Caret/Script/Script_treebag.R
no_license
bemayer/DigitRecognizer
R
false
false
2,722
r
# ------------------------------------------------------------------------------ # Libraries library(dplyr) library(readr) library(stringr) library(caret) # ------------------------------------------------------------------------------ # ------------------------------------------------------------------------------ #...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_winfapapi.R \name{get_pot} \alias{get_pot} \title{A function to obtain Peaks-Over-Threshold (POT) data using the NRFA API} \usage{ get_pot(station, getAmax = FALSE) } \arguments{ \item{station}{the NRFA station number for which peaks over...
/man/get_pot.Rd
no_license
ilapros/winfapReader
R
false
true
2,557
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_winfapapi.R \name{get_pot} \alias{get_pot} \title{A function to obtain Peaks-Over-Threshold (POT) data using the NRFA API} \usage{ get_pot(station, getAmax = FALSE) } \arguments{ \item{station}{the NRFA station number for which peaks over...
# # This is a Shiny web application. You can run the application by clicking # the 'Run App' button above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) library(lubridate) library(dplyr) library(ggplot2) library(markdown) library(shinydashboard) libra...
/Google_Analytics/sample/app.R
no_license
viraj1327/Data_Visualization
R
false
false
20,567
r
# # This is a Shiny web application. You can run the application by clicking # the 'Run App' button above. # # Find out more about building applications with Shiny here: # # http://shiny.rstudio.com/ # library(shiny) library(lubridate) library(dplyr) library(ggplot2) library(markdown) library(shinydashboard) libra...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/runProfile.R \name{runProfile} \alias{runProfile} \title{Create a profile for runner.} \usage{ runProfile(heart.rate.min = NA, heart.rate.max = NA, gender = .gender.masculin, age = NA, weight = NA) } \arguments{ \item{heart.rate.min}{Minimu...
/man/runProfile.Rd
permissive
michelcaradec/runR
R
false
true
562
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/runProfile.R \name{runProfile} \alias{runProfile} \title{Create a profile for runner.} \usage{ runProfile(heart.rate.min = NA, heart.rate.max = NA, gender = .gender.masculin, age = NA, weight = NA) } \arguments{ \item{heart.rate.min}{Minimu...
## Plot 1 for Exploratory Data Analysis - Week 1 ## Set working directory to folder that houses household_power_consumption.txt file PowerTable<-read.table("household_power_consumption.txt",stringsAsFactors=FALSE,header=T,sep=";",na.strings="?") CombTimeDate <- strptime(paste(PowerTable$Date, PowerTable$Time, sep=" ...
/Plot3.R
no_license
calex9a/ExData_Plotting1
R
false
false
1,085
r
## Plot 1 for Exploratory Data Analysis - Week 1 ## Set working directory to folder that houses household_power_consumption.txt file PowerTable<-read.table("household_power_consumption.txt",stringsAsFactors=FALSE,header=T,sep=";",na.strings="?") CombTimeDate <- strptime(paste(PowerTable$Date, PowerTable$Time, sep=" ...
library(dplyr) library(e1071) library(readr) setwd("/home/yeachan153/Desktop/BDS/R/Big Data Analytics/Big-Data-Analytics/Sensor Classification Project/Dataset") ### ---- FUN extract Time Domain Features ----- extractTimeDomainFeatures <- function(filename, labels = train_labels) { # extract user and experiment...
/Sensor Classification Project/Dataframe maker baseline.R
no_license
yeachan153/Big-Data-Analytics
R
false
false
6,672
r
library(dplyr) library(e1071) library(readr) setwd("/home/yeachan153/Desktop/BDS/R/Big Data Analytics/Big-Data-Analytics/Sensor Classification Project/Dataset") ### ---- FUN extract Time Domain Features ----- extractTimeDomainFeatures <- function(filename, labels = train_labels) { # extract user and experiment...
library(testthat) library(ukcovidget) test_check("ukcovidget")
/tests/testthat.R
no_license
rboyes/ukcovidget
R
false
false
64
r
library(testthat) library(ukcovidget) test_check("ukcovidget")
# ---- Long by groups of species ---- rm(list=ls()) library(rjags) library(jagsUI) library(dplyr) source("D:/PhD/MyScripts/Ch. 2-3/Ch. 3/Results/Functions/ProcessCodaOutput.R") source("D:/PhD/MyScripts/Ch. 2-3/Ch. 3/Results/Functions/DoScale.r") source("D:/PhD/MyScripts/Ch. 2-3/Ch. 3/Results/Functions/plot.violins3...
/Ch. 2-3/Ch. 3/Results/Fig2/Posteriors_violins_groups4.r
no_license
anasanz/MyScripts
R
false
false
8,364
r
# ---- Long by groups of species ---- rm(list=ls()) library(rjags) library(jagsUI) library(dplyr) source("D:/PhD/MyScripts/Ch. 2-3/Ch. 3/Results/Functions/ProcessCodaOutput.R") source("D:/PhD/MyScripts/Ch. 2-3/Ch. 3/Results/Functions/DoScale.r") source("D:/PhD/MyScripts/Ch. 2-3/Ch. 3/Results/Functions/plot.violins3...
\name{are.parrevgum.valid} \alias{are.parrevgum.valid} \title{Are the Distribution Parameters Consistent with the Reverse Gumbel Distribution} \description{ Is the distribution parameter object consistent with the corresponding distribution? The distribution functions (\code{\link{cdfrevgum}}, \code{\link{pdfrevgum}}...
/man/are.parrevgum.valid.Rd
no_license
wasquith/lmomco
R
false
false
1,912
rd
\name{are.parrevgum.valid} \alias{are.parrevgum.valid} \title{Are the Distribution Parameters Consistent with the Reverse Gumbel Distribution} \description{ Is the distribution parameter object consistent with the corresponding distribution? The distribution functions (\code{\link{cdfrevgum}}, \code{\link{pdfrevgum}}...
## ----set_root_directory, echo=FALSE, results='hide'---------------------- #It works better if the root directory is set in its own chunk. # library(knitr) # knitr::opts_knit$set(root.dir = "../") ## ----set_options, echo=FALSE, results='hide'----------------------------------------------------------------------...
/Wats/inst/doc/MbrFigures.R
no_license
ingted/R-Examples
R
false
false
13,518
r
## ----set_root_directory, echo=FALSE, results='hide'---------------------- #It works better if the root directory is set in its own chunk. # library(knitr) # knitr::opts_knit$set(root.dir = "../") ## ----set_options, echo=FALSE, results='hide'----------------------------------------------------------------------...
library(ggplot2) # Paquete para confeccionar dibujos library(dplyr) # Paquete para manipular datos library(readxl) # Permite leer archivos xlsx datos=read_excel("C:/.../controlunivariado.xlsx") # Importa la base con la cual se va a trabajar attach(datos) # Se pone la base en la memoria dat=datos %>% group_by(Obs, Cla...
/scripts-libro/Code/graf_controluniv.R
no_license
cristianhernan/austral-mcd-aid
R
false
false
853
r
library(ggplot2) # Paquete para confeccionar dibujos library(dplyr) # Paquete para manipular datos library(readxl) # Permite leer archivos xlsx datos=read_excel("C:/.../controlunivariado.xlsx") # Importa la base con la cual se va a trabajar attach(datos) # Se pone la base en la memoria dat=datos %>% group_by(Obs, Cla...
#!/usr/bin/env Rscript library(ggplot2) library(lubridate) library(data.table) library(reshape2) library(scales) library(tools) library(zoo) args <- commandArgs(trailingOnly = TRUE) if (length(args) < 1) { stop("Usage: modmultiloggraph <times.csv> <times2.csv> [out.png] [starttime [endtime]]") } file1 <- args[1...
/modmultiloggraph
no_license
cmdcolin/track_times
R
false
false
1,691
#!/usr/bin/env Rscript library(ggplot2) library(lubridate) library(data.table) library(reshape2) library(scales) library(tools) library(zoo) args <- commandArgs(trailingOnly = TRUE) if (length(args) < 1) { stop("Usage: modmultiloggraph <times.csv> <times2.csv> [out.png] [starttime [endtime]]") } file1 <- args[1...
whichPolygon <- function(coords, shape){ shape@data<- cbind(1:nrow(shape@data), shape@data) crs.shape<- projection(shape) coords2<- SpatialPoints(coords, proj4string = CRS(crs.shape)) pol.n<- over(coords2, shape,fn=NULL) matrix(pol.n[,1],ncol=1) } cl <- read.csv('data/pre/climate.csv') so <- read.csv('data/...
/traitOragnizeData.R
no_license
planttrt/traitsModel
R
false
false
3,946
r
whichPolygon <- function(coords, shape){ shape@data<- cbind(1:nrow(shape@data), shape@data) crs.shape<- projection(shape) coords2<- SpatialPoints(coords, proj4string = CRS(crs.shape)) pol.n<- over(coords2, shape,fn=NULL) matrix(pol.n[,1],ncol=1) } cl <- read.csv('data/pre/climate.csv') so <- read.csv('data/...
spaces_base <- "nyc3.digitaloceanspaces.com" check_space_access <- function(spaces_key) { tmp <- ifelse(is.null(spaces_key), Sys.getenv("DO_SPACES_ACCESS_KEY"), spaces_key) if (tmp == "") { stop("Need a digital ocean spaces access key defined in your session", call. = F...
/R/spaces.R
no_license
amoeba/analogsea
R
false
false
5,378
r
spaces_base <- "nyc3.digitaloceanspaces.com" check_space_access <- function(spaces_key) { tmp <- ifelse(is.null(spaces_key), Sys.getenv("DO_SPACES_ACCESS_KEY"), spaces_key) if (tmp == "") { stop("Need a digital ocean spaces access key defined in your session", call. = F...
library(shiny) library(httpuv) shinyUI(pageWithSidebar( headerPanel("Global Temperature"), sidebarPanel( checkboxGroupInput("scen1", label = h3("Select 1 Map #1 Scenario"), choices = list("pre-2000" = "past", "post-2000: 850 ppm by 2100 (a2)"="a2","post-2000: 550 ppm by 2100 (b1)"="b...
/tempPredict_oneplot/ui.R
no_license
nicolegoebel/WorldBank_RstudioShinyAppPitch
R
false
false
1,045
r
library(shiny) library(httpuv) shinyUI(pageWithSidebar( headerPanel("Global Temperature"), sidebarPanel( checkboxGroupInput("scen1", label = h3("Select 1 Map #1 Scenario"), choices = list("pre-2000" = "past", "post-2000: 850 ppm by 2100 (a2)"="a2","post-2000: 550 ppm by 2100 (b1)"="b...
# Description -------------------------------------------------------------------------------------- # Simulate adversarial knapsack game with a variety of settings. # Setup -------------------------------------------------------------------------------------------- # Libraries # For data manipulation library(dplyr) l...
/r/star_wars_knapsacks_2.R
no_license
neilpruthi/ad_knap
R
false
false
4,897
r
# Description -------------------------------------------------------------------------------------- # Simulate adversarial knapsack game with a variety of settings. # Setup -------------------------------------------------------------------------------------------- # Libraries # For data manipulation library(dplyr) l...
#!/usr/local/bin/Rscript task <- dyncli::main() library(dplyr, warn.conflicts = FALSE) library(purrr, warn.conflicts = FALSE) library(dynwrap, warn.conflicts = FALSE) library(dyncli, warn.conflicts = FALSE) library(CellTrails, warn.conflicts = FALSE) ##################################### ### LOAD DATA ...
/run.R
permissive
dynverse/ti_celltrails
R
false
false
3,757
r
#!/usr/local/bin/Rscript task <- dyncli::main() library(dplyr, warn.conflicts = FALSE) library(purrr, warn.conflicts = FALSE) library(dynwrap, warn.conflicts = FALSE) library(dyncli, warn.conflicts = FALSE) library(CellTrails, warn.conflicts = FALSE) ##################################### ### LOAD DATA ...
#example 16 chapter 4 page no 186 m=2 px4=dpois(4,m) print(px4)
/Statistics_And_Probability_Theory_by_Dr._K.c._Jain_And_Dr._M.l._Rawat/CH4/EX4.16/Ex4_16.R
permissive
FOSSEE/R_TBC_Uploads
R
false
false
68
r
#example 16 chapter 4 page no 186 m=2 px4=dpois(4,m) print(px4)
\alias{gSimpleAsyncResultNew} \name{gSimpleAsyncResultNew} \title{gSimpleAsyncResultNew} \description{Creates a \code{\link{GSimpleAsyncResult}}.} \usage{gSimpleAsyncResultNew(source.object, callback, user.data = NULL, source.tag)} \arguments{ \item{\verb{source.object}}{a \code{\link{GObject}} the asynchronous fu...
/RGtk2/man/gSimpleAsyncResultNew.Rd
no_license
lawremi/RGtk2
R
false
false
689
rd
\alias{gSimpleAsyncResultNew} \name{gSimpleAsyncResultNew} \title{gSimpleAsyncResultNew} \description{Creates a \code{\link{GSimpleAsyncResult}}.} \usage{gSimpleAsyncResultNew(source.object, callback, user.data = NULL, source.tag)} \arguments{ \item{\verb{source.object}}{a \code{\link{GObject}} the asynchronous fu...
\name{hrNames} \alias{hrNames} \title{Human readable feature names} \description{Translate feature names to human readable feature names. Names not known to this function for conversion are returned unchanged.} \usage{ hrNames(names) } \arguments{ \item{names}{Original feature names.} } \value{ A vector of tran...
/man/hrNames.Rd
no_license
Huber-group-EMBL/DmelSGI
R
false
false
477
rd
\name{hrNames} \alias{hrNames} \title{Human readable feature names} \description{Translate feature names to human readable feature names. Names not known to this function for conversion are returned unchanged.} \usage{ hrNames(names) } \arguments{ \item{names}{Original feature names.} } \value{ A vector of tran...
## With matrix inversion being a costly computation, it may be beneficial ## to cache the inverse of a matrix rather than compute it repeatedly ## Create the special matrix object that can cache its inverse ## Per the example, this function should do the following: ## - Set the matrix ## - Get the matrix ## - Set the ...
/cachematrix.R
no_license
chmGH/ProgrammingAssignment2
R
false
false
1,364
r
## With matrix inversion being a costly computation, it may be beneficial ## to cache the inverse of a matrix rather than compute it repeatedly ## Create the special matrix object that can cache its inverse ## Per the example, this function should do the following: ## - Set the matrix ## - Get the matrix ## - Set the ...
# Set Dec 1, 2015 as the reference date, # cf. http://mran.revolutionanalytics.com/web/packages/checkpoint/vignettes/checkpoint.html # library(checkpoint) # run these two lines BEFORE running this test for the first time # checkpoint("2015-12-01") # Clear the memory before running rm(list= ls()) args <- commandArgs(...
/cms_data_analysis.R
no_license
chuckpiercey/R_benchmark_test
R
false
false
11,212
r
# Set Dec 1, 2015 as the reference date, # cf. http://mran.revolutionanalytics.com/web/packages/checkpoint/vignettes/checkpoint.html # library(checkpoint) # run these two lines BEFORE running this test for the first time # checkpoint("2015-12-01") # Clear the memory before running rm(list= ls()) args <- commandArgs(...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fit_and_reporting.R \name{plot.MxModel} \alias{plot.MxModel} \alias{plot} \alias{umxPlot} \title{Create and display a graphical path diagram for a model.} \usage{ \method{plot}{MxModel}( x = NA, std = FALSE, fixed = TRUE, means = TRUE...
/man/plot.MxModel.Rd
no_license
Davidpjmp/umx
R
false
true
4,642
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/fit_and_reporting.R \name{plot.MxModel} \alias{plot.MxModel} \alias{plot} \alias{umxPlot} \title{Create and display a graphical path diagram for a model.} \usage{ \method{plot}{MxModel}( x = NA, std = FALSE, fixed = TRUE, means = TRUE...
#### I organized the code by each subsection in Udacity Problem Set 3 library(ggplot2) data(diamonds) names(diamonds) ### Price Histogram qplot(x = price, data = diamonds) ### Diamond Count tail(diamonds %>% filter(price < 500) %>% select(price)) tail(diamonds %>% filter(price < 250) %>% select(price))...
/EDA Project #1.R
no_license
osanchez2323/SpringBoard
R
false
false
2,127
r
#### I organized the code by each subsection in Udacity Problem Set 3 library(ggplot2) data(diamonds) names(diamonds) ### Price Histogram qplot(x = price, data = diamonds) ### Diamond Count tail(diamonds %>% filter(price < 500) %>% select(price)) tail(diamonds %>% filter(price < 250) %>% select(price))...
a <-list(a=1:3,b="a string",c=pi,d=list(-1,-5)) a$d
/AI_prog/test.r
no_license
tapanauti/MSc-AI-Sem1
R
false
false
51
r
a <-list(a=1:3,b="a string",c=pi,d=list(-1,-5)) a$d
#' Accept the result of scale and perform the inverse transformation #' #' @param data_scaled the result of scale #' @return the result of unscale #' @export #' @examples #' unscale(scale(1:5)) ## unscale 接受 scale 的结果,并进行反变换 unscale <- function (data_scaled) { center <- attr(data_scaled, "scaled:center") scales ...
/R/my_func.r
no_license
yinanhe/heyinan
R
false
false
1,371
r
#' Accept the result of scale and perform the inverse transformation #' #' @param data_scaled the result of scale #' @return the result of unscale #' @export #' @examples #' unscale(scale(1:5)) ## unscale 接受 scale 的结果,并进行反变换 unscale <- function (data_scaled) { center <- attr(data_scaled, "scaled:center") scales ...
# Gideon Vos 20 Oct 2020 # Implementation of paper: Deep learning to predict the lab-of-origin of engineered DNA # Nielsen, A and Voigt, C (Voigt Labs) # URL: https://www.nature.com/articles/s41467-018-05378-z.pdf?origin=ppub # Paper results in predictive accuracy of 48%, my model delivers 75.4% on validation set (10%)...
/genetics.R
no_license
elmat0/GeneticAttribution
R
false
false
7,902
r
# Gideon Vos 20 Oct 2020 # Implementation of paper: Deep learning to predict the lab-of-origin of engineered DNA # Nielsen, A and Voigt, C (Voigt Labs) # URL: https://www.nature.com/articles/s41467-018-05378-z.pdf?origin=ppub # Paper results in predictive accuracy of 48%, my model delivers 75.4% on validation set (10%)...
## This file prepares all visualisations done on the data results of the # extended sample library(pacman) p_load(tidyverse, countrycode, cowplot, RColorBrewer) ## Visualisation settings plot_path <- "output/plots" # save plots here plot_template <- paste0("extended_%s",".png") # extensions identifiers <- c( 'de...
/code/04_extended_sample.R
permissive
Gutschlhofer/child_poverty
R
false
false
6,237
r
## This file prepares all visualisations done on the data results of the # extended sample library(pacman) p_load(tidyverse, countrycode, cowplot, RColorBrewer) ## Visualisation settings plot_path <- "output/plots" # save plots here plot_template <- paste0("extended_%s",".png") # extensions identifiers <- c( 'de...
############################################################ # # # Clean pain sites project data # # # ############################################################ # Load package...
/clean-data.R
no_license
kamermanpr/pain-sites
R
false
false
23,682
r
############################################################ # # # Clean pain sites project data # # # ############################################################ # Load package...
837bb2d1111af6c15eb975144ef46663 p20-5.pddl_planlen=18.qdimacs 3790 109588
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Database/Kronegger-Pfandler-Pichler/bomb/p20-5.pddl_planlen=18/p20-5.pddl_planlen=18.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
74
r
837bb2d1111af6c15eb975144ef46663 p20-5.pddl_planlen=18.qdimacs 3790 109588
safe_system <- function(command, args) { out <- tempfile() err <- tempfile() on.exit(unlink(out), add = TRUE) on.exit(unlink(err), add = TRUE) ## We suppress warnings, they are given if the command ## exits with a non-zero status suppressWarnings( res <- system2(command, args = args, stdout = out, ...
/R/safe_system.R
no_license
fxcebx/rcmdcheck
R
false
false
428
r
safe_system <- function(command, args) { out <- tempfile() err <- tempfile() on.exit(unlink(out), add = TRUE) on.exit(unlink(err), add = TRUE) ## We suppress warnings, they are given if the command ## exits with a non-zero status suppressWarnings( res <- system2(command, args = args, stdout = out, ...
context("nn") test_that("nn_module", { my_net <- nn_module( "my_net", initialize = function(n_inputs, n_outputs) { self$W <- nn_parameter(torch_randn(n_inputs, n_outputs)) self$b <- nn_parameter(torch_zeros(n_outputs)) }, forward = function(x) { torch_addmm(self$b, x, self$W) } ...
/torch/tests/testthat/test-nn.R
no_license
akhikolla/mixed-newfiles
R
false
false
11,404
r
context("nn") test_that("nn_module", { my_net <- nn_module( "my_net", initialize = function(n_inputs, n_outputs) { self$W <- nn_parameter(torch_randn(n_inputs, n_outputs)) self$b <- nn_parameter(torch_zeros(n_outputs)) }, forward = function(x) { torch_addmm(self$b, x, self$W) } ...
original_data <- read.csv("~/Rcode/pm10.csv", header = TRUE, stringsAsFactors = FALSE) #original_data <- read.csv(file.choose(), header = TRUE, stringsAsFactors = FALSE) original_data2 <- original_data[, -c(1, 2)] which(!complete.cases(original_data2)) #返回空,说明没有缺失值 set.seed(2019) select <- sample(1:nrow(or...
/code/101902.R
no_license
ChanJeunlam/r_practice
R
false
false
1,896
r
original_data <- read.csv("~/Rcode/pm10.csv", header = TRUE, stringsAsFactors = FALSE) #original_data <- read.csv(file.choose(), header = TRUE, stringsAsFactors = FALSE) original_data2 <- original_data[, -c(1, 2)] which(!complete.cases(original_data2)) #返回空,说明没有缺失值 set.seed(2019) select <- sample(1:nrow(or...
network.stats.running <- function(property,stats,id='(all networks)',observations='(empty)',lag='0',missing='Ignore',save_as='+++[save_as]_[stat]+++',save_to='None',debug='false'){ l <- as.list(match.call()) l2 <- list() for (i in names(l[-1])) { l2 <- c(l2, eval(dplyr::sym(i))) } names(l2) <- names(l...
/R/network.stats.running.R
no_license
lubospernis/FNA_package
R
false
false
387
r
network.stats.running <- function(property,stats,id='(all networks)',observations='(empty)',lag='0',missing='Ignore',save_as='+++[save_as]_[stat]+++',save_to='None',debug='false'){ l <- as.list(match.call()) l2 <- list() for (i in names(l[-1])) { l2 <- c(l2, eval(dplyr::sym(i))) } names(l2) <- names(l...
# This file is generated by make.paws. Please do not edit here. #' @importFrom paws.common get_config new_operation new_request send_request #' @include licensemanagerusersubscriptions_service.R NULL #' Associates the user to an EC2 instance to utilize user-based #' subscriptions #' #' @description #' Associates the u...
/paws/R/licensemanagerusersubscriptions_operations.R
permissive
paws-r/paws
R
false
false
28,349
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 licensemanagerusersubscriptions_service.R NULL #' Associates the user to an EC2 instance to utilize user-based #' subscriptions #' #' @description #' Associates the u...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/html_identify.scriptstyle.section.R \name{html_identify.scriptstyle.section} \alias{html_identify.scriptstyle.section} \title{html_identify.scriptstyle.section} \usage{ html_identify.scriptstyle.section(x) } \arguments{ \item{Click}{here and ...
/man/html_identify.scriptstyle.section.Rd
no_license
senickel/sebstoolkit2
R
false
true
429
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/html_identify.scriptstyle.section.R \name{html_identify.scriptstyle.section} \alias{html_identify.scriptstyle.section} \title{html_identify.scriptstyle.section} \usage{ html_identify.scriptstyle.section(x) } \arguments{ \item{Click}{here and ...
# This file contains functions for computing counterfactual metrics via doubly-robust estimation. # For axis formatting scale_format <- function(x) { ifelse((x > 0) & (x < 1), sprintf("%.2f", x), sprintf("%.0f", x)) } compute_FNR <- function(t, dat, pred = quo(mu_obs), treat = quo(A), pi = quo(pi), Y = quo(Y), mu...
/doubly_robust_metrics.R
no_license
mandycoston/counterfactual
R
false
false
7,659
r
# This file contains functions for computing counterfactual metrics via doubly-robust estimation. # For axis formatting scale_format <- function(x) { ifelse((x > 0) & (x < 1), sprintf("%.2f", x), sprintf("%.0f", x)) } compute_FNR <- function(t, dat, pred = quo(mu_obs), treat = quo(A), pi = quo(pi), Y = quo(Y), mu...
#-*- R -*- # initialization library(nlme) library(lattice) options(width = 65, digits = 5) options(contrasts = c(unordered = "contr.helmert", ordered = "contr.poly")) pdf(file = 'ch04.pdf') # Chapter 4 Fitting Linear Mixed-Effects Models # 4.1 Fitting Linear Models in S with lm and lmList fm1Orth.lm <- lm(dista...
/nlme/scripts/ch04.R
permissive
solgenomics/R_libs
R
false
false
7,102
r
#-*- R -*- # initialization library(nlme) library(lattice) options(width = 65, digits = 5) options(contrasts = c(unordered = "contr.helmert", ordered = "contr.poly")) pdf(file = 'ch04.pdf') # Chapter 4 Fitting Linear Mixed-Effects Models # 4.1 Fitting Linear Models in S with lm and lmList fm1Orth.lm <- lm(dista...
library(ProFound) library(profvis) library(tictoc) image_big=readFITS(system.file("extdata", 'VIKING/mystery_VIKING_Z.fits', package="ProFound"))$imDat profound=1 for (i in 1:6) { print("double grid size") image_big=rbind(image_big,image_big) image_big=cbind(image_big,image_big) gc() tic(paste("Done pass::",...
/ProFound_example0_large_timing.R
no_license
rtobar/SS19B-Robotham
R
false
false
693
r
library(ProFound) library(profvis) library(tictoc) image_big=readFITS(system.file("extdata", 'VIKING/mystery_VIKING_Z.fits', package="ProFound"))$imDat profound=1 for (i in 1:6) { print("double grid size") image_big=rbind(image_big,image_big) image_big=cbind(image_big,image_big) gc() tic(paste("Done pass::",...
# Multidimensional Scaling # Create a matrix from Iris dataset # We remove the row 143 because is repeated data.mtx <- as.matrix(scale(iris[-143,1:4])) # Obtain a Euclidean Distance matrix d <- dist(data.mtx,method = "euclidean") # Cluster the data with Ward Method hcc <- hclust(d,method = "ward.D") # Define THREE ...
/R-multi_dimensional_scaling/multi_dimensional_scaling.R
no_license
rcruces/R-plots
R
false
false
850
r
# Multidimensional Scaling # Create a matrix from Iris dataset # We remove the row 143 because is repeated data.mtx <- as.matrix(scale(iris[-143,1:4])) # Obtain a Euclidean Distance matrix d <- dist(data.mtx,method = "euclidean") # Cluster the data with Ward Method hcc <- hclust(d,method = "ward.D") # Define THREE ...
################# # SETUP ################# source("/home/user/scripts/libs.R") source("/home/user/scripts/ga/search_api.R") options(googleAuthR.scopes.selected = "https://www.googleapis.com/auth/webmasters") ################# # INITIALIZE ################# sc <- searchConsole$new( auth="/home/user/settings/searc...
/run_search_console.R
no_license
janfait/gawrap
R
false
false
1,190
r
################# # SETUP ################# source("/home/user/scripts/libs.R") source("/home/user/scripts/ga/search_api.R") options(googleAuthR.scopes.selected = "https://www.googleapis.com/auth/webmasters") ################# # INITIALIZE ################# sc <- searchConsole$new( auth="/home/user/settings/searc...
# t-SNE exploration library(CMcCode) library(animation) library(ggplot2) library(tsne) setwd(gsub("/[^/]*$", "", rstudioapi::getActiveDocumentContext()$path)) # setwd("C:/Users/cmcneil/Documents/Projects/Miscellaneous/Personal/tSNE") # source('~/Projects/Miscellaneous/Personal/General Code/UsefulFunctions....
/Methods/Clustering/tSNE/tSNE.R
no_license
chacemcneil/Personal
R
false
false
2,654
r
# t-SNE exploration library(CMcCode) library(animation) library(ggplot2) library(tsne) setwd(gsub("/[^/]*$", "", rstudioapi::getActiveDocumentContext()$path)) # setwd("C:/Users/cmcneil/Documents/Projects/Miscellaneous/Personal/tSNE") # source('~/Projects/Miscellaneous/Personal/General Code/UsefulFunctions....
\name{write.SPAGeDi} \alias{write.SPAGeDi} \title{ Write Genotypes in SPAGeDi Format } \description{ \code{write.SPAGeDi} uses data contained in a \code{genambig} object to create a file that can be read by the software SPAGeDi. The user controls how the genotypes are formatted, and can provide a data fra...
/man/write.SPAGeDi.Rd
no_license
cran/polysat
R
false
false
4,883
rd
\name{write.SPAGeDi} \alias{write.SPAGeDi} \title{ Write Genotypes in SPAGeDi Format } \description{ \code{write.SPAGeDi} uses data contained in a \code{genambig} object to create a file that can be read by the software SPAGeDi. The user controls how the genotypes are formatted, and can provide a data fra...
# rbmBLASTtemplate.R # # Purpose: run a Reciprocal Best Match (RBM) search via the NCBI's # BLAST API. # # ToDo: # Notes: # # ============================================================================== source("my_rbmBLASTutils.R") rbmBLAST <- function(qID, from = 1, ...
/rbmBLASTpseudo.R
no_license
hyginn/R_Exercise-Screenscraping
R
false
false
2,240
r
# rbmBLASTtemplate.R # # Purpose: run a Reciprocal Best Match (RBM) search via the NCBI's # BLAST API. # # ToDo: # Notes: # # ============================================================================== source("my_rbmBLASTutils.R") rbmBLAST <- function(qID, from = 1, ...
library(biovisr) library(miscr) library(vdiffr) set.seed(456) test_matrix <- matrix( c( c(sample(40:60, 10, replace = TRUE), sample(1:20, 10, replace = TRUE)), c(sample(1:20, 10, replace = TRUE), sample(40:60, 10, replace = TRUE)), c(sample(5:25, 10, replace = TRUE), sample(45:65, 10, replace = TRU...
/tests/testthat/test_dendrogram.R
no_license
richysix/biovisr
R
false
false
905
r
library(biovisr) library(miscr) library(vdiffr) set.seed(456) test_matrix <- matrix( c( c(sample(40:60, 10, replace = TRUE), sample(1:20, 10, replace = TRUE)), c(sample(1:20, 10, replace = TRUE), sample(40:60, 10, replace = TRUE)), c(sample(5:25, 10, replace = TRUE), sample(45:65, 10, replace = TRU...
#' @title Remove Anomalous Observation #' #' @description #' Removes the most anomalous observation associated with a data frame. Uses the objects generated in the #' global environment from the prepareData function as arguments and overwrites them with reduced data. This #' allows for iteration. The chiSqrPlot da...
/R/removeAnomaly.R
no_license
Simsala808/MCAC
R
false
false
3,288
r
#' @title Remove Anomalous Observation #' #' @description #' Removes the most anomalous observation associated with a data frame. Uses the objects generated in the #' global environment from the prepareData function as arguments and overwrites them with reduced data. This #' allows for iteration. The chiSqrPlot da...
library(Seurat) ### Name: ValidateSpecificClusters ### Title: Specific Cluster Validation ### Aliases: ValidateSpecificClusters ### ** Examples ## Not run: ##D pbmc_small ##D pbmc_small <- FindClusters(object = pbmc_small, reduction.type = "pca", ##D dims.use = 1:10, resolution = 1.1, sa...
/data/genthat_extracted_code/Seurat/examples/ValidateSpecificClusters.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
497
r
library(Seurat) ### Name: ValidateSpecificClusters ### Title: Specific Cluster Validation ### Aliases: ValidateSpecificClusters ### ** Examples ## Not run: ##D pbmc_small ##D pbmc_small <- FindClusters(object = pbmc_small, reduction.type = "pca", ##D dims.use = 1:10, resolution = 1.1, sa...
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 103585 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 100577 c c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 100577 c c Input Parameter (command lin...
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Gent-Rowley/Connect3/cf_3_8x6_r_/cf_3_8x6_r_.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
23,386
r
c DCNF-Autarky [version 0.0.1]. c Copyright (c) 2018-2019 Swansea University. c c Input Clause Count: 103585 c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 100577 c c Performing E1-Autarky iteration. c Remaining clauses count after E-Reduction: 100577 c c Input Parameter (command lin...
library(shinyjs) ### Name: html ### Title: Change the HTML (or text) inside an element ### Aliases: html ### ** Examples if (interactive()) { library(shiny) shinyApp( ui = fluidPage( useShinyjs(), # Set up shinyjs actionButton("btn", "Click me"), p(id = "element", "Watch what happens to ...
/data/genthat_extracted_code/shinyjs/examples/html.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
963
r
library(shinyjs) ### Name: html ### Title: Change the HTML (or text) inside an element ### Aliases: html ### ** Examples if (interactive()) { library(shiny) shinyApp( ui = fluidPage( useShinyjs(), # Set up shinyjs actionButton("btn", "Click me"), p(id = "element", "Watch what happens to ...
library(shiny) # Define UI for application that plots random distributions shinyUI(fluidPage( navbarPage("API TREINAMENTO", sidebarPanel( uiOutput("songs_beatles"), actionButton("bt_bsongs_all", label="Seleciona Todos"), ...
/app.api.train/ui.R
no_license
tldrafael/AzurePresentationWithShinyApp
R
false
false
2,024
r
library(shiny) # Define UI for application that plots random distributions shinyUI(fluidPage( navbarPage("API TREINAMENTO", sidebarPanel( uiOutput("songs_beatles"), actionButton("bt_bsongs_all", label="Seleciona Todos"), ...
#Fonction pour le Crible d'Ératosthène. #Groupe : Jehanno Clément, Caillaud Pierre, Duclos Romain CJehanno <- function(limit){ list = seq(2,limit,1) ### je génère tout #Opti aEnlever = c() ### future liste à remove for (x in list){ for(y in list){ if(x!=y){ ### en parcourant tout si je me re...
/R/R_Duclos.r
no_license
loic44650/LPHN
R
false
false
595
r
#Fonction pour le Crible d'Ératosthène. #Groupe : Jehanno Clément, Caillaud Pierre, Duclos Romain CJehanno <- function(limit){ list = seq(2,limit,1) ### je génère tout #Opti aEnlever = c() ### future liste à remove for (x in list){ for(y in list){ if(x!=y){ ### en parcourant tout si je me re...
with(ac7f4f61b2a8b42f8bd99601bd750395c, {ROOT <- 'D:/SEMOSS_v4.0.0_x64/SEMOSS_v4.0.0_x64/semosshome/db/Atadata2__3b3e4a3b-d382-4e98-9950-9b4e8b308c1c/version/7abb3a95-e186-4fd2-b86c-b07dad5dbfdb';rm(list=ls())});
/7abb3a95-e186-4fd2-b86c-b07dad5dbfdb/R/Temp/aAFrOQFjh3Wu1.R
no_license
ayanmanna8/test
R
false
false
212
r
with(ac7f4f61b2a8b42f8bd99601bd750395c, {ROOT <- 'D:/SEMOSS_v4.0.0_x64/SEMOSS_v4.0.0_x64/semosshome/db/Atadata2__3b3e4a3b-d382-4e98-9950-9b4e8b308c1c/version/7abb3a95-e186-4fd2-b86c-b07dad5dbfdb';rm(list=ls())});
library(DiagrammeR) ### Name: recode_node_attrs ### Title: Recode a set of node attribute values ### Aliases: recode_node_attrs ### ** Examples # Create a random graph using the # `add_gnm_graph()` function graph <- create_graph() %>% add_gnm_graph( n = 5, m = 10, set_seed = 23) %>% set_node_attrs...
/data/genthat_extracted_code/DiagrammeR/examples/recode_node_attrs.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
1,320
r
library(DiagrammeR) ### Name: recode_node_attrs ### Title: Recode a set of node attribute values ### Aliases: recode_node_attrs ### ** Examples # Create a random graph using the # `add_gnm_graph()` function graph <- create_graph() %>% add_gnm_graph( n = 5, m = 10, set_seed = 23) %>% set_node_attrs...
# Import Data # df <- read.csv("E:/My Dictionary/Using R/Data/Movie_regression.csv") View(df) # Data Preprocessing # summary(df) #there are missing values in variable Time_taken df$Time_taken[is.na(df$Time_taken)] <- mean(df$Time_taken,na.rm = TRUE) # Test-Train Split install.packages('caTools') library(caT...
/Regression with Support Vector Machine.R
no_license
FitriaNurAida/Regression-with-SVR
R
false
false
788
r
# Import Data # df <- read.csv("E:/My Dictionary/Using R/Data/Movie_regression.csv") View(df) # Data Preprocessing # summary(df) #there are missing values in variable Time_taken df$Time_taken[is.na(df$Time_taken)] <- mean(df$Time_taken,na.rm = TRUE) # Test-Train Split install.packages('caTools') library(caT...
print.est.stratified.pscore <- function(x, ...) { object <- x cat("\n Effect estimation for treatment/exposure on outcome \n") cat("\n Treatment/exposure:", object$name.treat) cat("\n Outcome:", object$name.resp) if( object$family == "binomial" ){ cat("\n Effe...
/R/print.est.stratified.pscore.R
no_license
cran/nonrandom
R
false
false
5,586
r
print.est.stratified.pscore <- function(x, ...) { object <- x cat("\n Effect estimation for treatment/exposure on outcome \n") cat("\n Treatment/exposure:", object$name.treat) cat("\n Outcome:", object$name.resp) if( object$family == "binomial" ){ cat("\n Effe...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/diagnostic_AM.R \name{prelim_AM} \alias{prelim_AM} \title{Preliminary Assessments in MSE} \usage{ prelim_AM(x, Assess, ncpus = NULL, ...) } \arguments{ \item{x}{Either a \code{Hist}, \code{Data} or \code{OM} object.} \item{Assess}{An Assess ...
/man/prelim_AM.Rd
no_license
tcarruth/MSEtool
R
false
true
1,047
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/diagnostic_AM.R \name{prelim_AM} \alias{prelim_AM} \title{Preliminary Assessments in MSE} \usage{ prelim_AM(x, Assess, ncpus = NULL, ...) } \arguments{ \item{x}{Either a \code{Hist}, \code{Data} or \code{OM} object.} \item{Assess}{An Assess ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cbioportal_trasefer.R \name{fusions2oncoprinter} \alias{fusions2oncoprinter} \title{Function to convert mutation data to Oncoprinter \url{http://www.cbioportal.org/oncoprinter.jsp} input format.} \usage{ fusions2oncoprinter(input_data, input_...
/man/fusions2oncoprinter.Rd
permissive
zcm2403/ngstk
R
false
true
2,372
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cbioportal_trasefer.R \name{fusions2oncoprinter} \alias{fusions2oncoprinter} \title{Function to convert mutation data to Oncoprinter \url{http://www.cbioportal.org/oncoprinter.jsp} input format.} \usage{ fusions2oncoprinter(input_data, input_...
source("~/Work/code/bugsim/src/R/archive/probability/Probability Library.r", echo=FALSE) source("~/Work/code/bugsim/src/R/archive/probability/Box Counting Library.r", echo=FALSE) source("~/Work/code/bugsim/src/R/archive/Geometry Library.r", echo=FALSE) cat("Fractal Resource Distribution Library (v1.0)\n") frez.plotUpp...
/src/main/R/thesis/common/fractals/Fractal Resource Distribution Library.r
no_license
jimbarritt/bugsim
R
false
false
6,243
r
source("~/Work/code/bugsim/src/R/archive/probability/Probability Library.r", echo=FALSE) source("~/Work/code/bugsim/src/R/archive/probability/Box Counting Library.r", echo=FALSE) source("~/Work/code/bugsim/src/R/archive/Geometry Library.r", echo=FALSE) cat("Fractal Resource Distribution Library (v1.0)\n") frez.plotUpp...
# Let's define the colors for the Add Methods: colors7 <- c("black", "deepskyblue2", "orange", "olivedrab", "red", "slateblue4", "deeppink3") colors7 <- c("black", "deepskyblue2", "deeppink2", "olivedrab", "red", "slateblue4", "deeppink4") colors7 <- c("black", "deepskyblue2", "orange", "olivedrab", "red", "slateblue4"...
/paper_figures_filtered/generate.dot.plot.R
no_license
Jfortin1/funnorm_repro
R
false
false
2,188
r
# Let's define the colors for the Add Methods: colors7 <- c("black", "deepskyblue2", "orange", "olivedrab", "red", "slateblue4", "deeppink3") colors7 <- c("black", "deepskyblue2", "deeppink2", "olivedrab", "red", "slateblue4", "deeppink4") colors7 <- c("black", "deepskyblue2", "orange", "olivedrab", "red", "slateblue4"...
library(DBI) source("functions.R", local = TRUE) function(input, output, session) { config <- config::get() con <- dbConnect( RPostgres::Postgres(), dbname = config$database_name, host = config$database_host, port = config$database_port, user = config$database_user, password = config$data...
/server.R
no_license
ryushida/shinymoney
R
false
false
10,848
r
library(DBI) source("functions.R", local = TRUE) function(input, output, session) { config <- config::get() con <- dbConnect( RPostgres::Postgres(), dbname = config$database_name, host = config$database_host, port = config$database_port, user = config$database_user, password = config$data...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/set_labels.R \name{set_labels} \alias{set_labels} \title{Add value labels to variables} \usage{ set_labels(x, ..., labels, force.labels = FALSE, force.values = TRUE, drop.na = TRUE) } \arguments{ \item{x}{A vector or data frame.} \item{......
/man/set_labels.Rd
no_license
mkim0710/sjlabelled
R
false
true
6,977
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/set_labels.R \name{set_labels} \alias{set_labels} \title{Add value labels to variables} \usage{ set_labels(x, ..., labels, force.labels = FALSE, force.values = TRUE, drop.na = TRUE) } \arguments{ \item{x}{A vector or data frame.} \item{......
/随机森林 decision tree.R
no_license
kathylai/kkk
R
false
false
3,701
r
context("cluster creation") test_that("create cluster", { cl_name <- tempfile() cl <- cluster_create(cl_name) expect_true(file.exists(file.path(cl_name, sprintf("%s.q", basename(cl_name))))) expe...
/tests/testthat/test-create.R
no_license
KirosG/threadpool
R
false
false
355
r
context("cluster creation") test_that("create cluster", { cl_name <- tempfile() cl <- cluster_create(cl_name) expect_true(file.exists(file.path(cl_name, sprintf("%s.q", basename(cl_name))))) expe...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DataDistribution.R \docType{class} \name{DataDistribution-class} \alias{DataDistribution-class} \alias{DataDistribution} \title{Data distributions} \arguments{ \item{x}{outcome} \item{n}{sample size} \item{theta}{distribution parameter} \i...
/man/DataDistribution-class.Rd
permissive
kkmann/adoptr
R
false
true
1,274
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/DataDistribution.R \docType{class} \name{DataDistribution-class} \alias{DataDistribution-class} \alias{DataDistribution} \title{Data distributions} \arguments{ \item{x}{outcome} \item{n}{sample size} \item{theta}{distribution parameter} \i...
/Introduccion_programacion_ciencia_de_datos/R/strings.R
no_license
carmenbiedma/Master-Ciencia-De-Datos
R
false
false
1,934
r
library(tidyverse) library(pdftools) library(stringr) options(digits = 3) # report 3 significant digits # Question 8 tail_index <- s %>% str_which("Total") tail_index # Question 9 n <- s %>% str_count(pattern = '\\d+') sum(n == 1) # Question 10 removeIndices <- c(1:header_index, which(n==1), tail_index:length(s))...
/06-Wrangling/05-FinalAssessment/02FinalAssessment.r
no_license
imoralesgt/edXDataScience
R
false
false
624
r
library(tidyverse) library(pdftools) library(stringr) options(digits = 3) # report 3 significant digits # Question 8 tail_index <- s %>% str_which("Total") tail_index # Question 9 n <- s %>% str_count(pattern = '\\d+') sum(n == 1) # Question 10 removeIndices <- c(1:header_index, which(n==1), tail_index:length(s))...
#!/usr/bin/env Rscript --vanilla library(tidyverse) library(lme4) source("utils.R") # fixed effects model fixed_model <- glm(cure ~ delivery + severity, family = "binomial", data = fuf) # mixed model and confidence intervals model <- glmer(cure ~ delivery + severity + (1 | partner) + (1 | donor), family = "binomial...
/run-models.R
no_license
openbiome/cdi-donor-effects
R
false
false
778
r
#!/usr/bin/env Rscript --vanilla library(tidyverse) library(lme4) source("utils.R") # fixed effects model fixed_model <- glm(cure ~ delivery + severity, family = "binomial", data = fuf) # mixed model and confidence intervals model <- glmer(cure ~ delivery + severity + (1 | partner) + (1 | donor), family = "binomial...
library(dplyr) library(naniar) library(kableExtra) library(ggplot2) library(gridExtra) library(plyr) library(pROC) library(tidyr) library(dummies) library(randomForest) kredyt <- read.csv("C:/Users/Esterka/Desktop/kredyt_indie.csv", sep = ";", dec = ".") kredyt[kredyt==""] <- NA #statystyki opisowe s...
/Credit Scoring.R
no_license
EsteraSaidlo/Credit-Scoring
R
false
false
7,378
r
library(dplyr) library(naniar) library(kableExtra) library(ggplot2) library(gridExtra) library(plyr) library(pROC) library(tidyr) library(dummies) library(randomForest) kredyt <- read.csv("C:/Users/Esterka/Desktop/kredyt_indie.csv", sep = ";", dec = ".") kredyt[kredyt==""] <- NA #statystyki opisowe s...
library(elliptical) context("Perimeter") test_that("perimeter of a circle", { expect_equal(ellipse_perimeter (1), 2 * pi) expect_equal(ellipse_perimeter (3), 2 * pi * 3) })
/tests/testthat/testpackages.R
no_license
marylin34/createdata
R
false
false
179
r
library(elliptical) context("Perimeter") test_that("perimeter of a circle", { expect_equal(ellipse_perimeter (1), 2 * pi) expect_equal(ellipse_perimeter (3), 2 * pi * 3) })
# =============================================================== # Author: Michael O'Flaherty (michael@oflaherty.com) # Create date: 7/10/2014 # # Description: Forked repository from # https://github.com/rdpeng/ExData_Plotting1 # to https://github.com/moflaherty/ExData_Plotting1 #...
/plot2.R
no_license
moflaherty/ExData_Plotting1
R
false
false
3,115
r
# =============================================================== # Author: Michael O'Flaherty (michael@oflaherty.com) # Create date: 7/10/2014 # # Description: Forked repository from # https://github.com/rdpeng/ExData_Plotting1 # to https://github.com/moflaherty/ExData_Plotting1 #...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plots.R \name{gg.manhattan} \alias{gg.manhattan} \title{Manhattan plot function for gwas (stolen from pcgoddard)} \usage{ gg.manhattan( df, hlight, col = "default", title = "Manhattan", SNP = "SNP", CHR = "CHR", BP = "BP", P =...
/man/gg.manhattan.Rd
permissive
thomasbattram/usefunc
R
false
true
1,267
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plots.R \name{gg.manhattan} \alias{gg.manhattan} \title{Manhattan plot function for gwas (stolen from pcgoddard)} \usage{ gg.manhattan( df, hlight, col = "default", title = "Manhattan", SNP = "SNP", CHR = "CHR", BP = "BP", P =...