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
m <- matrix(c(1,2,3,4) , 2,2,T) m # Yanlış kullanım m[ , 3] <- c(1,2) # Doğru kullanım cbind(m , c(1,2)) rbind(m , c(1,2)) cbind(m , c(1,2 ,3)) rbind(m , c(1,2 , 3)) m <- cbind(m , c(1,2)) m <- rbind(m , c(1,2 , 3 , 5)) m
/Bölüm 02 - Veri Yapılarından Eleman Seçimi /2.11 - Matrislere satır ve sütun ekleme.R
no_license
sudedanisman/RUdemy
R
false
false
234
r
m <- matrix(c(1,2,3,4) , 2,2,T) m # Yanlış kullanım m[ , 3] <- c(1,2) # Doğru kullanım cbind(m , c(1,2)) rbind(m , c(1,2)) cbind(m , c(1,2 ,3)) rbind(m , c(1,2 , 3)) m <- cbind(m , c(1,2)) m <- rbind(m , c(1,2 , 3 , 5)) m
\name{taxize_capwords} \alias{taxize_capwords} \title{Capitalize the first letter of a character string.} \usage{ taxize_capwords(s, strict = FALSE, onlyfirst = FALSE) } \arguments{ \item{s}{A character string} \item{strict}{Should the algorithm be strict about capitalizing. Defaults to FALSE.} \item{onlyfir...
/man/taxize_capwords.Rd
permissive
dlebauer/taxize_
R
false
false
605
rd
\name{taxize_capwords} \alias{taxize_capwords} \title{Capitalize the first letter of a character string.} \usage{ taxize_capwords(s, strict = FALSE, onlyfirst = FALSE) } \arguments{ \item{s}{A character string} \item{strict}{Should the algorithm be strict about capitalizing. Defaults to FALSE.} \item{onlyfir...
# making table data sets library(dplyr) library(tidyr) library(MorpheusData) #############benchmark 1 dat <- read.table(text= "Name Month Rate1 Rate2 Aira 1 12 23 Aira 2 18 73 Ben 1 53 19 Ben 2 22 87 Cat 1 22 87 Cat ...
/P8.R
permissive
boyland-pf/MorpheusData
R
false
false
1,313
r
# making table data sets library(dplyr) library(tidyr) library(MorpheusData) #############benchmark 1 dat <- read.table(text= "Name Month Rate1 Rate2 Aira 1 12 23 Aira 2 18 73 Ben 1 53 19 Ben 2 22 87 Cat 1 22 87 Cat ...
## Download and unzip zip file from url download <- function(linkzip, destfile, dirname){ download.file(url= linkzip, destfile, method = 'auto') unzip(destfile, exdir= paste0("data/", dirname)) }
/R/download.R
permissive
ingetjuh123/Lesson06-Geoscripting
R
false
false
203
r
## Download and unzip zip file from url download <- function(linkzip, destfile, dirname){ download.file(url= linkzip, destfile, method = 'auto') unzip(destfile, exdir= paste0("data/", dirname)) }
\name{OLE} \alias{OLE} \alias{OLE.fun} \title{Optimal linear estimation} \description{ A function that calculates the predcted date of extinction using the optimal lienar estimation technique proposed by Roberts and Solow (2003) and Solow (2005). Differs from other techniques in this package as it requires only data to...
/man/OLE.Rd
no_license
cran/sExtinct
R
false
false
1,778
rd
\name{OLE} \alias{OLE} \alias{OLE.fun} \title{Optimal linear estimation} \description{ A function that calculates the predcted date of extinction using the optimal lienar estimation technique proposed by Roberts and Solow (2003) and Solow (2005). Differs from other techniques in this package as it requires only data to...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/memberships.R \name{fetch_roles_for_member} \alias{fetch_roles_for_member} \title{Fetch data on the current and former committee roles of a given member} \usage{ fetch_roles_for_member(member) } \arguments{ \item{member}{An integer representi...
/man/fetch_roles_for_member.Rd
permissive
houseofcommonslibrary/clcommittees
R
false
true
937
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/memberships.R \name{fetch_roles_for_member} \alias{fetch_roles_for_member} \title{Fetch data on the current and former committee roles of a given member} \usage{ fetch_roles_for_member(member) } \arguments{ \item{member}{An integer representi...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/LomanNJ_2013_Hi.R \name{LomanNJ_2013_Hi} \alias{LomanNJ_2013_Hi} \alias{LomanNJ_2013_Hi.genefamilies_relab.stool} \alias{LomanNJ_2013_Hi.marker_abundance.stool} \alias{LomanNJ_2013_Hi.marker_presence.stool} \alias{LomanNJ_2013_Hi.metaphlan_bu...
/man/LomanNJ_2013_Hi.Rd
permissive
edoardopasolli/curatedMetagenomicData
R
false
true
2,445
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/LomanNJ_2013_Hi.R \name{LomanNJ_2013_Hi} \alias{LomanNJ_2013_Hi} \alias{LomanNJ_2013_Hi.genefamilies_relab.stool} \alias{LomanNJ_2013_Hi.marker_abundance.stool} \alias{LomanNJ_2013_Hi.marker_presence.stool} \alias{LomanNJ_2013_Hi.metaphlan_bu...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pystr_makestrans.R \name{pystr_maketrans} \alias{pystr_maketrans} \title{Create a character map.} \usage{ pystr_maketrans(x, y) } \arguments{ \item{x}{A string.} \item{y}{A string.} } \value{ A list of character mappings for use in \code{\li...
/man/pystr_maketrans.Rd
no_license
ChrisMuir/pystr
R
false
true
837
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/pystr_makestrans.R \name{pystr_maketrans} \alias{pystr_maketrans} \title{Create a character map.} \usage{ pystr_maketrans(x, y) } \arguments{ \item{x}{A string.} \item{y}{A string.} } \value{ A list of character mappings for use in \code{\li...
\name{blend} \alias{blend} \alias{blend.list} \alias{blend.character} \alias{print.blended.landscape} \alias{plot.blended.landscape} \alias{print.blended.landscape.bundle} \alias{plot.blended.landscape.bundle} \alias{blended.landscape} \alias{blended.landscape.bundle} \title{ Calculate biotic homogenization using Ja...
/man/blend.Rd
no_license
davharris/blender
R
false
false
6,925
rd
\name{blend} \alias{blend} \alias{blend.list} \alias{blend.character} \alias{print.blended.landscape} \alias{plot.blended.landscape} \alias{print.blended.landscape.bundle} \alias{plot.blended.landscape.bundle} \alias{blended.landscape} \alias{blended.landscape.bundle} \title{ Calculate biotic homogenization using Ja...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/user-get.R \name{get_ntaxa} \alias{get_ntaxa} \title{Count number of unique taxa} \usage{ get_ntaxa(phylota, cid = NULL, sid = NULL, rnk = NULL, keep_higher = FALSE) } \arguments{ \item{phylota}{Phylota object} \item{cid}{Cluster ID(s)} \...
/man/get_ntaxa.Rd
permissive
haithamsghaier/phylotaR
R
false
true
1,726
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/user-get.R \name{get_ntaxa} \alias{get_ntaxa} \title{Count number of unique taxa} \usage{ get_ntaxa(phylota, cid = NULL, sid = NULL, rnk = NULL, keep_higher = FALSE) } \arguments{ \item{phylota}{Phylota object} \item{cid}{Cluster ID(s)} \...
library(officer) my_pres <- read_pptx() add_slide(my_pres, layout = "Title and Content", master = "Office Theme") ph_with_text(my_pres, type = "title", str = "A title", index = 1) ph_with_text(my_pres, type = "ftr", str = "A footer")
/OldScripts/test_officer.R
no_license
Roleren/RCode
R
false
false
236
r
library(officer) my_pres <- read_pptx() add_slide(my_pres, layout = "Title and Content", master = "Office Theme") ph_with_text(my_pres, type = "title", str = "A title", index = 1) ph_with_text(my_pres, type = "ftr", str = "A footer")
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/featurefinder.r \docType{data} \name{dat} \alias{dat} \title{dat} \format{A data frame with 234 rows and 11 variables} \source{ \url{ggplot2.org} } \description{ Sample data based on dataset mpg in the ggplot2 package } \examples{ data(dat) h...
/man/dat.Rd
no_license
cran/featurefinder
R
false
true
403
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/featurefinder.r \docType{data} \name{dat} \alias{dat} \title{dat} \format{A data frame with 234 rows and 11 variables} \source{ \url{ggplot2.org} } \description{ Sample data based on dataset mpg in the ggplot2 package } \examples{ data(dat) h...
goodreads_GET <- function(path, site = "goodreads", page = 1, num_pages = 1, ...) { # auth <- github_auth(pat) base_path <- "https://www.goodreads.com/" query <- list(site = site, page = page, ...) goodreads_key <- Sys.getenv("GOODREADS_KEY") # goodreads_key <- "gYWXsF4VUU2YcXkKryosbA" if (goodreads_key...
/R/functions.R
no_license
jenitivecase/Goodreads_tools
R
false
false
3,823
r
goodreads_GET <- function(path, site = "goodreads", page = 1, num_pages = 1, ...) { # auth <- github_auth(pat) base_path <- "https://www.goodreads.com/" query <- list(site = site, page = page, ...) goodreads_key <- Sys.getenv("GOODREADS_KEY") # goodreads_key <- "gYWXsF4VUU2YcXkKryosbA" if (goodreads_key...
/BEMTOOL-ver2.5-2018_0901/src/hr/plot/plotEstimatedVC.r
no_license
gresci/BEMTOOL2.5
R
false
false
8,213
r
dat<-read.csv("D:/Spring 2017/Project/DFR_Data_FY2016.csv",header=T) report<-read.csv("D:/Spring 2017/Project/ESRD_Dialysis_Adequacy.csv",header=T) library(data.table) d1<-data.table(dat) d2<-data.table(report) # set the ON clause as keys of the tables: setkey(d1,provname) setkey(d2,FacilityName) # perform ...
/procode.R
no_license
amruta-chavan/SPR2017
R
false
false
1,549
r
dat<-read.csv("D:/Spring 2017/Project/DFR_Data_FY2016.csv",header=T) report<-read.csv("D:/Spring 2017/Project/ESRD_Dialysis_Adequacy.csv",header=T) library(data.table) d1<-data.table(dat) d2<-data.table(report) # set the ON clause as keys of the tables: setkey(d1,provname) setkey(d2,FacilityName) # perform ...
#!/usr/bin/env Rscript #filter SNP data library(data.table,lib.loc="~/R/x86_64-pc-linux-gnu-library/3.3") library(sas7bdat) filterimput=function(chr,colscore=10,colmaf=9,scorecutoff=0.3,mafcutoff=0.05,outfolder="/fh/fast/stanford_j/Xiaoyu/QTL/result/filtered_imputation", prefix="icogs") { librar...
/qtlfunctions_TCGA_tumors_usetumorgenotype.R
no_license
xwang234/qtl
R
false
false
52,014
r
#!/usr/bin/env Rscript #filter SNP data library(data.table,lib.loc="~/R/x86_64-pc-linux-gnu-library/3.3") library(sas7bdat) filterimput=function(chr,colscore=10,colmaf=9,scorecutoff=0.3,mafcutoff=0.05,outfolder="/fh/fast/stanford_j/Xiaoyu/QTL/result/filtered_imputation", prefix="icogs") { librar...
### Community characterisation ### 15 Aug # Load packages library(igraph) library(colorspace) library(RColorBrewer) library(viridis) library(pheatmap) library(RColorBrewer) library(tidyverse) # Initialise rm(list=ls()) path=dirname(rstudioapi::getActiveDocumentContext()$path) setwd(path) # Load custom source("functi...
/Scripts/10-community_characterisation.R
no_license
adawnir/Dissertation
R
false
false
4,973
r
### Community characterisation ### 15 Aug # Load packages library(igraph) library(colorspace) library(RColorBrewer) library(viridis) library(pheatmap) library(RColorBrewer) library(tidyverse) # Initialise rm(list=ls()) path=dirname(rstudioapi::getActiveDocumentContext()$path) setwd(path) # Load custom source("functi...
fluidPage( fluidRow(box(sliderInput("treshold_kolmo", "Choix du seuil du test de Kolmogorov-Smirnoff:", min=0.005, max=0.2, step=0.005, value=0.05), collapsible = TRUE, collapsed = TRUE, title="Option avancée du test", width = 12)), fluidRow( ...
/MLOpsMonitoring/inst/app/src/ui/features_ui.R
no_license
datastorm-open/demo_webinar_mlops
R
false
false
1,194
r
fluidPage( fluidRow(box(sliderInput("treshold_kolmo", "Choix du seuil du test de Kolmogorov-Smirnoff:", min=0.005, max=0.2, step=0.005, value=0.05), collapsible = TRUE, collapsed = TRUE, title="Option avancée du test", width = 12)), fluidRow( ...
#' TITLE #' #' DETAIL #' @param rc xxx #' @param DT xxx #' @param tvals xxx #' @param type xxx #' @export #' @return xxx test_classification <- function(rc, DT, noncalls, tvals, type) { rc_noncalls <- rc rc_noncalls$votes <- rc$votes[, noncalls] rc_noncalls$m <- ncol(rc_noncalls$votes) p <- emIRT::makePriors(rc...
/old/functions.R
no_license
Hershberger/partycalls
R
false
false
21,155
r
#' TITLE #' #' DETAIL #' @param rc xxx #' @param DT xxx #' @param tvals xxx #' @param type xxx #' @export #' @return xxx test_classification <- function(rc, DT, noncalls, tvals, type) { rc_noncalls <- rc rc_noncalls$votes <- rc$votes[, noncalls] rc_noncalls$m <- ncol(rc_noncalls$votes) p <- emIRT::makePriors(rc...
############################################################################## ## This function is adapted/modified based on the plot function ## from the `glmnet` package: ## ## Jerome Friedman, Trevor Hastie, Robert Tibshirani (2010). ## Regularization Paths for Generalized Linear Models via Coordinate Descent. ## Jo...
/SALES/R/plot.cv.cpernet.R
no_license
knightgu/SALES
R
false
false
2,538
r
############################################################################## ## This function is adapted/modified based on the plot function ## from the `glmnet` package: ## ## Jerome Friedman, Trevor Hastie, Robert Tibshirani (2010). ## Regularization Paths for Generalized Linear Models via Coordinate Descent. ## Jo...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AuxGeometry.R \name{Line} \alias{Line} \title{The line joining two distinct 2D points \code{a} and \code{b}} \usage{ Line(a, b, x) } \arguments{ \item{a, b}{2D points that determine the straight line (i.e., through which the straight line pas...
/man/Line.Rd
no_license
elvanceyhan/pcds
R
false
true
3,628
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/AuxGeometry.R \name{Line} \alias{Line} \title{The line joining two distinct 2D points \code{a} and \code{b}} \usage{ Line(a, b, x) } \arguments{ \item{a, b}{2D points that determine the straight line (i.e., through which the straight line pas...
/r_test.R
no_license
kuei518/R
R
false
false
604
r
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/graph_measures.R \name{graph_measures} \alias{graph_measures} \alias{graph_adhesion} \alias{graph_assortativity} \alias{graph_automorphisms} \alias{graph_clique_num} \alias{graph_clique_count} \alias{graph_component_count} \alias{graph_motif_...
/man/graph_measures.Rd
no_license
zhaoxiaohe/tidygraph
R
false
true
6,621
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/graph_measures.R \name{graph_measures} \alias{graph_measures} \alias{graph_adhesion} \alias{graph_assortativity} \alias{graph_automorphisms} \alias{graph_clique_num} \alias{graph_clique_count} \alias{graph_component_count} \alias{graph_motif_...
# Calories_consumed data library(readr) cal <- read_csv("C:/Users/Agnelo Christy/Desktop/Data Science!/Assignment 4 - Simple Linear Regression/calories_consumed.csv") View(cal) attach(cal) # Assigning two vairables into x and y x <- cal$`Calories Consumed` x y <- cal$`Weight gained (grams)` ...
/calories_consumed.R
no_license
sandeepnjois/ds
R
false
false
748
r
# Calories_consumed data library(readr) cal <- read_csv("C:/Users/Agnelo Christy/Desktop/Data Science!/Assignment 4 - Simple Linear Regression/calories_consumed.csv") View(cal) attach(cal) # Assigning two vairables into x and y x <- cal$`Calories Consumed` x y <- cal$`Weight gained (grams)` ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/exports.R \name{md.survtime} \alias{md.survtime} \title{Initializes the missDeaths population table cache} \usage{ md.survtime(year, age, prob, sex) } \arguments{ \item{year}{year} \item{age}{age} \item{prob}{prob} \item{sex...
/man/md.survtime.Rd
no_license
cran/missDeaths
R
false
true
420
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/exports.R \name{md.survtime} \alias{md.survtime} \title{Initializes the missDeaths population table cache} \usage{ md.survtime(year, age, prob, sex) } \arguments{ \item{year}{year} \item{age}{age} \item{prob}{prob} \item{sex...
#================================================================== #[男女] 再検討 #================================================================== danjo_h28 <- read.csv("~/Desktop/R/danjo_csv/danjo_h28.csv", fileEncoding="CP932", header=TRUE, quote="\"") danjo_h27 <- read.csv("~/Desktop/R/danjo_csv/danjo_h27.csv", file...
/保育士の政策評価v3.R
no_license
ujou812/Art-of-R-programing
R
false
false
23,565
r
#================================================================== #[男女] 再検討 #================================================================== danjo_h28 <- read.csv("~/Desktop/R/danjo_csv/danjo_h28.csv", fileEncoding="CP932", header=TRUE, quote="\"") danjo_h27 <- read.csv("~/Desktop/R/danjo_csv/danjo_h27.csv", file...
library(fpp) library(fpp2) library(ggplot2) #Plotting a time series for India new = Dataset[Dataset$Country == "India",] View(new) ts_in=ts(new$AverageTemperature,start=c(1980,1),end=c(2012,1),frequency=12) autoplot(ts_in)+ ggtitle('Temperature rise')+ xlab('Year')+ ylab('Temperature') # PLotti...
/Surface_temperature.R
no_license
Astromohan/Forecasting-Earth-s-Surface-Temperature
R
false
false
2,959
r
library(fpp) library(fpp2) library(ggplot2) #Plotting a time series for India new = Dataset[Dataset$Country == "India",] View(new) ts_in=ts(new$AverageTemperature,start=c(1980,1),end=c(2012,1),frequency=12) autoplot(ts_in)+ ggtitle('Temperature rise')+ xlab('Year')+ ylab('Temperature') # PLotti...
findFastqDump <- function(..., commandName='fastq-dump', versionPattern=".*fastq-dump[ ]*:[ ]*([0-9.]+)", verbose=FALSE) { # Argument 'verbose': verbose <- Arguments$getVerbose(verbose) if (verbose) { pushState(verbose) on.exit(...
/R/findFastqDump.R
no_license
HenrikBengtsson/aroma.seq
R
false
false
592
r
findFastqDump <- function(..., commandName='fastq-dump', versionPattern=".*fastq-dump[ ]*:[ ]*([0-9.]+)", verbose=FALSE) { # Argument 'verbose': verbose <- Arguments$getVerbose(verbose) if (verbose) { pushState(verbose) on.exit(...
day_list <- c("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday") #day_list <- c("Sunday", "Monday") for(i in day_list){ rmarkdown::render("ST558 Project 2.Rmd", params = list(day_of_week = i), output_file = paste0("Report-", i)) }
/render_files.R
no_license
cristagregg/st558_project2
R
false
false
282
r
day_list <- c("Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday") #day_list <- c("Sunday", "Monday") for(i in day_list){ rmarkdown::render("ST558 Project 2.Rmd", params = list(day_of_week = i), output_file = paste0("Report-", i)) }
calculate_thresholds <- function(df) { df %>% mutate(thresholds = map(same_slope, . %>% tidy() %>% dplyr::select(term, estimate) %>% spread(term, estimate) %>% mutate(Small = - sizeSmall / lo...
/R/calculate_thresholds.R
no_license
danilinares/calibration
R
false
false
679
r
calculate_thresholds <- function(df) { df %>% mutate(thresholds = map(same_slope, . %>% tidy() %>% dplyr::select(term, estimate) %>% spread(term, estimate) %>% mutate(Small = - sizeSmall / lo...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/methods.R \name{leaveOneOut.Kriging} \alias{leaveOneOut.Kriging} \alias{leaveOneOut,Kriging,Kriging-method} \title{Compute leave-One-Out of Kriging model} \usage{ \method{leaveOneOut}{Kriging}(object, theta, grad = FALSE) } \arguments{ \item{...
/bindings/R/rlibkriging/man/leaveOneOut.Kriging.Rd
permissive
haveneer/libKriging
R
false
true
914
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/methods.R \name{leaveOneOut.Kriging} \alias{leaveOneOut.Kriging} \alias{leaveOneOut,Kriging,Kriging-method} \title{Compute leave-One-Out of Kriging model} \usage{ \method{leaveOneOut}{Kriging}(object, theta, grad = FALSE) } \arguments{ \item{...
8d7e15f046e1dc528e28986da40a09a2 dungeon_i25-m12-u3-v0.pddl_planlen=118.qdimacs 84369 798701
/code/dcnf-ankit-optimized/Results/QBFLIB-2018/A1/Database/Kronegger-Pfandler-Pichler/dungeon/dungeon_i25-m12-u3-v0.pddl_planlen=118/dungeon_i25-m12-u3-v0.pddl_planlen=118.R
no_license
arey0pushpa/dcnf-autarky
R
false
false
92
r
8d7e15f046e1dc528e28986da40a09a2 dungeon_i25-m12-u3-v0.pddl_planlen=118.qdimacs 84369 798701
#' Copy the calibrated Atlantis model for Fmsy simulation. #' #' @description Create the folder AtlantisMSY in the working directory #' \code{folder_path} and a sub-folder named after the functional group code #' \code{func_grp} for the set of simulation. It copies/pastes inside it the #' files necessary to run A...
/R/atlantisfmsy_simudir.R
no_license
rgirardi/atlantisfmsy
R
false
false
12,753
r
#' Copy the calibrated Atlantis model for Fmsy simulation. #' #' @description Create the folder AtlantisMSY in the working directory #' \code{folder_path} and a sub-folder named after the functional group code #' \code{func_grp} for the set of simulation. It copies/pastes inside it the #' files necessary to run A...
args=commandArgs(trailingOnly = TRUE) if (args[1]=="-h"){ cat("Help : \n This script is used for clustering multiple fcs files with phenograph algorithm\n \t parameters: 1: Input absolute path of fcs files (preprocessing recommended) 2: Output absolute path for the clustering result 3:...
/Workbooks/Early_R_Workbooks/p_ID_phenograph_clustering.R
no_license
RhalenaThomas/PhenIX
R
false
false
1,271
r
args=commandArgs(trailingOnly = TRUE) if (args[1]=="-h"){ cat("Help : \n This script is used for clustering multiple fcs files with phenograph algorithm\n \t parameters: 1: Input absolute path of fcs files (preprocessing recommended) 2: Output absolute path for the clustering result 3:...
\name{locworld} \alias{locworld} \title{Locate points in worlmap} \description{ Locate points in worlmap } \usage{ locworld(shiftlon = 0, col = "brown", n = 2) } \arguments{ \item{shiftlon}{rotate map by degrees} \item{col}{color of points} \item{n}{number of points} } \value{ \item{lon}{longitudes} ...
/man/locworld.Rd
no_license
cran/GEOmap
R
false
false
852
rd
\name{locworld} \alias{locworld} \title{Locate points in worlmap} \description{ Locate points in worlmap } \usage{ locworld(shiftlon = 0, col = "brown", n = 2) } \arguments{ \item{shiftlon}{rotate map by degrees} \item{col}{color of points} \item{n}{number of points} } \value{ \item{lon}{longitudes} ...
## Generic function to check that we are running on NINA servers checkMachine <- function(){ host<-NULL try(host <- system("hostname", intern = T)) test <- grepl("ninrstudio", host) || grepl("NINSRV16", host) return(test) }
/R/internal.R
no_license
NINAnor/NinaR
R
false
false
234
r
## Generic function to check that we are running on NINA servers checkMachine <- function(){ host<-NULL try(host <- system("hostname", intern = T)) test <- grepl("ninrstudio", host) || grepl("NINSRV16", host) return(test) }
library(tidyverse) library(readxl) library(writexl) library(dplyr) library(lubridate) library(pheatmap) library(plm) library(psych) library(car) main<-read_xlsx("D:/main_file.xlsx") main$AcqROA_dif<-round((main$AcqROA_post/main$AcqROA_pre)-1,5) main$AcqStockPrice_dif3to1<-round((main$AcqSPrice_1month_after...
/Alalysis.R
no_license
XUAN-FENG9/ESG_Tar-and-performance_Acq
R
false
false
7,599
r
library(tidyverse) library(readxl) library(writexl) library(dplyr) library(lubridate) library(pheatmap) library(plm) library(psych) library(car) main<-read_xlsx("D:/main_file.xlsx") main$AcqROA_dif<-round((main$AcqROA_post/main$AcqROA_pre)-1,5) main$AcqStockPrice_dif3to1<-round((main$AcqSPrice_1month_after...
source(paste0(tools_ui_path,'usersUI.R'), local = TRUE) source(paste0(tools_ui_path,'motorsUI.R'), local = TRUE) source(paste0(tools_ui_path,'roomsUI.R'), local = TRUE)
/web-app/rshiny-webapp/scripts/controller/tools/tools_ui.R
no_license
JEGH/r-shiny
R
false
false
168
r
source(paste0(tools_ui_path,'usersUI.R'), local = TRUE) source(paste0(tools_ui_path,'motorsUI.R'), local = TRUE) source(paste0(tools_ui_path,'roomsUI.R'), local = TRUE)
library(nlme) contact = read.csv('d:study/203/FinalVA.csv') # convert to long form con.l = reshape(contact, idvar='id',varying=list(5:8), v.names = 'y',direction='long') # redefine as grouped data con.grp = groupedData(y~time | id, data=con.l) # add age group variable con.grp$age.grp = cut(con.grp$age,breaks=c(0,9,13,...
/STAT230/Final Project.R
no_license
peiyun-stats/Academic-Projects
R
false
false
5,849
r
library(nlme) contact = read.csv('d:study/203/FinalVA.csv') # convert to long form con.l = reshape(contact, idvar='id',varying=list(5:8), v.names = 'y',direction='long') # redefine as grouped data con.grp = groupedData(y~time | id, data=con.l) # add age group variable con.grp$age.grp = cut(con.grp$age,breaks=c(0,9,13,...
# Input data - B.Pr.KPFM.01.data.Whale.01.R # KPFM predator # notes on development of general function - mark completed as done # Allocate_breeders (completed) B.Pr.KPFM.Allocate_breeders.01.R # Consume (completed) B.Pr.KPFM.Consume.01.R # UpdateReprodHealth (completed) B.P...
/_Scenarios/KPFM 20150331/data/B.Pr.KPFM.01.data.Whale.01.R
no_license
AndrewJConstable/EPOCuniverse
R
false
false
39,722
r
# Input data - B.Pr.KPFM.01.data.Whale.01.R # KPFM predator # notes on development of general function - mark completed as done # Allocate_breeders (completed) B.Pr.KPFM.Allocate_breeders.01.R # Consume (completed) B.Pr.KPFM.Consume.01.R # UpdateReprodHealth (completed) B.P...
setwd("C:\\Users\\Koen\\Documents\\Assignment 3\\" ) getwd() rankhospital <- function(state, outcome, num = "best") { ## Read outcome data ## Check that state and outcome are valid ## Return hospital name in that state with the given rank ## 30-day death rate #Valid outcome check valid.outco...
/rankhospital.R
no_license
KoenSpoorenberg/Special-delivery-for-otzi
R
false
false
1,999
r
setwd("C:\\Users\\Koen\\Documents\\Assignment 3\\" ) getwd() rankhospital <- function(state, outcome, num = "best") { ## Read outcome data ## Check that state and outcome are valid ## Return hospital name in that state with the given rank ## 30-day death rate #Valid outcome check valid.outco...
\name{xprnSet-class} \Rdversion{1.1} \docType{class} \alias{xprnSet-class} \alias{XprnSet-class} \title{Class \code{"xprnSet"}} \description{ The xprnSet class is a wrapper around Bioconductor ExpressionSet class from the \code{Biobase} R package. It refers to data of type log ratios, log intensities, log abundance le...
/man/xprnSet-class.Rd
no_license
cran/Statomica
R
false
false
2,823
rd
\name{xprnSet-class} \Rdversion{1.1} \docType{class} \alias{xprnSet-class} \alias{XprnSet-class} \title{Class \code{"xprnSet"}} \description{ The xprnSet class is a wrapper around Bioconductor ExpressionSet class from the \code{Biobase} R package. It refers to data of type log ratios, log intensities, log abundance le...
group_center <- function(var,grp) { return(var-tapply(var,grp,mean,na.rm=T)[grp]) }
/group_center.R
no_license
bp30/SUNY_LMM-R_workshop
R
false
false
85
r
group_center <- function(var,grp) { return(var-tapply(var,grp,mean,na.rm=T)[grp]) }
library(radiant.data) ### Name: pivotr ### Title: Create a pivot table ### Aliases: pivotr ### ** Examples pivotr(diamonds, cvars = "cut") %>% str() pivotr(diamonds, cvars = "cut")$tab pivotr(diamonds, cvars = c("cut","clarity","color"))$tab pivotr(diamonds, cvars = "cut:clarity", nvar = "price")$tab pivotr(diamond...
/data/genthat_extracted_code/radiant.data/examples/pivotr.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
419
r
library(radiant.data) ### Name: pivotr ### Title: Create a pivot table ### Aliases: pivotr ### ** Examples pivotr(diamonds, cvars = "cut") %>% str() pivotr(diamonds, cvars = "cut")$tab pivotr(diamonds, cvars = c("cut","clarity","color"))$tab pivotr(diamonds, cvars = "cut:clarity", nvar = "price")$tab pivotr(diamond...
################################################################ # 1 MERGES THE TRAINING AND THE TEST SETS TO CREATE ONE DATA SET ################################################################ # create data directory to store data if (!file.exists('data')){ dir.create('data') } # download data fileURL <- "https...
/GettingAndCleaningData/FINAL_PROJECT/run_analysis.R
no_license
ofialko/Data-Science-Johns-Hopkins-University
R
false
false
4,507
r
################################################################ # 1 MERGES THE TRAINING AND THE TEST SETS TO CREATE ONE DATA SET ################################################################ # create data directory to store data if (!file.exists('data')){ dir.create('data') } # download data fileURL <- "https...
/row data 변환.R
no_license
Yangsuhyeong/BigData-Analysis
R
false
false
4,238
r
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/willoughby2006eqs.R \name{will7a} \alias{will7a} \title{Calculate radius of maximum winds} \usage{ will7a(vmax_gl, tclat) } \arguments{ \item{vmax_gl}{Numeric vector of the tangential wind component of the maximum gradient wind speed, in mete...
/man/will7a.Rd
no_license
cran/stormwindmodel
R
false
true
1,443
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/willoughby2006eqs.R \name{will7a} \alias{will7a} \title{Calculate radius of maximum winds} \usage{ will7a(vmax_gl, tclat) } \arguments{ \item{vmax_gl}{Numeric vector of the tangential wind component of the maximum gradient wind speed, in mete...
/SESION 4 TAREA.R
no_license
xavigonz2020/EconometriaR
R
false
false
424
r
### Motor Trend data analysis ### #================================ # Load the data and take a quick peek at it data(mtcars) head(mtcars) str(mtcars) sum(!complete.cases(mtcars)) # Load up libraries library(ggplot2) library(dplyr) library(tidyr) # Make am and vs factor variables instead...
/motorTrends/motor_analysis.R
no_license
pratta3/Coursera-Statistical-Inference-and-Regression-Models
R
false
false
15,761
r
### Motor Trend data analysis ### #================================ # Load the data and take a quick peek at it data(mtcars) head(mtcars) str(mtcars) sum(!complete.cases(mtcars)) # Load up libraries library(ggplot2) library(dplyr) library(tidyr) # Make am and vs factor variables instead...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/crop.r \name{crop_curves} \alias{crop_curves} \title{Crop the curves} \usage{ crop_curves(curve_set, allfinite = TRUE, r_min = NULL, r_max = NULL) } \arguments{ \item{curve_set}{A curve_set (see \code{\link{create_curve_set}}) or an...
/man/crop_curves.Rd
no_license
cran/GET
R
false
true
1,430
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/crop.r \name{crop_curves} \alias{crop_curves} \title{Crop the curves} \usage{ crop_curves(curve_set, allfinite = TRUE, r_min = NULL, r_max = NULL) } \arguments{ \item{curve_set}{A curve_set (see \code{\link{create_curve_set}}) or an...
################################################################################ # LOADING LIBRARIES ################################################################################ # using<-function(...) { # libs<-unlist(list(...)) # req<-unlist(lapply(libs,require,character.only=TRUE)) # need<-libs[req==FALSE]...
/code/real_backup/scripts_joel_HPC_V5/gower_distance_PAM_HPC_V5.R
no_license
EpiCompBio/Barracudas
R
false
false
11,856
r
################################################################################ # LOADING LIBRARIES ################################################################################ # using<-function(...) { # libs<-unlist(list(...)) # req<-unlist(lapply(libs,require,character.only=TRUE)) # need<-libs[req==FALSE]...
# Try to install package tidyverse install.packages("tidyverse") # Call functions in "tivyverse" every day library(tidyverse) #Add library: stringr library(stringr) #Add lubridate library(lubridate) # Add geosphere to calculate the Geographic distance: library(sp) library(geosphere) #Create the RoRotrem Analy...
/Rscript/4_RoRotrem Analysis_extended approach-step3_1.R
no_license
galuoc87/Function
R
false
false
26,500
r
# Try to install package tidyverse install.packages("tidyverse") # Call functions in "tivyverse" every day library(tidyverse) #Add library: stringr library(stringr) #Add lubridate library(lubridate) # Add geosphere to calculate the Geographic distance: library(sp) library(geosphere) #Create the RoRotrem Analy...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/IBD16S.R \name{IBD16S} \alias{IBD16S} \title{Create HMP2 16S sequencing data for Inflammatory Bowel Disease (IBD) phyloseq object} \format{A phyloseq object with 982 taxa and 178 samples. \subsection{OTU Table}{ A counts matrix for...
/man/IBD16S.Rd
permissive
dozmorovlab/HMP2Data
R
false
true
947
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/IBD16S.R \name{IBD16S} \alias{IBD16S} \title{Create HMP2 16S sequencing data for Inflammatory Bowel Disease (IBD) phyloseq object} \format{A phyloseq object with 982 taxa and 178 samples. \subsection{OTU Table}{ A counts matrix for...
library(plyr) library(MCMCglmm) library(gdata) library(matrixcalc) library(ggplot2) library(Morphometrics) library(reshape2) Sys.setlocale(locale="C") load("./Rdatas/maindata.RData") getModel = function(otu){ models = otu$model[!is.na(otu$model)] models = models[[1]] fixed = as.character(models$call$formula)[[3...
/xenartraSamples.R
no_license
diogro/bayesian-stats
R
false
false
4,536
r
library(plyr) library(MCMCglmm) library(gdata) library(matrixcalc) library(ggplot2) library(Morphometrics) library(reshape2) Sys.setlocale(locale="C") load("./Rdatas/maindata.RData") getModel = function(otu){ models = otu$model[!is.na(otu$model)] models = models[[1]] fixed = as.character(models$call$formula)[[3...
# Things you might want to change # options(papersize="a4") # options(editor="notepad") # options(pager="internal") # set the default help type # options(help_type="text") options(help_type="html") # set a site library # .Library.site <- file.path(chartr("\\", "/", R.home()), "site-library") # set a CRAN mirror #...
/.Rprofile
no_license
sbollain/tesis
R
false
false
1,520
rprofile
# Things you might want to change # options(papersize="a4") # options(editor="notepad") # options(pager="internal") # set the default help type # options(help_type="text") options(help_type="html") # set a site library # .Library.site <- file.path(chartr("\\", "/", R.home()), "site-library") # set a CRAN mirror #...
\name{SpatialComponents-class} \docType{class} \alias{SpatialComponents-class} \title{A class for gridded components derived using the \code{spc} method} \description{A class containing a list of gridded components and results of principal component analysis.} \section{Slots}{ \describe{ \item{\code{predicted...
/man/SpatialComponents.Rd
no_license
brendo1001/GSIF
R
false
false
658
rd
\name{SpatialComponents-class} \docType{class} \alias{SpatialComponents-class} \title{A class for gridded components derived using the \code{spc} method} \description{A class containing a list of gridded components and results of principal component analysis.} \section{Slots}{ \describe{ \item{\code{predicted...
#' Get count of all unconnected nodes in the graph #' @description From a graph object of class #' \code{dgr_graph}, get a count of nodes in the #' graph that are not connected to any other node. #' @param graph a graph object of class #' \code{dgr_graph}. #' @return a numeric vector of single length. #' @examples #' #...
/R/count_unconnected_nodes.R
permissive
OleksiyAnokhin/DiagrammeR
R
false
false
1,867
r
#' Get count of all unconnected nodes in the graph #' @description From a graph object of class #' \code{dgr_graph}, get a count of nodes in the #' graph that are not connected to any other node. #' @param graph a graph object of class #' \code{dgr_graph}. #' @return a numeric vector of single length. #' @examples #' #...
#Findind frequent patterns in bank data using apriori rules algorithm by Harshith. # 1. Install and load backages #install arules package only once install.packages("arules") library("arules") #install arulesViz package only once install.packages("TSP") install.packages("data.table") install.packages("arulesV...
/Association_Rules_Bank_data.R
no_license
harshith-data/Patterns-In-Bank-Data
R
false
false
2,167
r
#Findind frequent patterns in bank data using apriori rules algorithm by Harshith. # 1. Install and load backages #install arules package only once install.packages("arules") library("arules") #install arulesViz package only once install.packages("TSP") install.packages("data.table") install.packages("arulesV...
l<-iris set.seed(1234) pd<-sample(2,nrow(l),replace= TRUE, prob=c(0.7,0.3)) train<-l[pd==1,] test<-l[pd==2,] library(rpart) tree1<-rpart(Species~.,train,method = "class") library(rpart.plot) rpart.plot(tree1,extra = 4) pred<-predict(tree1,newdata = test,type="class") table(pred,test$Species) length(pred)...
/Decision Tree.R
no_license
rjha2991/R-Prep
R
false
false
999
r
l<-iris set.seed(1234) pd<-sample(2,nrow(l),replace= TRUE, prob=c(0.7,0.3)) train<-l[pd==1,] test<-l[pd==2,] library(rpart) tree1<-rpart(Species~.,train,method = "class") library(rpart.plot) rpart.plot(tree1,extra = 4) pred<-predict(tree1,newdata = test,type="class") table(pred,test$Species) length(pred)...
# Exploratory Data Analysis # Project 1 # Clean upworkspace rm(list=ls()) # Load data path <- "~/Downloads/household_power_consumption.txt" myData <- read.table(path,header=TRUE,sep=";",colClasses="character") # Convert to Date/Time clsases myData[,1] <- as.Date(myData$Date,"%d/%m/%Y") myData[,2] <- as.Date(myData$T...
/plot1.R
no_license
matthewdeuschle/ExData_Plotting1
R
false
false
1,011
r
# Exploratory Data Analysis # Project 1 # Clean upworkspace rm(list=ls()) # Load data path <- "~/Downloads/household_power_consumption.txt" myData <- read.table(path,header=TRUE,sep=";",colClasses="character") # Convert to Date/Time clsases myData[,1] <- as.Date(myData$Date,"%d/%m/%Y") myData[,2] <- as.Date(myData$T...
# Clean up workspace rm(list=ls()) # Read the dataset from txt file within Date limitation mydata <- read.table("./household_power_consumption.txt",header=F, sep=';', na.strings="?",stringsAsFactors=F,skip = 66637, nrows = 2880) header <- read.table('./household_power_consumption.txt', nrows = 1, header = F, s...
/plot1.R
no_license
molihua76/ExData_Plotting1
R
false
false
590
r
# Clean up workspace rm(list=ls()) # Read the dataset from txt file within Date limitation mydata <- read.table("./household_power_consumption.txt",header=F, sep=';', na.strings="?",stringsAsFactors=F,skip = 66637, nrows = 2880) header <- read.table('./household_power_consumption.txt', nrows = 1, header = F, s...
\name{order.comb_mat} \alias{order.comb_mat} \title{ Order of the Combination Sets } \description{ Order of the Combination Sets } \usage{ order.comb_mat(m, decreasing = TRUE, on = "comb_set") } \arguments{ \item{m}{A combination matrix returned by \code{\link{make_comb_mat}}.} \item{on}{On sets or on combination ...
/man/order.comb_mat.Rd
permissive
jokergoo/ComplexHeatmap
R
false
false
535
rd
\name{order.comb_mat} \alias{order.comb_mat} \title{ Order of the Combination Sets } \description{ Order of the Combination Sets } \usage{ order.comb_mat(m, decreasing = TRUE, on = "comb_set") } \arguments{ \item{m}{A combination matrix returned by \code{\link{make_comb_mat}}.} \item{on}{On sets or on combination ...
#################################################################### # Study the distribution of a targets variable and another variable # Similar to the funModeling::corrplot function plot_distr <- function(data, target, values, top = 10, breaks = 10, abc = FALSE, ...
/R/plot_distr.R
no_license
pbulsink/lares
R
false
false
3,706
r
#################################################################### # Study the distribution of a targets variable and another variable # Similar to the funModeling::corrplot function plot_distr <- function(data, target, values, top = 10, breaks = 10, abc = FALSE, ...
################################################################## ## Wreath Data Figure ## ################################################################## # Load libraries library(mclust) library(colorspace) # Load wreath data data(wreath) # Set a random seed (in case on...
/Manuscript_files/20190709_Figures.R
no_license
hiendn/StoEMMIX
R
false
false
4,424
r
################################################################## ## Wreath Data Figure ## ################################################################## # Load libraries library(mclust) library(colorspace) # Load wreath data data(wreath) # Set a random seed (in case on...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dowJonesData.R \docType{data} \name{dowJonesData} \alias{dowJonesData} \title{Dow Jones Index Data} \format{A data frame with 252 observations on the following 7 variables containing data from 2014-01-01 to 2015-01-01. \describe{ \item{...
/man/dowJonesData.Rd
no_license
Esuene/mangoTraining
R
false
true
996
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/dowJonesData.R \docType{data} \name{dowJonesData} \alias{dowJonesData} \title{Dow Jones Index Data} \format{A data frame with 252 observations on the following 7 variables containing data from 2014-01-01 to 2015-01-01. \describe{ \item{...
### Functions for manipulating "cached matrix objects," or "CMOs" for short. #Define methods (embedded functions) that apply to CMOs: # $set: assign matrix value # $get: return matrix value # $setInverse: set inverse matrix value [DO NOT call directly, call cacheSolve() instead] # $getInverse: return inverse ...
/cachematrix.R
no_license
dv400b/ProgrammingAssignment2
R
false
false
1,091
r
### Functions for manipulating "cached matrix objects," or "CMOs" for short. #Define methods (embedded functions) that apply to CMOs: # $set: assign matrix value # $get: return matrix value # $setInverse: set inverse matrix value [DO NOT call directly, call cacheSolve() instead] # $getInverse: return inverse ...
\name{forestSAS-package} \alias{forestSAS-package} \alias{forestSAS} \docType{package} \title{ \packageTitle{forestSAS} } \description{ \packageDescription{forestSAS} } \details{ Forest structure commonly refers to a distribution pattern of tree attributes within a forest ecosystem. Similarly, tree populatio...
/man/forestSAS-package.Rd
no_license
cran/forestSAS
R
false
false
2,490
rd
\name{forestSAS-package} \alias{forestSAS-package} \alias{forestSAS} \docType{package} \title{ \packageTitle{forestSAS} } \description{ \packageDescription{forestSAS} } \details{ Forest structure commonly refers to a distribution pattern of tree attributes within a forest ecosystem. Similarly, tree populatio...
## This function creates a special "matrix" object that can cache its inverse. makeCacheMatrix <- function(matr = matrix()) { inversematrix = NULL set <- function(y) { matr <<- y inversematrix <<- NULL } get <- function() { matr } setinverse <- function(inverse) { inversematrix <<- inverse } getinverse ...
/cachematrix.R
no_license
seleznevStas/ProgrammingAssignment2
R
false
false
746
r
## This function creates a special "matrix" object that can cache its inverse. makeCacheMatrix <- function(matr = matrix()) { inversematrix = NULL set <- function(y) { matr <<- y inversematrix <<- NULL } get <- function() { matr } setinverse <- function(inverse) { inversematrix <<- inverse } getinverse ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/reexports.R \docType{import} \name{reexports} \alias{reexports} \alias{\%>\%} \alias{reexports} \alias{use_python} \alias{reexports} \alias{use_virtualenv} \alias{reexports} \alias{use_condaenv} \alias{reexports} \alias{array_reshape} \alias{...
/man/reexports.Rd
no_license
Geoany/tfestimators
R
false
true
1,815
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/reexports.R \docType{import} \name{reexports} \alias{reexports} \alias{\%>\%} \alias{reexports} \alias{use_python} \alias{reexports} \alias{use_virtualenv} \alias{reexports} \alias{use_condaenv} \alias{reexports} \alias{array_reshape} \alias{...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cache.R \name{clear_cache} \alias{clear_cache} \title{Clear cached values and delete temporary files} \usage{ clear_cache(m, index = .get_ids(m)) } \arguments{ \item{m}{Rmonad object} \item{index}{indices to clear (all indices by default)} }...
/man/clear_cache.Rd
no_license
cran/rmonad
R
false
true
690
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cache.R \name{clear_cache} \alias{clear_cache} \title{Clear cached values and delete temporary files} \usage{ clear_cache(m, index = .get_ids(m)) } \arguments{ \item{m}{Rmonad object} \item{index}{indices to clear (all indices by default)} }...
\name{SLAPE.hgnc.table} \alias{SLAPE.hgnc.table} \docType{data} \title{ HUGO gene symbols and their previous synonyms (up to February 2016) } \description{ %% ~~ A concise (1-5 lines) description of the dataset. ~~ } \usage{data("SLAPE.hgnc.table")} \format{ A data frame with approved HUGO gene symbols in one column...
/man/SLAPE.hgnc.table.Rd
no_license
sunqiangzai/SLAPenrich
R
false
false
864
rd
\name{SLAPE.hgnc.table} \alias{SLAPE.hgnc.table} \docType{data} \title{ HUGO gene symbols and their previous synonyms (up to February 2016) } \description{ %% ~~ A concise (1-5 lines) description of the dataset. ~~ } \usage{data("SLAPE.hgnc.table")} \format{ A data frame with approved HUGO gene symbols in one column...
#' Filter a 'ddo' or 'ddf' Object #' #' Filter a 'ddo' or 'ddf' object #' #' @param x an object of class 'ddo' or 'ddf' #' @param filterFn function that takes a key or key-value pair and returns either \code{TRUE} or \code{FALSE} - if \code{TRUE}, that key-value pair will be present in the result. See examples for deta...
/R/dataops_filter.R
permissive
jrounds/datadr
R
false
false
2,621
r
#' Filter a 'ddo' or 'ddf' Object #' #' Filter a 'ddo' or 'ddf' object #' #' @param x an object of class 'ddo' or 'ddf' #' @param filterFn function that takes a key or key-value pair and returns either \code{TRUE} or \code{FALSE} - if \code{TRUE}, that key-value pair will be present in the result. See examples for deta...
library(dplyr) filttaxind <- function(phy) rowSums(sign(phy@otu_table@.Data)) > nsamples(phy)*.37 filtmindepth <- function(depth) quantile(depth, .1) filter <- function(phy, col='body_site', pattern="UBERON:feces", getmindepth=filtmindepth, gettaxind=filttaxind) { ## Filter gut samples ## ...
/public/scripts/filter_fun.R
no_license
zdk123/SpiecEasiSLR_manuscript
R
false
false
655
r
library(dplyr) filttaxind <- function(phy) rowSums(sign(phy@otu_table@.Data)) > nsamples(phy)*.37 filtmindepth <- function(depth) quantile(depth, .1) filter <- function(phy, col='body_site', pattern="UBERON:feces", getmindepth=filtmindepth, gettaxind=filttaxind) { ## Filter gut samples ## ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utc.R \name{Crop_image_to_each_Shapefile_polygon} \alias{Crop_image_to_each_Shapefile_polygon} \title{Crop image to each polygon in a shapefile} \usage{ Crop_image_to_each_Shapefile_polygon(shapefile.dsn, shapefile.layer, image.path, cores,...
/utc/man/Crop_image_to_each_Shapefile_polygon.Rd
no_license
TedwardErker/UTC
R
false
true
494
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utc.R \name{Crop_image_to_each_Shapefile_polygon} \alias{Crop_image_to_each_Shapefile_polygon} \title{Crop image to each polygon in a shapefile} \usage{ Crop_image_to_each_Shapefile_polygon(shapefile.dsn, shapefile.layer, image.path, cores,...
# Reading the file data NEI <- readRDS("../Data for Peer Assessment/summarySCC_PM25.rds") SCC <- readRDS("../Data for Peer Assessment/Source_Classification_Code.rds") # Subset NEI data by Baltimore's fip. subsetBaltimoreNEI <- NEI[NEI$fips=="24510",] # Aggregate Baltimore emissions aggBaltimoreEmissions <- aggregate(...
/plot2.R
no_license
VigneshIyer11888/Exploratory-Data-Analysis-Week-4---Project
R
false
false
765
r
# Reading the file data NEI <- readRDS("../Data for Peer Assessment/summarySCC_PM25.rds") SCC <- readRDS("../Data for Peer Assessment/Source_Classification_Code.rds") # Subset NEI data by Baltimore's fip. subsetBaltimoreNEI <- NEI[NEI$fips=="24510",] # Aggregate Baltimore emissions aggBaltimoreEmissions <- aggregate(...
library(tidyverse) factor_names = tibble(factor = paste0("Factor", c(1:16)), name = c("Universal", "iPSC", "Skin", "Blood", "LCL", "Lymphocyte", "Monocyte & Macrophage", "Adipose", "T cell (anti-CD3/CD28)", "Brain", "Macrophage", "Mono...
/manuscript/figures/eqtl_forestplot_and_factor_loadings/factor_fractions.R
no_license
eQTL-Catalogue/eQTL-Catalogue-resources
R
false
false
1,658
r
library(tidyverse) factor_names = tibble(factor = paste0("Factor", c(1:16)), name = c("Universal", "iPSC", "Skin", "Blood", "LCL", "Lymphocyte", "Monocyte & Macrophage", "Adipose", "T cell (anti-CD3/CD28)", "Brain", "Macrophage", "Mono...
library(testthat) library(optinterv) test_check("optinterv")
/tests/testthat.R
no_license
cran/optinterv
R
false
false
62
r
library(testthat) library(optinterv) test_check("optinterv")
## vim:textwidth=128:expandtab:shiftwidth=4:softtabstop=4 setMethod(f="initialize", signature="gps", definition=function(.Object, longitude, latitude, filename="") { if (!missing(longitude)) .Object@data$longitude <- as.numeric(longitude) if (!missing(latitude)) .Object@...
/R/gps.R
no_license
annidjurhuus/oce
R
false
false
15,564
r
## vim:textwidth=128:expandtab:shiftwidth=4:softtabstop=4 setMethod(f="initialize", signature="gps", definition=function(.Object, longitude, latitude, filename="") { if (!missing(longitude)) .Object@data$longitude <- as.numeric(longitude) if (!missing(latitude)) .Object@...
partialcor <- function(R, indx, indy, indz, n) { ## R is a correlation matrix ## i and j denote the two variables whose conditional correlation is to be estimated ## k denotes the set of conditioning variables if ( is.null(indz) || indz == 0 ) {## classical correlation r <- R[indx, indy] } else ...
/R/partialcor.R
no_license
romainfrancois/MXM
R
false
false
962
r
partialcor <- function(R, indx, indy, indz, n) { ## R is a correlation matrix ## i and j denote the two variables whose conditional correlation is to be estimated ## k denotes the set of conditioning variables if ( is.null(indz) || indz == 0 ) {## classical correlation r <- R[indx, indy] } else ...
# Multiple regression, ANCOVA, model selection # Multiple Regression############################################## # Import the mult_regr_data.csv data file setwd("/Users/Home/Dropbox/Amherst/Courses/CompMethods/CompMethodsCourse/Week3") require(car) mult_regr_data<-read.csv("mult_regr_data.csv", row.names=1) # Expl...
/Week3/MultipleRegression,ANCOVA,ModelSelection-2016.R
no_license
AndrewJohnSmith/CompMethodsCourse
R
false
false
5,745
r
# Multiple regression, ANCOVA, model selection # Multiple Regression############################################## # Import the mult_regr_data.csv data file setwd("/Users/Home/Dropbox/Amherst/Courses/CompMethods/CompMethodsCourse/Week3") require(car) mult_regr_data<-read.csv("mult_regr_data.csv", row.names=1) # Expl...
oohbspike <- function ( formula, data, subset, na.action = na.omit, par = NULL, ...) { # storing a function call cl <- match.call() # checking arguments if (!inherits(formula, "Formula")){ formula <- Formula(formula) } if (!inherits(formula, "formula")){ stop("invalid formula") } if(...
/R/oohbspike.R
no_license
cran/DCchoice
R
false
false
5,661
r
oohbspike <- function ( formula, data, subset, na.action = na.omit, par = NULL, ...) { # storing a function call cl <- match.call() # checking arguments if (!inherits(formula, "Formula")){ formula <- Formula(formula) } if (!inherits(formula, "formula")){ stop("invalid formula") } if(...
# # Getting & Cleaning Data JHU February 2015 # # Course Project # # run_analysis.R # setwd ("C:\\bnc\\Coursera\\Getting and Cleaning Data\\Course Project\\Submission") getwd() library(data.table) library(dplyr) ## Note: Base Data measurements file rows were were pre-processed to: # - remove leading spaces...
/run_analysis.R
no_license
bcarver1953/GettingAndCleaningData
R
false
false
4,458
r
# # Getting & Cleaning Data JHU February 2015 # # Course Project # # run_analysis.R # setwd ("C:\\bnc\\Coursera\\Getting and Cleaning Data\\Course Project\\Submission") getwd() library(data.table) library(dplyr) ## Note: Base Data measurements file rows were were pre-processed to: # - remove leading spaces...
############################################################################### context("formula interface") test_that("glm and logitreg agree", { data <- logitregsolution:::sim_data(seed = 123, q_numeric = 1, dataframe = TRUE) coef_glm <- coef(glm(y ~ ., data = data, family = binomial())) coef <- logitreg(y ~ ....
/feedback/test-logitreg-formula.R
no_license
fort-w2021/logitreg-ex-muskuloes
R
false
false
1,328
r
############################################################################### context("formula interface") test_that("glm and logitreg agree", { data <- logitregsolution:::sim_data(seed = 123, q_numeric = 1, dataframe = TRUE) coef_glm <- coef(glm(y ~ ., data = data, family = binomial())) coef <- logitreg(y ~ ....
library(foreign) library(lme4) library(car) library(ordinal) library(reshape2) library(car) dat <- read.dta("http://www.stata-press.com/data/mlmus3/essays.dta") #1 dat$grade1 <- recode(dat$grade, "1:2=1; 3:4=2; 5:6=3; else=4") m1 <- clmm(factor(grade1) ~ 1 + (1|essay), data = dat, link = "logit", nAGQ = 30, threshol...
/exercises/Ex-11.4-essays/Ex-11.4.R
no_license
pauljohn32/RHS
R
false
false
1,028
r
library(foreign) library(lme4) library(car) library(ordinal) library(reshape2) library(car) dat <- read.dta("http://www.stata-press.com/data/mlmus3/essays.dta") #1 dat$grade1 <- recode(dat$grade, "1:2=1; 3:4=2; 5:6=3; else=4") m1 <- clmm(factor(grade1) ~ 1 + (1|essay), data = dat, link = "logit", nAGQ = 30, threshol...
library(tidyverse) library(ggthemes) bar <- ggplot(emp, aes(title, fill = gender)) bar + geom_bar() + theme_fivethirtyeight() + scale_fill_manual(values = c("chartreuse4", "darkorange")) + labs(title = "Job Positions by Gender", y = "Employee count", x = "Job position") # theme_fivethirty...
/Exercise solutions/9.6.R
permissive
PacktPublishing/Programming-for-Statistics-and-Data-Science
R
false
false
1,827
r
library(tidyverse) library(ggthemes) bar <- ggplot(emp, aes(title, fill = gender)) bar + geom_bar() + theme_fivethirtyeight() + scale_fill_manual(values = c("chartreuse4", "darkorange")) + labs(title = "Job Positions by Gender", y = "Employee count", x = "Job position") # theme_fivethirty...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bayesuirt.R \name{mh_gibbs_2pl} \alias{mh_gibbs_2pl} \title{mh_gibbs_2pl Function} \usage{ mh_gibbs_2pl(dat, idname, psi0, theta0, B = diag(c(rep(9, dim(X)[2]), rep(1, dim(X)[2]))), b = c(rep(0, length(psi0))), Nc = 10000) } \arguments{ \it...
/man/mh_gibbs_2pl.Rd
no_license
nmolanog/bayesuirt
R
false
true
2,053
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bayesuirt.R \name{mh_gibbs_2pl} \alias{mh_gibbs_2pl} \title{mh_gibbs_2pl Function} \usage{ mh_gibbs_2pl(dat, idname, psi0, theta0, B = diag(c(rep(9, dim(X)[2]), rep(1, dim(X)[2]))), b = c(rep(0, length(psi0))), Nc = 10000) } \arguments{ \it...
## Prairie nsteps=1000 Stmax=1 d=seq(0,0.1,length=nsteps) gamma=seq(0,3,length=nsteps) DensityTRT=c(14,42,84,168,336,672) SObsPrairie=c(14.00560224,42.01680672,63.02521008,80.53221289,98.03921569,129.5518207) SObsPond=c(14.00560224,35.0140056,56.02240896,73.52941176,87.53501401,98.03921569) SEst=rep(0,l...
/Curve Fitting.R
no_license
aurielfournier/population_ecology
R
false
false
3,115
r
## Prairie nsteps=1000 Stmax=1 d=seq(0,0.1,length=nsteps) gamma=seq(0,3,length=nsteps) DensityTRT=c(14,42,84,168,336,672) SObsPrairie=c(14.00560224,42.01680672,63.02521008,80.53221289,98.03921569,129.5518207) SObsPond=c(14.00560224,35.0140056,56.02240896,73.52941176,87.53501401,98.03921569) SEst=rep(0,l...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/conn.R \name{msgConnection} \alias{msgConnection} \alias{close.msgConnection} \alias{partial} \alias{partial.msgConnection} \alias{readMsgs} \alias{status} \alias{status.msgConnection} \alias{seek.msgConnection} \alias{readMsg} \alias{writeMs...
/man/msgConnection.Rd
no_license
cran/msgpack
R
false
true
3,428
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/conn.R \name{msgConnection} \alias{msgConnection} \alias{close.msgConnection} \alias{partial} \alias{partial.msgConnection} \alias{readMsgs} \alias{status} \alias{status.msgConnection} \alias{seek.msgConnection} \alias{readMsg} \alias{writeMs...
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 lte_n_equal_rows <- function(matrix, n, tolerance = 1e-10) { .Call(`_glmGamPoi_lte_n_equal_rows`, matrix, n, tolerance) } get_row_groups <- function(matrix, n_groups, tolerance = 1e-10) { ...
/R/RcppExports.R
no_license
jeffreypullin/glmGamPoi
R
false
false
2,623
r
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 lte_n_equal_rows <- function(matrix, n, tolerance = 1e-10) { .Call(`_glmGamPoi_lte_n_equal_rows`, matrix, n, tolerance) } get_row_groups <- function(matrix, n_groups, tolerance = 1e-10) { ...
### Anecdotal evidence suggests that illumination plays an important role in education, as extended lighting could translate ### into longer study hours and potentially better educational outcomes. This piece explores this assumption in Kenya using ### nighttime light index collected by the National Oceanic and Atm...
/machine learning nighttime light - part 1.R
no_license
yeg13/kenya-electricity-project
R
false
false
7,444
r
### Anecdotal evidence suggests that illumination plays an important role in education, as extended lighting could translate ### into longer study hours and potentially better educational outcomes. This piece explores this assumption in Kenya using ### nighttime light index collected by the National Oceanic and Atm...
# ################################################################################# # # REI101M Hópverkefni 1 Háskóli Íslands, okt 2015 # # # # Andrea Björk Björnsdóttir ...
/ui.R
no_license
BjornBjarnsteins/Reiknigreind_Hagstofa
R
false
false
8,857
r
# ################################################################################# # # REI101M Hópverkefni 1 Háskóli Íslands, okt 2015 # # # # Andrea Björk Björnsdóttir ...
###-- SETUP FOLDERS & PACKAGES --### #-Folders dir.create('raw_data/') dir.create('temp/') dir.create('output/') #-Packages install.packages("tidyverse",repos = "http://cran.us.r-project.org"); install.packages("dplyr",repos = "http://cran.us.r-project.org"); install.packages("tibble",repos = "http://cran.us.r-projec...
/src/data-prep/1download_data.R
no_license
AlexandraDuta/Investigating-Airbnb
R
false
false
1,409
r
###-- SETUP FOLDERS & PACKAGES --### #-Folders dir.create('raw_data/') dir.create('temp/') dir.create('output/') #-Packages install.packages("tidyverse",repos = "http://cran.us.r-project.org"); install.packages("dplyr",repos = "http://cran.us.r-project.org"); install.packages("tibble",repos = "http://cran.us.r-projec...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/graph creation.R \name{ego.two.mode} \alias{ego.two.mode} \title{A report of the first neighborhood of an individiual} \usage{ ego.two.mode( name, den = den, n = Inf, text = "affil", member.of = pe13$Name, ... ) } \arguments{ \ite...
/man/ego.two.mode.Rd
no_license
Daenecompass/eliter
R
false
true
893
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/graph creation.R \name{ego.two.mode} \alias{ego.two.mode} \title{A report of the first neighborhood of an individiual} \usage{ ego.two.mode( name, den = den, n = Inf, text = "affil", member.of = pe13$Name, ... ) } \arguments{ \ite...
#App code simplified by Nate #Names: Nathaniel Burola, Chase Brewster, Gracie White, and Sara Orofino #Subject: Somefin' FISHE Shiny App #Date: 5/6/2020 #Installing the packages to construct a Shiny App (commented out in order to avoid long processing) #install.packages("shiny", repos = "https://cran.rstudio.com", d...
/nate_updates.R
no_license
nburola/EDF_deliverable
R
false
false
13,807
r
#App code simplified by Nate #Names: Nathaniel Burola, Chase Brewster, Gracie White, and Sara Orofino #Subject: Somefin' FISHE Shiny App #Date: 5/6/2020 #Installing the packages to construct a Shiny App (commented out in order to avoid long processing) #install.packages("shiny", repos = "https://cran.rstudio.com", d...
context("EOSregress") # since this is the first test (alphabetically) # we need to load the 'thermo' object (for R CMD check) suppressMessages(data(thermo)) test_that("EOSvar stops with unknown variables", { expect_error(EOSvar("TX", T=25, P=1), "can't find a variable named TX") # why can't the test find these? ...
/CHNOSZ/tests/testthat/test-EOSregress.R
no_license
ingted/R-Examples
R
false
false
2,134
r
context("EOSregress") # since this is the first test (alphabetically) # we need to load the 'thermo' object (for R CMD check) suppressMessages(data(thermo)) test_that("EOSvar stops with unknown variables", { expect_error(EOSvar("TX", T=25, P=1), "can't find a variable named TX") # why can't the test find these? ...
matched=read.csv("/Users/ps22344/Downloads/ugs/matchedguise.csv") setwd("/Users/ps22344/Downloads/ugs/rplots") print (summary(matched)) library(ggplot2) sect1=matched[matched$SECTION == 1, ] summary(sect1) plotter = function (dataset) #for each question, plot the distribution over options, i.e. possible answers. ...
/matched.R
no_license
patrickschu/ugs
R
false
false
2,981
r
matched=read.csv("/Users/ps22344/Downloads/ugs/matchedguise.csv") setwd("/Users/ps22344/Downloads/ugs/rplots") print (summary(matched)) library(ggplot2) sect1=matched[matched$SECTION == 1, ] summary(sect1) plotter = function (dataset) #for each question, plot the distribution over options, i.e. possible answers. ...
#######################problem 1########################### library(readxl) #invoke library # Load the data data_cal_wt <- read.csv(file.choose(), header=TRUE) View(data_cal_wt) attach(data_cal_wt) # Graphical exploration plot(data_cal_wt) dotplot(Weight.gained..grams., main = "Dot Plot of Waist Circumf...
/simple linear regression.R
no_license
sachin1171/Simple-Linear-Regrerssion
R
false
false
22,208
r
#######################problem 1########################### library(readxl) #invoke library # Load the data data_cal_wt <- read.csv(file.choose(), header=TRUE) View(data_cal_wt) attach(data_cal_wt) # Graphical exploration plot(data_cal_wt) dotplot(Weight.gained..grams., main = "Dot Plot of Waist Circumf...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/glify-points.R, R/glify-polygons.R \name{addGlPoints} \alias{addGlPoints} \alias{addGlPolygons} \title{add points/polygons to a leaflet map using Leaflet.glify} \usage{ addGlPoints(map, data, color = cbind(0, 0.2, 1), opacity = 1, weight = ...
/man/addGlPoints.Rd
permissive
nemochina2008/leafgl
R
false
true
2,591
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/glify-points.R, R/glify-polygons.R \name{addGlPoints} \alias{addGlPoints} \alias{addGlPolygons} \title{add points/polygons to a leaflet map using Leaflet.glify} \usage{ addGlPoints(map, data, color = cbind(0, 0.2, 1), opacity = 1, weight = ...
source("incl/start.R") options(future.debug = FALSE) message("*** options ...") registerDoFuture() globalsAs <- doFuture:::globalsAs message("globalsAs: ", globalsAs()) plan(multisession, workers = 2L) a <- 3.14 b <- 2 y_truth <- foreach(1:2, .export = c("a", "b")) %do% { b * a } str(y_truth) options(doFuture.f...
/tests/foreach_dopar,options-for-export.R
no_license
HenrikBengtsson/doFuture
R
false
false
3,584
r
source("incl/start.R") options(future.debug = FALSE) message("*** options ...") registerDoFuture() globalsAs <- doFuture:::globalsAs message("globalsAs: ", globalsAs()) plan(multisession, workers = 2L) a <- 3.14 b <- 2 y_truth <- foreach(1:2, .export = c("a", "b")) %do% { b * a } str(y_truth) options(doFuture.f...
# father involvement in time structuring tasks, random slope of maternal employment, # no macro var with cross-level interaction of leave # if running directly from file and not sourcing: # setwd("~/Dropbox/Fatherinvolv_jmf_s1/revise fatherinvol - Sociological Science/data") # pacman::p_load(mcmcplots,mvtnorm,R2jags...
/analyses/call/call_fistr_nomac_160118.R
no_license
brettory-zz/mother-work-hours-father-involvement
R
false
false
6,906
r
# father involvement in time structuring tasks, random slope of maternal employment, # no macro var with cross-level interaction of leave # if running directly from file and not sourcing: # setwd("~/Dropbox/Fatherinvolv_jmf_s1/revise fatherinvol - Sociological Science/data") # pacman::p_load(mcmcplots,mvtnorm,R2jags...