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
redsvd <- function(A,num){ if (is(A,"CsparseMatrix")) { if (is(A, "symmetricMatrix")) { A <- as(A, "dgCMatrix") } redSVDwrap(A, num) } } redpca <- function(A,num){ if (is(A,"CsparseMatrix")) { if (is(A, "symmetricMatrix")) { A <- as(A, "dgCMatrix") } redPCAwrap(A, num) } } ...
/R/redsvd.R
no_license
kafku/RRedsvd
R
false
false
484
r
redsvd <- function(A,num){ if (is(A,"CsparseMatrix")) { if (is(A, "symmetricMatrix")) { A <- as(A, "dgCMatrix") } redSVDwrap(A, num) } } redpca <- function(A,num){ if (is(A,"CsparseMatrix")) { if (is(A, "symmetricMatrix")) { A <- as(A, "dgCMatrix") } redPCAwrap(A, num) } } ...
library(glmnet) mydata = read.table("../../../../TrainingSet/FullSet/Classifier/upper_aerodigestive_tract.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="mse",alpha=0.15,family="gaussian",standardize=FALSE) sink('./upper_aer...
/Model/EN/Classifier/upper_aerodigestive_tract/upper_aerodigestive_tract_030.R
no_license
esbgkannan/QSMART
R
false
false
388
r
library(glmnet) mydata = read.table("../../../../TrainingSet/FullSet/Classifier/upper_aerodigestive_tract.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="mse",alpha=0.15,family="gaussian",standardize=FALSE) sink('./upper_aer...
testlist <- list(G = numeric(0), Rn = numeric(0), atmp = c(3.97314911878724e-307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), relh = c(1.46950620900256e+302, 4.11932782999429e-175, -3.8...
/meteor/inst/testfiles/ET0_PriestleyTaylor/AFL_ET0_PriestleyTaylor/ET0_PriestleyTaylor_valgrind_files/1615843845-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
2,233
r
testlist <- list(G = numeric(0), Rn = numeric(0), atmp = c(3.97314911878724e-307, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), relh = c(1.46950620900256e+302, 4.11932782999429e-175, -3.8...
##--------------- ## Functions to cache the inverse of a matrix ## makeCacheMatrix:creates a matrix that caches its inverse. makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { x <<- y inv <<- NULL } get <- function() x setinverse <- function(inverse) inv <<- inverse getin...
/cachematrix.R
no_license
Gopinath-B/ProgrammingAssignment2
R
false
false
813
r
##--------------- ## Functions to cache the inverse of a matrix ## makeCacheMatrix:creates a matrix that caches its inverse. makeCacheMatrix <- function(x = matrix()) { inv <- NULL set <- function(y) { x <<- y inv <<- NULL } get <- function() x setinverse <- function(inverse) inv <<- inverse getin...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/readOpenMSFile.R \name{readOpenMSFile} \alias{readOpenMSFile} \title{Read csv files exported by OpenMS} \usage{ readOpenMSFile( fileName = NULL, path = NULL, normalizeMeth = "median", refLi = NULL, sampleNames = NULL, quantCol = "...
/man/readOpenMSFile.Rd
no_license
cran/wrProteo
R
false
true
4,298
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/readOpenMSFile.R \name{readOpenMSFile} \alias{readOpenMSFile} \title{Read csv files exported by OpenMS} \usage{ readOpenMSFile( fileName = NULL, path = NULL, normalizeMeth = "median", refLi = NULL, sampleNames = NULL, quantCol = "...
x<-3 y<-3 x+y
/add.R
no_license
jessie6jx/Practice
R
false
false
13
r
x<-3 y<-3 x+y
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cloudmonitoring_objects.R \name{PointDistribution} \alias{PointDistribution} \title{PointDistribution Object} \usage{ PointDistribution(buckets = NULL, overflowBucket = NULL, underflowBucket = NULL) } \arguments{ \item{buckets}{The finite b...
/googlecloudmonitoringv2beta2.auto/man/PointDistribution.Rd
permissive
Phippsy/autoGoogleAPI
R
false
true
823
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cloudmonitoring_objects.R \name{PointDistribution} \alias{PointDistribution} \title{PointDistribution Object} \usage{ PointDistribution(buckets = NULL, overflowBucket = NULL, underflowBucket = NULL) } \arguments{ \item{buckets}{The finite b...
library(MPV) ### Name: table.b1 ### Title: Table B1 ### Aliases: table.b1 ### Keywords: datasets ### ** Examples data(table.b1) attach(table.b1) y.lm <- lm(y ~ x2 + x7 + x8) summary(y.lm) # over-all F-test: y.null <- lm(y ~ 1) anova(y.null, y.lm) # partial F-test for x7: y7.lm <- lm(y ~ x2 + x8) anova(y7.lm, y.lm) ...
/data/genthat_extracted_code/MPV/examples/table.b1.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
340
r
library(MPV) ### Name: table.b1 ### Title: Table B1 ### Aliases: table.b1 ### Keywords: datasets ### ** Examples data(table.b1) attach(table.b1) y.lm <- lm(y ~ x2 + x7 + x8) summary(y.lm) # over-all F-test: y.null <- lm(y ~ 1) anova(y.null, y.lm) # partial F-test for x7: y7.lm <- lm(y ~ x2 + x8) anova(y7.lm, y.lm) ...
#week 2 quiz #Question 1 install.packages("httr") library(httr) # 1. Find OAuth settings for github: # http://developer.github.com/v3/oauth/ oauth_endpoints("github") # 2. To make your own application, register at at # https://github.com/settings/applications. # Developer applications > register an applicatio...
/week2/week2_quiz.R
no_license
xyCindy/Getting-and-Cleaning-Data
R
false
false
2,450
r
#week 2 quiz #Question 1 install.packages("httr") library(httr) # 1. Find OAuth settings for github: # http://developer.github.com/v3/oauth/ oauth_endpoints("github") # 2. To make your own application, register at at # https://github.com/settings/applications. # Developer applications > register an applicatio...
# data.table is required for fread() library(data.table) # Download the file if it doesn't exist if(!file.exists("household_power_consumption.txt")) { download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip", method = "curl", destfile = "household_power_consumption.zip") ...
/plot4.R
no_license
ahmednasir91/ExData_Plotting1
R
false
false
1,599
r
# data.table is required for fread() library(data.table) # Download the file if it doesn't exist if(!file.exists("household_power_consumption.txt")) { download.file("https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip", method = "curl", destfile = "household_power_consumption.zip") ...
# # 1 2 3 4 5 6 7 8 9 10 # # par <- c(phi_A, phi_I, theta_I, theta_A, phi_N, theta_N, d_M, phi_B, theta_B, h) # par <- c(.95, .1, 1, 20, .1, 1, .5, .5, 12, .05) # pop = 1000 # tol = 10^-3 # num = 100 # n <- 1 Psi <- funct...
/R/Cleaned Internal Functions.R
no_license
NW-Anderson/IntrogressedAllele
R
false
false
4,933
r
# # 1 2 3 4 5 6 7 8 9 10 # # par <- c(phi_A, phi_I, theta_I, theta_A, phi_N, theta_N, d_M, phi_B, theta_B, h) # par <- c(.95, .1, 1, 20, .1, 1, .5, .5, 12, .05) # pop = 1000 # tol = 10^-3 # num = 100 # n <- 1 Psi <- funct...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/account_account_name.R \name{account_name} \alias{account_name} \title{Get an account's name} \usage{ account_name(account) } \arguments{ \item{account}{The account object.} } \value{ A string holding the account's name } \description{ Return...
/man/account_name.Rd
permissive
brandseye/brandseyer2
R
false
true
496
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/account_account_name.R \name{account_name} \alias{account_name} \title{Get an account's name} \usage{ account_name(account) } \arguments{ \item{account}{The account object.} } \value{ A string holding the account's name } \description{ Return...
# 1. Full dataset --------------------------------------------------------- # Prepare the data for reporting, i.e. creating a # filtered_data with the data for the target center # you can pass the argument through the params$center command if (params$center == 999) { # this loop actually does not filter # this...
/R/01_prepare.R
no_license
EeethB/tmplt-params-report
R
false
false
665
r
# 1. Full dataset --------------------------------------------------------- # Prepare the data for reporting, i.e. creating a # filtered_data with the data for the target center # you can pass the argument through the params$center command if (params$center == 999) { # this loop actually does not filter # this...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/redshift_service.R \name{redshift} \alias{redshift} \title{Amazon Redshift} \usage{ redshift(config = list()) } \arguments{ \item{config}{Optional configuration of credentials, endpoint, and/or region.} } \description{ \strong{Overview} This...
/cran/paws.database/man/redshift.Rd
permissive
jcheng5/paws
R
false
true
16,181
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/redshift_service.R \name{redshift} \alias{redshift} \title{Amazon Redshift} \usage{ redshift(config = list()) } \arguments{ \item{config}{Optional configuration of credentials, endpoint, and/or region.} } \description{ \strong{Overview} This...
plot3 <- function(){ summary <- tbl_df(readRDS("summarySCC_PM25.rds")) classcodes <- readRDS("Source_Classification_Code.rds") library(dplyr) summary <- summary %>% group_by(year, type) %>% filter(fips == "24510") %>% summarise(tot...
/plot3.R
no_license
MichaelCHarrison/EPA-National-Emissions-Analysis
R
false
false
794
r
plot3 <- function(){ summary <- tbl_df(readRDS("summarySCC_PM25.rds")) classcodes <- readRDS("Source_Classification_Code.rds") library(dplyr) summary <- summary %>% group_by(year, type) %>% filter(fips == "24510") %>% summarise(tot...
genotypes <- snakemake@input[["genotypes"]] out <- snakemake@output[["output"]] print(out) kinship.matrices <- list() kinship.matrices[["K.chr"]] <- list() for(genoF in genotypes){ load(genoF) print(genoF) base <- basename(genoF) tokens <- strsplit(base, split=".", fixed=T) chrm <- tokens[[1]][1] chrm <- subst...
/confidence_interval_pipeline_pruned/scripts/makeKinshipRData.R
no_license
jzou1115/MegaAnalysis_CFW_Code
R
false
false
1,426
r
genotypes <- snakemake@input[["genotypes"]] out <- snakemake@output[["output"]] print(out) kinship.matrices <- list() kinship.matrices[["K.chr"]] <- list() for(genoF in genotypes){ load(genoF) print(genoF) base <- basename(genoF) tokens <- strsplit(base, split=".", fixed=T) chrm <- tokens[[1]][1] chrm <- subst...
#### symmetricMatrix : virtual class ### autogenerate coercions ### as(*, "symmetricMatrix") ### ~~~~~~~~~~~~~~~~~~~~~~~~~ ## This should work at package install time when package:Matrix does not exist! if(FALSE) local({ allCl <- getClasses("package:Matrix") ## << fails at install time!!!! clss <- allCl[s...
/branches/Matrix-APIchange/R/symmetricMatrix.R
no_license
LTLA/Matrix
R
false
false
986
r
#### symmetricMatrix : virtual class ### autogenerate coercions ### as(*, "symmetricMatrix") ### ~~~~~~~~~~~~~~~~~~~~~~~~~ ## This should work at package install time when package:Matrix does not exist! if(FALSE) local({ allCl <- getClasses("package:Matrix") ## << fails at install time!!!! clss <- allCl[s...
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function #this functions initiates a special oject that can cache the inverse of a matrix makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { ...
/cachematrix.R
no_license
jinq678/ProgrammingAssignment2
R
false
false
1,109
r
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function #this functions initiates a special oject that can cache the inverse of a matrix makeCacheMatrix <- function(x = matrix()) { m <- NULL set <- function(y) { ...
#' Generate True Partial Correlation Matrix #' #' @param p number of variables (nodes) #' #' @param edge_prob connectivity #' #' @param lb lower bound for the partial correlations #' #' @param ub upper bound for the partial correlations #' #' @note The function checks for a valid matrix (positive definite), ...
/R/gen_pcors.R
no_license
cran/GGMnonreg
R
false
false
1,612
r
#' Generate True Partial Correlation Matrix #' #' @param p number of variables (nodes) #' #' @param edge_prob connectivity #' #' @param lb lower bound for the partial correlations #' #' @param ub upper bound for the partial correlations #' #' @note The function checks for a valid matrix (positive definite), ...
# Analysis of forest types based on AGBiomass VAR <- "agbiomass" ### NAME OF SCENARIOS #### mgmt.scenarios <- c("210927_conserv_current_rep1", "210927_conserv_rcp45_rep1", "210927_conserv_rcp85_rep1", "210927_nomanag_current_rep1", "21092...
/pre-analysis/forest_types.R
no_license
MARIASUAM/harvest_x_climate_LANDIS
R
false
false
11,384
r
# Analysis of forest types based on AGBiomass VAR <- "agbiomass" ### NAME OF SCENARIOS #### mgmt.scenarios <- c("210927_conserv_current_rep1", "210927_conserv_rcp45_rep1", "210927_conserv_rcp85_rep1", "210927_nomanag_current_rep1", "21092...
#' Access the item metadata from an Internet Archive item #' @param items A list object describing an Internet Archive items returned from #' the API. #' @return A data frame containing the metadata, with columns \code{id} for the #' item identifier, \code{field} for the name of the metadata field, and #' \code{v...
/internetarchive/R/ia_metadata.R
no_license
ingted/R-Examples
R
false
false
843
r
#' Access the item metadata from an Internet Archive item #' @param items A list object describing an Internet Archive items returned from #' the API. #' @return A data frame containing the metadata, with columns \code{id} for the #' item identifier, \code{field} for the name of the metadata field, and #' \code{v...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/soundex.R \name{soundex} \alias{soundex} \title{Calculate the similarity based on the Soundex distance} \usage{ soundex(str_1, str_2, algorithm = soundex_algorithm("en")) } \arguments{ \item{str_1}{first string for calculating the similarity}...
/man/soundex.Rd
no_license
drodriguezperez/financialsanctions
R
false
true
725
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/soundex.R \name{soundex} \alias{soundex} \title{Calculate the similarity based on the Soundex distance} \usage{ soundex(str_1, str_2, algorithm = soundex_algorithm("en")) } \arguments{ \item{str_1}{first string for calculating the similarity}...
#' @title Generate data for critical-differences plot. #' #' @description Generates data that can be used to plot a #' critical differences plot. Computes the critical differences according #' to either the #' \code{"Bonferroni-Dunn"} test or the \code{"Nemenyi"} test.\cr #' \code{"Bonferroni-Dunn"} usually yields high...
/R/plotCritDifferences.R
no_license
jimhester/mlr
R
false
false
10,665
r
#' @title Generate data for critical-differences plot. #' #' @description Generates data that can be used to plot a #' critical differences plot. Computes the critical differences according #' to either the #' \code{"Bonferroni-Dunn"} test or the \code{"Nemenyi"} test.\cr #' \code{"Bonferroni-Dunn"} usually yields high...
# Vectors 2 # run this, then do tasks below set.seed(1234) x1 <- rnorm(5) x2 <- rnorm(20, mean=0.5) # Select the elements of x1 that are less than 0 # Select the elements of x2 that are greater than 1 # Select the elements of x1 between 0 and 1 # Trim x2 to the first 5 elements (select first 5 and save back t...
/exercises/part1/vectors2.R
permissive
hkejigu/r-online-2020
R
false
false
438
r
# Vectors 2 # run this, then do tasks below set.seed(1234) x1 <- rnorm(5) x2 <- rnorm(20, mean=0.5) # Select the elements of x1 that are less than 0 # Select the elements of x2 that are greater than 1 # Select the elements of x1 between 0 and 1 # Trim x2 to the first 5 elements (select first 5 and save back t...
x <- 1+1 y <- 2+2 z <- x+y zz <- x-y some_string <- "whattt?"
/github test 1.R
no_license
alexmokj/test_repo
R
false
false
65
r
x <- 1+1 y <- 2+2 z <- x+y zz <- x-y some_string <- "whattt?"
/man/VecLat.Rd
no_license
cran/pgs
R
false
false
889
rd
stab_bgamma <- function(S = 200, C = 0.05, Osd = 0.4, iters = 10000){ ress <- matrix(data = 0, nrow = iters, ncol = 2); A0_count <- 0; A1_count <- 0; while(iters > 0){ A_dat <- rnorm(n = S * S, mean = 0, sd = Osd); A_mat <- matrix(data = A_dat, nrow = S); C_dat <- rbinom(n...
/notebook/R_old/find_bi_gamma.R
no_license
bradduthie/RandomMatrixStability
R
false
false
3,762
r
stab_bgamma <- function(S = 200, C = 0.05, Osd = 0.4, iters = 10000){ ress <- matrix(data = 0, nrow = iters, ncol = 2); A0_count <- 0; A1_count <- 0; while(iters > 0){ A_dat <- rnorm(n = S * S, mean = 0, sd = Osd); A_mat <- matrix(data = A_dat, nrow = S); C_dat <- rbinom(n...
#' Generate a Heatmap of patterns in DNA sequence #' #' @param seq A DNAString of equal length #' @param pattern A nucleotide pattern or PWM #' @param coords Co-ordinates for the heatmap, defaults to c(0, width(windows)) #' @param min.score Minimum score for PWM match #' @param label Label for the heatmap #' @param ......
/R/PatternHeatmap.R
no_license
mgperry/heatmaps
R
false
false
4,167
r
#' Generate a Heatmap of patterns in DNA sequence #' #' @param seq A DNAString of equal length #' @param pattern A nucleotide pattern or PWM #' @param coords Co-ordinates for the heatmap, defaults to c(0, width(windows)) #' @param min.score Minimum score for PWM match #' @param label Label for the heatmap #' @param ......
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/results_functions.R \name{non_dominated_summary} \alias{non_dominated_summary} \title{Summary of the non dominated solutions} \usage{ non_dominated_summary(output, prob_matrix, OS, distancetype = "pearson", usegpu = FALSE) } \arguments{ \it...
/man/non_dominated_summary.Rd
no_license
Hossein-Fallahi/galgo
R
false
true
1,835
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/results_functions.R \name{non_dominated_summary} \alias{non_dominated_summary} \title{Summary of the non dominated solutions} \usage{ non_dominated_summary(output, prob_matrix, OS, distancetype = "pearson", usegpu = FALSE) } \arguments{ \it...
## The following is a pair of functions that cache and compute the inverse of a matrix. makeCacheMatrix <- function(mtx = matrix()) { inverse <- NULL set <- function(x) { mtx <<- x; inverse <<- NULL; } get <- function() return(mtx); setinv <- function(inv) inverse <<- inv; getinv <- function() retu...
/cachematrix.R
no_license
roman79/ProgrammingAssignment2
R
false
false
754
r
## The following is a pair of functions that cache and compute the inverse of a matrix. makeCacheMatrix <- function(mtx = matrix()) { inverse <- NULL set <- function(x) { mtx <<- x; inverse <<- NULL; } get <- function() return(mtx); setinv <- function(inv) inverse <<- inv; getinv <- function() retu...
% Generated by roxygen2 (4.0.1): do not edit by hand \name{predict.l2boost} \alias{predict.l2boost} \title{predict method for l2boost models.} \usage{ \method{predict}{l2boost}(object, xnew = NULL, type = c("fit", "coef"), newdata = xnew, ...) } \arguments{ \item{object}{an l2boost objectect} \item{xnew}{a new desig...
/man/predict.l2boost.Rd
no_license
r-barnes/l2boost
R
false
false
2,813
rd
% Generated by roxygen2 (4.0.1): do not edit by hand \name{predict.l2boost} \alias{predict.l2boost} \title{predict method for l2boost models.} \usage{ \method{predict}{l2boost}(object, xnew = NULL, type = c("fit", "coef"), newdata = xnew, ...) } \arguments{ \item{object}{an l2boost objectect} \item{xnew}{a new desig...
#set working directory and import files setwd("~/Desktop/titanic") library(readr) train <- read_csv("~/Desktop/titanic/train.csv") library(readr) test <- read_csv("~/Desktop/titanic/test.csv")
/getStarted.r
no_license
bfine9618/titanicPredictions
R
false
false
192
r
#set working directory and import files setwd("~/Desktop/titanic") library(readr) train <- read_csv("~/Desktop/titanic/train.csv") library(readr) test <- read_csv("~/Desktop/titanic/test.csv")
omnibus.test <- function(p, method=c("z", "p", "log.p"), N.sim=10000, approximate=FALSE) { # make sure that x is a matrix if(is.vector(p)) p <- matrix(p, ncol=1) if(!is.matrix(p)) stop("p has to be either a vector or matrix.") if(approximate && method != "p") stop("Beta approximation currently only...
/R/omnibus.R
permissive
ThomasTaus/omnibus
R
false
false
3,779
r
omnibus.test <- function(p, method=c("z", "p", "log.p"), N.sim=10000, approximate=FALSE) { # make sure that x is a matrix if(is.vector(p)) p <- matrix(p, ncol=1) if(!is.matrix(p)) stop("p has to be either a vector or matrix.") if(approximate && method != "p") stop("Beta approximation currently only...
####################################### # Author : Harshit Saxena # # (https://github.com/harsh1795) # ####################################### #-------------------------------------------------------------------------------------------------------------------------# # Setting Working Directory ...
/ML_HACKEREARTH/code/ml.R
no_license
harsh1795/Hackathons
R
false
false
13,981
r
####################################### # Author : Harshit Saxena # # (https://github.com/harsh1795) # ####################################### #-------------------------------------------------------------------------------------------------------------------------# # Setting Working Directory ...
# library(readxl) # mip<-read_excel(path="/Users/skiss/OneDrive - Wilfrid Laurier University/projects_folder/CES_Folder/Data/mip.xlsx", col_names=T) # names(mip) # look_for(ces19phone, "important") # library(tidyverse) # ces19phone$q7_lower<-str_to_lower(ces19phone$q7) # names(mip) # mip %>% # select(q7_lower, q7_out...
/R_Scripts/2_14_ces_19_mip_noc_recode.R
no_license
sjkiss/class_voting_canada_2019
R
false
false
2,389
r
# library(readxl) # mip<-read_excel(path="/Users/skiss/OneDrive - Wilfrid Laurier University/projects_folder/CES_Folder/Data/mip.xlsx", col_names=T) # names(mip) # look_for(ces19phone, "important") # library(tidyverse) # ces19phone$q7_lower<-str_to_lower(ces19phone$q7) # names(mip) # mip %>% # select(q7_lower, q7_out...
# This R environment comes with all of CRAN preinstalled, as well as many other helpful packages # The environment is defined by the kaggle/rstats docker image: https://github.com/kaggle/docker-rstats # For example, here's several helpful packages to load in library(ggplot2) # Data visualization library(readr) #...
/Notebooks/r/czak41/notebook029a80d9b5/notebook029a80d9b5.R
no_license
nischalshrestha/automatic_wat_discovery
R
false
false
641
r
# This R environment comes with all of CRAN preinstalled, as well as many other helpful packages # The environment is defined by the kaggle/rstats docker image: https://github.com/kaggle/docker-rstats # For example, here's several helpful packages to load in library(ggplot2) # Data visualization library(readr) #...
## B. What variables have the highest impact on job-satisfaction? multipleLinearRegression = lm(JobSatisfaction ~ AttritionStatus + DistanceFromHome + JobLevel + WorkLifeBalance + PercentSalaryHike + HourlyRate + YearsWithCurrManager + EnvironmentSatisfaction + YearsSinceLastPromotion + EducationLevel + YearsAtCompan...
/questionTwo.R
no_license
gmersy/Undergraduate-Data-Analytics-Competition
R
false
false
1,014
r
## B. What variables have the highest impact on job-satisfaction? multipleLinearRegression = lm(JobSatisfaction ~ AttritionStatus + DistanceFromHome + JobLevel + WorkLifeBalance + PercentSalaryHike + HourlyRate + YearsWithCurrManager + EnvironmentSatisfaction + YearsSinceLastPromotion + EducationLevel + YearsAtCompan...
#Author: Christopher Zarzar #Created: 19-Sep-2016 #NOTES: This script was create to test # whether the atmosphere plays a # statistically significant role on the # imagery collected by the UAS. # This is part of the North Farm experiment # started April 2016 #EDITED ON 10-18-2016 CZ: Discovered that I had...
/z_NorthFarmExperimentCanon_looptest.R
no_license
ChrisZarzar/phd_research
R
false
false
63,213
r
#Author: Christopher Zarzar #Created: 19-Sep-2016 #NOTES: This script was create to test # whether the atmosphere plays a # statistically significant role on the # imagery collected by the UAS. # This is part of the North Farm experiment # started April 2016 #EDITED ON 10-18-2016 CZ: Discovered that I had...
pollutantmean <- function(directory, pollutant, idx = 1:332, removeNA = TRUE){ # set full directory name directory <- paste(getwd(),"/", directory,"/", sep = "") # process files files <- list.files(directory) # initialise empty data frame datfram <- data.frame() # read specified files and appe...
/RProgramming/pollutantmean.R
no_license
phase-plane/datasciencecoursera
R
false
false
545
r
pollutantmean <- function(directory, pollutant, idx = 1:332, removeNA = TRUE){ # set full directory name directory <- paste(getwd(),"/", directory,"/", sep = "") # process files files <- list.files(directory) # initialise empty data frame datfram <- data.frame() # read specified files and appe...
/Common Files/plist:carb.r
no_license
fruitsamples/Movie_From_DataRef
R
false
false
3,537
r
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/embodied.R \name{calc_GH} \alias{calc_GH} \title{Calculate the \code{G} and \code{H} matrices for embodied energy calculations} \usage{ calc_GH( .iomats = NULL, Y = "Y", L_ixp = "L_ixp", R = "R", A = "A", q = "q", G_V = "G_V", ...
/man/calc_GH.Rd
no_license
MatthewHeun/Recca
R
false
true
2,148
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/embodied.R \name{calc_GH} \alias{calc_GH} \title{Calculate the \code{G} and \code{H} matrices for embodied energy calculations} \usage{ calc_GH( .iomats = NULL, Y = "Y", L_ixp = "L_ixp", R = "R", A = "A", q = "q", G_V = "G_V", ...
# Model 8: W - autosome nuclear Mother's curse - 13 Mar 2018 # Invasion and dynamics of nuclear Mother's curse W type with autosomal restorer # female genotypes AAW AaW aaW AAw Aaw aaw # and fitnesses 1 1 1 1 1+sf/2 1+sf # male genotypes AA Aa aa # and fitnesses 1 ...
/model8_freqtrack.R
no_license
mam737/ParentalCurseScripts
R
false
false
2,720
r
# Model 8: W - autosome nuclear Mother's curse - 13 Mar 2018 # Invasion and dynamics of nuclear Mother's curse W type with autosomal restorer # female genotypes AAW AaW aaW AAw Aaw aaw # and fitnesses 1 1 1 1 1+sf/2 1+sf # male genotypes AA Aa aa # and fitnesses 1 ...
#' --- #' title: "Regression and Other Stories: Elections Economy" #' author: "Andrew Gelman, Jennifer Hill, Aki Vehtari" #' date: "`r format(Sys.Date())`" #' --- #' Predicting presidential vote share from the economy. See Chapters #' 1, 7, 8, 9, and 22 in Regression and Other Stories. #' #' ------------- #' #+ set...
/ElectionsEconomy/hibbs.R
no_license
hennamah/RAOS-Examples
R
false
false
12,376
r
#' --- #' title: "Regression and Other Stories: Elections Economy" #' author: "Andrew Gelman, Jennifer Hill, Aki Vehtari" #' date: "`r format(Sys.Date())`" #' --- #' Predicting presidential vote share from the economy. See Chapters #' 1, 7, 8, 9, and 22 in Regression and Other Stories. #' #' ------------- #' #+ set...
context("layers") source("utils.R") test_call_succeeds("layer_input", { layer_input(shape = c(32)) }) test_call_succeeds("layer_dense", { layer_dense(keras_model_sequential(), 32, input_shape = c(784)) }) test_call_succeeds("layer_activation", { keras_model_sequential() %>% layer_dense(32, input_shape = ...
/tests/testthat/test-layers.R
no_license
martinstuder/keras-1
R
false
false
11,857
r
context("layers") source("utils.R") test_call_succeeds("layer_input", { layer_input(shape = c(32)) }) test_call_succeeds("layer_dense", { layer_dense(keras_model_sequential(), 32, input_shape = c(784)) }) test_call_succeeds("layer_activation", { keras_model_sequential() %>% layer_dense(32, input_shape = ...
#plot2.R data1<-read.csv("./household_power_consumption.txt", header = TRUE,sep=";",na.strings = "?", stringsAsFactors = FALSE) data1$Date_new<-as.Date(data1$Date,format="%d/%m/%Y") data1$Date_Time<-paste(data1$Date, data1$Time) data1$Date_Time<-strptime(data1$Date_Time,"%d/%m/%Y %H:%M:%S") dw<-sub...
/Plot2.R
no_license
kostya75/ExData_Plotting1
R
false
false
804
r
#plot2.R data1<-read.csv("./household_power_consumption.txt", header = TRUE,sep=";",na.strings = "?", stringsAsFactors = FALSE) data1$Date_new<-as.Date(data1$Date,format="%d/%m/%Y") data1$Date_Time<-paste(data1$Date, data1$Time) data1$Date_Time<-strptime(data1$Date_Time,"%d/%m/%Y %H:%M:%S") dw<-sub...
###################################################################### # Programme 0 - Import des bases OASIS3 ###################################################################### #Tables disponibles : #oasis3_sujets_complete : table contenant l'ensemble des participants à l'étude #Table oasis3_freesurfer_complete :...
/inst/0_import_bases_oasis3.R
no_license
yoelchetboun/dementiaproject
R
false
false
2,432
r
###################################################################### # Programme 0 - Import des bases OASIS3 ###################################################################### #Tables disponibles : #oasis3_sujets_complete : table contenant l'ensemble des participants à l'étude #Table oasis3_freesurfer_complete :...
library(sharpshootR) library(plyr) library(reshape2) library(vegan) # load sample data associated with the amador soil series data(amador) d <- amador ## this is messy way to demonstrate anything.. but allows for some inspection of what is happening... ## perhaps a debugging output would help? # arguments to compo...
/Network-talk/demo-adj-mat-creation.R
no_license
dylanbeaudette/2017Pedometrics
R
false
false
2,217
r
library(sharpshootR) library(plyr) library(reshape2) library(vegan) # load sample data associated with the amador soil series data(amador) d <- amador ## this is messy way to demonstrate anything.. but allows for some inspection of what is happening... ## perhaps a debugging output would help? # arguments to compo...
# cosine similarity for income dataset # Mike Zhang (zhang.4660) # Yiran Cao (cao.805) ####################################################################### # import the dataset from the terminal rm(list=ls()) print("loading dataframe from file...") income_tr <- read.csv("income_tr.csv",stringsAsFactors = FALSE) ...
/kNN_income.R
no_license
cyrmeow/k-NN
R
false
false
12,710
r
# cosine similarity for income dataset # Mike Zhang (zhang.4660) # Yiran Cao (cao.805) ####################################################################### # import the dataset from the terminal rm(list=ls()) print("loading dataframe from file...") income_tr <- read.csv("income_tr.csv",stringsAsFactors = FALSE) ...
####################################################################### ##### file: 5a_preprocForNMF.R ##### ##### input: biological or synthetic datasets located in ##### ##### ./results/.current.run/biologicalData|syntheticData ##### ##### output: *.csv files adequa...
/src/5a_preprocForNMF.R
no_license
gabrielodom/IamComparison
R
false
false
9,869
r
####################################################################### ##### file: 5a_preprocForNMF.R ##### ##### input: biological or synthetic datasets located in ##### ##### ./results/.current.run/biologicalData|syntheticData ##### ##### output: *.csv files adequa...
a = read.csv(file.choose()) View(a) attach(a) summary(a) plot(a$Calories.Consumed , a$Weight.gained..grams.) cor(a$Calories.Consumed,a$Weight.gained..grams.) reg <- lm(Weight.gained..grams.~Calories.Consumed) summary(reg) pred= predict(reg) reg$residuals sum(reg$residuals) mean(reg$residuals) sqrt(sum(reg$residuals^2)/...
/4. Simple linear regression/Calories_consumed Simple Linear Regression.R
no_license
aditya2505/ExcelR_All_Assignments
R
false
false
2,023
r
a = read.csv(file.choose()) View(a) attach(a) summary(a) plot(a$Calories.Consumed , a$Weight.gained..grams.) cor(a$Calories.Consumed,a$Weight.gained..grams.) reg <- lm(Weight.gained..grams.~Calories.Consumed) summary(reg) pred= predict(reg) reg$residuals sum(reg$residuals) mean(reg$residuals) sqrt(sum(reg$residuals^2)/...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppExports.R \name{Kolmogorov_Waring} \alias{Kolmogorov_Waring} \title{Kolmogorov Waring} \usage{ Kolmogorov_Waring(n, a, b, theta) } \arguments{ \item{n}{Length of vector to be generated} \item{a}{Vector of parameters of the Kolmogorov War...
/man/Kolmogorov_Waring.Rd
no_license
gragedaa/SkeweDF
R
false
true
599
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/RcppExports.R \name{Kolmogorov_Waring} \alias{Kolmogorov_Waring} \title{Kolmogorov Waring} \usage{ Kolmogorov_Waring(n, a, b, theta) } \arguments{ \item{n}{Length of vector to be generated} \item{a}{Vector of parameters of the Kolmogorov War...
testlist <- list(a = 0L, b = 0L, x = c(1154641518L, 1852751078L, -33554432L, 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)) result <- do.call(grattan:::an...
/grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610387129-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
350
r
testlist <- list(a = 0L, b = 0L, x = c(1154641518L, 1852751078L, -33554432L, 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)) result <- do.call(grattan:::an...
metatree::PaleobiologyDBTaxaQuerier(taxon_no = "1", taxon_name = "Chacopterygus_minimus")
/RScripts/Find_PBDB_Number_mammals.R
no_license
shellert/MammalJawTree
R
false
false
90
r
metatree::PaleobiologyDBTaxaQuerier(taxon_no = "1", taxon_name = "Chacopterygus_minimus")
allData <- read.table("household_power_consumption.txt", header = TRUE, sep=";", quote = "", na.strings = "?", stringsAsFactors = F, colClasses = c("character", "character", rep("numeric", 7))) filteredD...
/plot1.R
no_license
newffy/ExData_Plotting1
R
false
false
697
r
allData <- read.table("household_power_consumption.txt", header = TRUE, sep=";", quote = "", na.strings = "?", stringsAsFactors = F, colClasses = c("character", "character", rep("numeric", 7))) filteredD...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Partition_kmeans_func.R \name{kmeans_icc} \alias{kmeans_icc} \title{K-means dimension reduction} \usage{ kmeans_icc(mymat, threshold.icc) } \arguments{ \item{mymat}{Full dataset, NxP matrix or dataframe with N samples in rows and P variables ...
/man/kmeans_icc.Rd
no_license
USCbiostats/partition.archive
R
false
true
2,059
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/Partition_kmeans_func.R \name{kmeans_icc} \alias{kmeans_icc} \title{K-means dimension reduction} \usage{ kmeans_icc(mymat, threshold.icc) } \arguments{ \item{mymat}{Full dataset, NxP matrix or dataframe with N samples in rows and P variables ...
# redcap_compare-------------------------------- # Documentation #' Compare multiple REDCap projects to determine discrepancies in structure or user rights. #' @description Used to compare multiple REDCap projects to determine discrepancies in structure or user rights. #' @param redcap_project_uri URI (Uniform Resource...
/R/redcap_compare.R
no_license
studentmicky/collaborator
R
false
false
5,050
r
# redcap_compare-------------------------------- # Documentation #' Compare multiple REDCap projects to determine discrepancies in structure or user rights. #' @description Used to compare multiple REDCap projects to determine discrepancies in structure or user rights. #' @param redcap_project_uri URI (Uniform Resource...
step <- 20 t <- seq(0, step) y1 <- sin(2*t*3.14/step) y2 <- cos(2*t*3.14/step) plot(t, y1, type = "b", frame = FALSE, pch = 19, col = "red", xlab = "x", ylab = "y", lty = 1, lwd = 1) lines(t, y2, pch = 18, col = "blue", type = "b", lty = 2, lwd = 1) legend("topleft", legend = c("sin", "cos"), ...
/06-data-frames/30_plot_lines.R
no_license
xmorgan/r-examples
R
false
false
370
r
step <- 20 t <- seq(0, step) y1 <- sin(2*t*3.14/step) y2 <- cos(2*t*3.14/step) plot(t, y1, type = "b", frame = FALSE, pch = 19, col = "red", xlab = "x", ylab = "y", lty = 1, lwd = 1) lines(t, y2, pch = 18, col = "blue", type = "b", lty = 2, lwd = 1) legend("topleft", legend = c("sin", "cos"), ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{mat_meta_cols} \alias{mat_meta_cols} \title{PSUT matrix formation meta information column names} \format{ A string list with 6 entries. \describe{ \item{matnames}{The name of the column that contains matrix names.}...
/man/mat_meta_cols.Rd
no_license
MatthewHeun/IEATools
R
false
true
979
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/data.R \docType{data} \name{mat_meta_cols} \alias{mat_meta_cols} \title{PSUT matrix formation meta information column names} \format{ A string list with 6 entries. \describe{ \item{matnames}{The name of the column that contains matrix names.}...
#' Select the Optimal Biological Dose (OBD) for Single-agent Phase I/II Trials #' #' This function selects the optimal biological dose (OBD) at the end of a single-agent phase I/II trial. #' @param target.toxicity The target dose-limiting toxicity (DLT) rate. #' @param target.efficacy The target efficacy rate. #' @par...
/R/select.obd.kb.R
no_license
hongyingsun1101/KEYBOARDR
R
false
false
10,951
r
#' Select the Optimal Biological Dose (OBD) for Single-agent Phase I/II Trials #' #' This function selects the optimal biological dose (OBD) at the end of a single-agent phase I/II trial. #' @param target.toxicity The target dose-limiting toxicity (DLT) rate. #' @param target.efficacy The target efficacy rate. #' @par...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/icevision_dataloaders.R \name{efficientdet_train_dl} \alias{efficientdet_train_dl} \title{Efficientdet train dataloader} \usage{ efficientdet_train_dl(dataset, batch_tfms = NULL, ...) } \arguments{ \item{dataset}{Possibly a `Dataset` object, ...
/man/efficientdet_train_dl.Rd
permissive
Cdk29/fastai
R
false
true
765
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/icevision_dataloaders.R \name{efficientdet_train_dl} \alias{efficientdet_train_dl} \title{Efficientdet train dataloader} \usage{ efficientdet_train_dl(dataset, batch_tfms = NULL, ...) } \arguments{ \item{dataset}{Possibly a `Dataset` object, ...
library(dplyr) library(ggplot2) library(magrittr) library(gmodels) library(arm) DAD2Data <- read.csv("Data/DAD2Data.csv",stringsAsFactors=T) COMTData <- read.csv("Data/COMT_RS4680.csv",stringsAsFactors=F) BehaveData <- read.csv("Data/PING_Behavior.csv",stringsAsFactors=FALSE) Data <- DAD2Data %>% left_join(BehaveDa...
/BehavioralData.R
no_license
Rob-StLouis/ping
R
false
false
2,840
r
library(dplyr) library(ggplot2) library(magrittr) library(gmodels) library(arm) DAD2Data <- read.csv("Data/DAD2Data.csv",stringsAsFactors=T) COMTData <- read.csv("Data/COMT_RS4680.csv",stringsAsFactors=F) BehaveData <- read.csv("Data/PING_Behavior.csv",stringsAsFactors=FALSE) Data <- DAD2Data %>% left_join(BehaveDa...
################################################################################ ## Script Name: Network analysis with DNA-hyperauthor data ## Author: Ly Dinh ## Date Created: April 24, 2018 ################################################################################ ## Data Sources ## Network data: Co-Authorship ...
/DatasetsAndCodes/Dinh_Cheng_hypernet.R
no_license
yiyunyc2/ASIST18
R
false
false
14,500
r
################################################################################ ## Script Name: Network analysis with DNA-hyperauthor data ## Author: Ly Dinh ## Date Created: April 24, 2018 ################################################################################ ## Data Sources ## Network data: Co-Authorship ...
#' Create Summary Table for Fitted Generalized Linear Model #' #' Creates a table summarizing a GLM fit using the \code{\link[stats]{glm}} #' function. #' #' #' @param fit Fitted \code{\link[stats]{glm}} object. #' @param columns Character vector specifying what columns to include. Choices #' for each element a...
/R/archived/tabglm-2020-03-18.R
no_license
cran/tab
R
false
false
16,301
r
#' Create Summary Table for Fitted Generalized Linear Model #' #' Creates a table summarizing a GLM fit using the \code{\link[stats]{glm}} #' function. #' #' #' @param fit Fitted \code{\link[stats]{glm}} object. #' @param columns Character vector specifying what columns to include. Choices #' for each element a...
############################################################################################################################################ ################################## S I M U L A T O R S ############################################ ######################################...
/R/simulators.R
no_license
mfasiolo/synlik_dev
R
false
false
8,829
r
############################################################################################################################################ ################################## S I M U L A T O R S ############################################ ######################################...
\alias{gtkCheckMenuItemSetDrawAsRadio} \name{gtkCheckMenuItemSetDrawAsRadio} \title{gtkCheckMenuItemSetDrawAsRadio} \description{Sets whether \code{check.menu.item} is drawn like a \code{\link{GtkRadioMenuItem}}} \usage{gtkCheckMenuItemSetDrawAsRadio(object, draw.as.radio)} \arguments{ \item{\verb{object}}{a \code{\lin...
/RGtk2/man/gtkCheckMenuItemSetDrawAsRadio.Rd
no_license
lawremi/RGtk2
R
false
false
542
rd
\alias{gtkCheckMenuItemSetDrawAsRadio} \name{gtkCheckMenuItemSetDrawAsRadio} \title{gtkCheckMenuItemSetDrawAsRadio} \description{Sets whether \code{check.menu.item} is drawn like a \code{\link{GtkRadioMenuItem}}} \usage{gtkCheckMenuItemSetDrawAsRadio(object, draw.as.radio)} \arguments{ \item{\verb{object}}{a \code{\lin...
test_feature_labels <- read.table("./UCI_HAR_Dataset/features.txt") test_feature_labels <- test_feature_labels[, 2] test_feature_data <- read.table("./UCI_HAR_Dataset/test/X_test.txt", col.names = test_feature_labels) Activities <- read.table("./UCI_HAR_Dataset/test/y_test.txt", col.names = c("Activities")) Activities ...
/Cleaning_Data/run_analysis.R
no_license
humble-coder/datascience
R
false
false
2,226
r
test_feature_labels <- read.table("./UCI_HAR_Dataset/features.txt") test_feature_labels <- test_feature_labels[, 2] test_feature_data <- read.table("./UCI_HAR_Dataset/test/X_test.txt", col.names = test_feature_labels) Activities <- read.table("./UCI_HAR_Dataset/test/y_test.txt", col.names = c("Activities")) Activities ...
library(ggplot2) mtcars mtcars %>% arrange(wt) mtcars %>% arrange(desc(wt)) mtcars %>% arrange(gear, wt) mtcars %>% filter(wt>=3 & vs==1) %>% select(-mpg, -cyl) %>% arrange(wt) %>% head(5) mtcars %>% filter(wt>=3 & vs==1) %>% select(-mpg, -cyl) %>% arrange(desc(wt)) %>% he...
/R/quiz/quiz05.R
no_license
JoohyeonBaek/K-Digital
R
false
false
953
r
library(ggplot2) mtcars mtcars %>% arrange(wt) mtcars %>% arrange(desc(wt)) mtcars %>% arrange(gear, wt) mtcars %>% filter(wt>=3 & vs==1) %>% select(-mpg, -cyl) %>% arrange(wt) %>% head(5) mtcars %>% filter(wt>=3 & vs==1) %>% select(-mpg, -cyl) %>% arrange(desc(wt)) %>% he...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/imports.R \docType{import} \name{reexports} \alias{\%>\%} \alias{reexports} \title{Objects exported from other packages} \description{ These objects are imported from other packages. Follow the links below to see their documentation. \descri...
/man/reexports.Rd
no_license
JohnNay/rtweet
R
false
true
396
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/imports.R \docType{import} \name{reexports} \alias{\%>\%} \alias{reexports} \title{Objects exported from other packages} \description{ These objects are imported from other packages. Follow the links below to see their documentation. \descri...
#R_code_variability.r #Faccio un'analisi di pattern spaziali tramite l'uso di indici del paesaggio: ghiacciao del Similaun #osservo la variabilità spaziale library(raster) library(RStoolbox) library(ggplot2) library(gridExtra) # per plottare ggplot insieme install.packages("viridis") library(viridis) # per colorare i p...
/R_code_variability.r
no_license
Mariachiara93x/telerilevamento_2021
R
false
false
2,880
r
#R_code_variability.r #Faccio un'analisi di pattern spaziali tramite l'uso di indici del paesaggio: ghiacciao del Similaun #osservo la variabilità spaziale library(raster) library(RStoolbox) library(ggplot2) library(gridExtra) # per plottare ggplot insieme install.packages("viridis") library(viridis) # per colorare i p...
#clearing the memory rm(list=ls()) #gtetting rid of the plots dev.off() plot.new() getmode <- function(v) { uniqv <- unique(v) uniqv[which.max(tabulate(match(v, uniqv)))] } #explanatory variables must be only categorical. Last col is response calculateFrequencies <- function(dat){ n = nrow(dat) d = ncol(dat) ...
/datasense.R
no_license
ahonarmand-zz/DataSense-ML-competition-2016
R
false
false
17,950
r
#clearing the memory rm(list=ls()) #gtetting rid of the plots dev.off() plot.new() getmode <- function(v) { uniqv <- unique(v) uniqv[which.max(tabulate(match(v, uniqv)))] } #explanatory variables must be only categorical. Last col is response calculateFrequencies <- function(dat){ n = nrow(dat) d = ncol(dat) ...
##Rocco Lucero August 2 2016 ##This script should use RNBEADS DMR output object from e.g. script "GetDMRs_9comps_July19_2016" ## Here we will produce the lists of GO terms and genes over DMRs at various annotation regions ## library(RnBeads) library(biomaRt) library(org.Hs.eg.db) library(annotate) source('my.get.top...
/analysis/GSEA/src/go_terms_over_dmrs.R
no_license
RoccoDLucero/bkfld_gbm_ev
R
false
false
5,567
r
##Rocco Lucero August 2 2016 ##This script should use RNBEADS DMR output object from e.g. script "GetDMRs_9comps_July19_2016" ## Here we will produce the lists of GO terms and genes over DMRs at various annotation regions ## library(RnBeads) library(biomaRt) library(org.Hs.eg.db) library(annotate) source('my.get.top...
#' Fractal as a set of points #' #' Function returns a matrix, where each column is a point on a plane. The matrix represents a fractal of a given density d. #' #' @param f list of functions. #' @param d integer, gives the density of a fractal. #' #' @import stats #' #' @export fractal <- function(f,d){ ...
/Projekt_2/IFSpakietJKM/R/fractal.R
no_license
ultramargarine/ProgramowanieWizualizacja2017
R
false
false
430
r
#' Fractal as a set of points #' #' Function returns a matrix, where each column is a point on a plane. The matrix represents a fractal of a given density d. #' #' @param f list of functions. #' @param d integer, gives the density of a fractal. #' #' @import stats #' #' @export fractal <- function(f,d){ ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/lime-package.r \docType{package} \name{lime-package} \alias{lime-package} \alias{_PACKAGE} \title{lime: Local Interpretable Model-Agnostic Explanations} \description{ \if{html}{\figure{logo.png}{options: align='right'}} When building complex...
/man/lime-package.Rd
permissive
pkopper/lime
R
false
true
2,255
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/lime-package.r \docType{package} \name{lime-package} \alias{lime-package} \alias{_PACKAGE} \title{lime: Local Interpretable Model-Agnostic Explanations} \description{ \if{html}{\figure{logo.png}{options: align='right'}} When building complex...
library(shiny) library(shinyFiles) library(ballgown) shinyUI(pageWithSidebar( # headerPanel( # 'Ballgown Shiny' # ), fluidPage( column(3,offset = 3, titlePanel("Ballgown Shiny App")) ), sidebarPanel( tags$h3('Select your Ballgown folder:'), # Shiny button shinyDirButton(id = 'dir...
/ui.R
no_license
upendrak/Ballgown_shinyfile
R
false
false
3,598
r
library(shiny) library(shinyFiles) library(ballgown) shinyUI(pageWithSidebar( # headerPanel( # 'Ballgown Shiny' # ), fluidPage( column(3,offset = 3, titlePanel("Ballgown Shiny App")) ), sidebarPanel( tags$h3('Select your Ballgown folder:'), # Shiny button shinyDirButton(id = 'dir...
#' Cut numeric vectors in equal weighted buckets. #' #' @param x numeric vector to cut into equal weight buckets. #' @param w numeric vector of weights for each value in x. Default value of #' \code{NULL} uses equal weights. #' @param probs numeric vector of weighted probabilities with values in [0,1], #' ...
/piecewise/equal_weighted_buckets.R
no_license
richardangell/HingeGLM
R
false
false
2,018
r
#' Cut numeric vectors in equal weighted buckets. #' #' @param x numeric vector to cut into equal weight buckets. #' @param w numeric vector of weights for each value in x. Default value of #' \code{NULL} uses equal weights. #' @param probs numeric vector of weighted probabilities with values in [0,1], #' ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_detailled_report.R \encoding{UTF-8} \name{get_detailled_report_paged} \alias{get_detailled_report_paged} \alias{get_detailled_report} \title{get detailled report} \usage{ get_detailled_report_paged(api_token = get_toggl_api_token(), wor...
/man/get_detailled_report_paged.Rd
no_license
stefaneng/togglr
R
false
true
945
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/get_detailled_report.R \encoding{UTF-8} \name{get_detailled_report_paged} \alias{get_detailled_report_paged} \alias{get_detailled_report} \title{get detailled report} \usage{ get_detailled_report_paged(api_token = get_toggl_api_token(), wor...
## functions that build the functions....?? function_docs <- function(api_json_resource_method, api_json){ order_names <- c(api_json_resource_method$parameterOrder, setdiff(names(api_json_resource_method$parameters), api_json_resource_method$parameterOrder)) ##...
/R/discovery_build.R
no_license
jimhester/googleAuthR
R
false
false
9,480
r
## functions that build the functions....?? function_docs <- function(api_json_resource_method, api_json){ order_names <- c(api_json_resource_method$parameterOrder, setdiff(names(api_json_resource_method$parameters), api_json_resource_method$parameterOrder)) ##...
# load_RASS.R # script to read RASS data from # started by Jim Lutz "Thu Nov 22 14:14:35 2018" # set packages & etc source("setup.R") # set up paths to working directories wd_RASS <- "../2009 RASS/" # read the Survdata.csv DT_RASS <- fread(file = paste0(wd_RASS,"Survdata.csv")) # see what's there length(names(DT...
/load_RASS.R
no_license
jim-lutz/CA_WH_analysis
R
false
false
1,708
r
# load_RASS.R # script to read RASS data from # started by Jim Lutz "Thu Nov 22 14:14:35 2018" # set packages & etc source("setup.R") # set up paths to working directories wd_RASS <- "../2009 RASS/" # read the Survdata.csv DT_RASS <- fread(file = paste0(wd_RASS,"Survdata.csv")) # see what's there length(names(DT...
sink("ML_real.txt") library(randomForest) require(caTools) library("MatchIt") library("caret") library("xgboost") library("glmnet") start = Sys.time() x_new<-read.csv("data_x.csv") y_new<-read.csv("twin_pairs_Y.csv") t_new<-read.csv("twin_pairs_T.csv") main<-function(i){ data_all = read.csv(...
/benchmark-R/ML_realdata.R
no_license
kddmatching2020/Flow-matching
R
false
false
5,694
r
sink("ML_real.txt") library(randomForest) require(caTools) library("MatchIt") library("caret") library("xgboost") library("glmnet") start = Sys.time() x_new<-read.csv("data_x.csv") y_new<-read.csv("twin_pairs_Y.csv") t_new<-read.csv("twin_pairs_T.csv") main<-function(i){ data_all = read.csv(...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/selectors.R \docType{data} \name{vars} \alias{vars} \alias{vars_list} \alias{indirect} \alias{indirect_list} \alias{\%to\%} \alias{\%to_list\%} \alias{..} \title{Get variables/range of variables by name/by pattern.} \format{An object of class...
/man/vars.Rd
no_license
bookman900/expss
R
false
true
4,018
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/selectors.R \docType{data} \name{vars} \alias{vars} \alias{vars_list} \alias{indirect} \alias{indirect_list} \alias{\%to\%} \alias{\%to_list\%} \alias{..} \title{Get variables/range of variables by name/by pattern.} \format{An object of class...
\name{mtx0} \alias{mtx0} \docType{data} \title{ internal mtx0 } \description{ intended for internal use only } \usage{mtx0}
/man/mtx0.Rd
no_license
cran/generalCorr
R
false
false
132
rd
\name{mtx0} \alias{mtx0} \docType{data} \title{ internal mtx0 } \description{ intended for internal use only } \usage{mtx0}
library("rsample") library("recipes") library("keras") #MLP use_session_with_seed(44) set.seed(212) raw_data <- read.csv("data.csv", header=TRUE) raw_data <- raw_data[,-1] # positve outcome being epilepsy raw_data$y[raw_data$y != 1] <- 0 raw_data$y <- as.factor(raw_data$y) epil_split <- initial_spl...
/Code/normal_ml/trial_8.R
no_license
jzyee/MISCADA_CoreIIA_Classification
R
false
false
3,915
r
library("rsample") library("recipes") library("keras") #MLP use_session_with_seed(44) set.seed(212) raw_data <- read.csv("data.csv", header=TRUE) raw_data <- raw_data[,-1] # positve outcome being epilepsy raw_data$y[raw_data$y != 1] <- 0 raw_data$y <- as.factor(raw_data$y) epil_split <- initial_spl...
library(RegSDC) ### Name: RoundWhole ### Title: Round values that are close two whole numbers ### Aliases: RoundWhole ### Keywords: internal ### ** Examples x <- c(0.0002, 1.00003, 3.00014) RoundWhole(x) # No values rounded RoundWhole(x, 4) # One value rounded RoundWhole(x, 3) # All values rounded RoundWhole(...
/data/genthat_extracted_code/RegSDC/examples/RoundWhole.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
356
r
library(RegSDC) ### Name: RoundWhole ### Title: Round values that are close two whole numbers ### Aliases: RoundWhole ### Keywords: internal ### ** Examples x <- c(0.0002, 1.00003, 3.00014) RoundWhole(x) # No values rounded RoundWhole(x, 4) # One value rounded RoundWhole(x, 3) # All values rounded RoundWhole(...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/infer.R \name{infer.lbp} \alias{infer.lbp} \title{Inference method using loopy belief propagation} \usage{ infer.lbp(crf, max.iter = 10000, cutoff = 1e-04, verbose = 0) } \arguments{ \item{crf}{The CRF} \item{max.iter}{The maximum allowed it...
/man/infer.lbp.Rd
no_license
LLT0504/CRF
R
false
true
1,181
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/infer.R \name{infer.lbp} \alias{infer.lbp} \title{Inference method using loopy belief propagation} \usage{ infer.lbp(crf, max.iter = 10000, cutoff = 1e-04, verbose = 0) } \arguments{ \item{crf}{The CRF} \item{max.iter}{The maximum allowed it...
testlist <- list(a = 0L, b = 0L, x = c(-1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -268435457L, -1L, -1L, -256L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L)) result <- do.call(grattan:::anyOutside,testlist) str(result)
/grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610127883-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
261
r
testlist <- list(a = 0L, b = 0L, x = c(-1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -1L, -268435457L, -1L, -1L, -256L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L)) result <- do.call(grattan:::anyOutside,testlist) str(result)
# ================================ print.bcthresh ============================= #' Print method for objects of class "bcthresh" #' #' \code{print} method for class "bcthresh". #' #' @param x an object inheriting from class "bcthresh", a result of a call to #' \code{\link{bcthresh}}. #' @param digits An integer. Used...
/R/bcthresh_methods.R
no_license
paulnorthrop/threshr
R
false
false
7,708
r
# ================================ print.bcthresh ============================= #' Print method for objects of class "bcthresh" #' #' \code{print} method for class "bcthresh". #' #' @param x an object inheriting from class "bcthresh", a result of a call to #' \code{\link{bcthresh}}. #' @param digits An integer. Used...
library(phylofactor) library(ggtree) library(grid) library(gridBase) library(ggplot2) source('R/visualization_fcns.R') load('Workspaces/IsZoonotic_phylofactorization') pf <- pf.IsZoonotic Z <- VOlival$IsZoonotic pp=pf.tree(pf) mean(Z[pf$groups[[10]][[2]]]) B <- bins(pf$basis[,1:10]) B <- B[2:11] ...
/Code_and_Data/Scripts/(2)_Visualizing_IsZoonotic_Phylofactorization.R
no_license
BozemanDiseaseLab/virus_phylofactorization
R
false
false
1,280
r
library(phylofactor) library(ggtree) library(grid) library(gridBase) library(ggplot2) source('R/visualization_fcns.R') load('Workspaces/IsZoonotic_phylofactorization') pf <- pf.IsZoonotic Z <- VOlival$IsZoonotic pp=pf.tree(pf) mean(Z[pf$groups[[10]][[2]]]) B <- bins(pf$basis[,1:10]) B <- B[2:11] ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/FPL.R \name{pointsFrame} \alias{pointsFrame} \title{Player Point data frame} \usage{ pointsFrame(fpl = NULL, maxWeek = NULL) } \arguments{ \item{fpl}{Output from getFPLData} \item{maxWeek}{maximum week number to run (current week if set to N...
/man/pointsFrame.Rd
no_license
harveyl888/fplR
R
false
true
407
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/FPL.R \name{pointsFrame} \alias{pointsFrame} \title{Player Point data frame} \usage{ pointsFrame(fpl = NULL, maxWeek = NULL) } \arguments{ \item{fpl}{Output from getFPLData} \item{maxWeek}{maximum week number to run (current week if set to N...
#=============================================================================== # 01-models-figure.R # Purpose: To replicate Figure X of the paper, where we report the results of # a set of 5 statistical models # Article: "The (null) effects of happiness on affective polarization, conspiracy # ...
/figures/01-models-figure.R
no_license
CasAndreu/null-effects-happiness
R
false
false
6,012
r
#=============================================================================== # 01-models-figure.R # Purpose: To replicate Figure X of the paper, where we report the results of # a set of 5 statistical models # Article: "The (null) effects of happiness on affective polarization, conspiracy # ...
library(dplyr) #0 Downloading Dataset into data folder and naming it as Dataset.zip if(!file.exists("./data")){dir.create("./data")} fileURL<- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" download.file(fileURL, destfile = "./data/Dataset.zip") #0.1 Unziping the download...
/run_analysis.R
no_license
AshishVeera/GettingAndCleaningDataCourseProject
R
false
false
3,039
r
library(dplyr) #0 Downloading Dataset into data folder and naming it as Dataset.zip if(!file.exists("./data")){dir.create("./data")} fileURL<- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip" download.file(fileURL, destfile = "./data/Dataset.zip") #0.1 Unziping the download...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cognitoidentityprovider_operations.R \name{cognitoidentityprovider_set_user_mfa_preference} \alias{cognitoidentityprovider_set_user_mfa_preference} \title{Set the user's multi-factor authentication (MFA) method preference, including which MFA...
/paws/man/cognitoidentityprovider_set_user_mfa_preference.Rd
permissive
sanchezvivi/paws
R
false
true
1,806
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cognitoidentityprovider_operations.R \name{cognitoidentityprovider_set_user_mfa_preference} \alias{cognitoidentityprovider_set_user_mfa_preference} \title{Set the user's multi-factor authentication (MFA) method preference, including which MFA...
# template for diagnosing heteroscedasticity and performing WLS regression library(pacman) p_load(broom, #for tidying data car, #regression assist corrr, #for exploring correlations dplyr, #for data manipulation ggplot2,#for pretty plots modelr,#modeling rio #fo...
/WLS.R
no_license
sebastianmarinc/psych-example-code
R
false
false
1,607
r
# template for diagnosing heteroscedasticity and performing WLS regression library(pacman) p_load(broom, #for tidying data car, #regression assist corrr, #for exploring correlations dplyr, #for data manipulation ggplot2,#for pretty plots modelr,#modeling rio #fo...
#' Creates list with parameters to be filled while processng #' #' @return list with instantiated fields #' @export RestimoteObject <- function(){ obj <- list() obj$participant_id <- "" obj$experiment_name <- "" obj$session <- NA obj$info <- list() obj$n_trials <- NA obj$location_size <- NA obj$log <-...
/R/restimote-object.R
no_license
hejtmy/restimoter
R
false
false
459
r
#' Creates list with parameters to be filled while processng #' #' @return list with instantiated fields #' @export RestimoteObject <- function(){ obj <- list() obj$participant_id <- "" obj$experiment_name <- "" obj$session <- NA obj$info <- list() obj$n_trials <- NA obj$location_size <- NA obj$log <-...
library(qtl) # library(snowfall) load("/share/malooflab/Ruijuan/F2/eQTL/no_scale_center/data/LG.f2.after.crossover_all_expressed_genes_no_scale_center.Rdata") LG.f2.after.crossover <- sim.geno(LG.f2.after.crossover,step=1,n.draws=32) # imputation? LG.f2.after.crossover <- calc.genoprob(LG.f2.after.crossover,step=1) ...
/F2/eQTL/scanone_all_expressed_genes_7.R
no_license
leejimmy93/KIAT_cabernet
R
false
false
1,314
r
library(qtl) # library(snowfall) load("/share/malooflab/Ruijuan/F2/eQTL/no_scale_center/data/LG.f2.after.crossover_all_expressed_genes_no_scale_center.Rdata") LG.f2.after.crossover <- sim.geno(LG.f2.after.crossover,step=1,n.draws=32) # imputation? LG.f2.after.crossover <- calc.genoprob(LG.f2.after.crossover,step=1) ...
library(tidyverse) setwd("/media/nicolas/ce71f585-e4d4-43a3-adea-f042dd352508/TCGA_rnaseq") a <- read_tsv("fileid_manifestfileid.txt") b <- read_tsv("corresp_fileUUID_barcode.txt") ab <- full_join(a,b,by = "file_id") write.table(ab, file = "manifest_file_corresp.txt", sep = "\t", quote = FALSE, row.names = FALSE, col....
/Rscript_05_fuse_manifest_file_id.R
permissive
nicolasvanbaren/Explore_TCGA_transcripts
R
false
false
334
r
library(tidyverse) setwd("/media/nicolas/ce71f585-e4d4-43a3-adea-f042dd352508/TCGA_rnaseq") a <- read_tsv("fileid_manifestfileid.txt") b <- read_tsv("corresp_fileUUID_barcode.txt") ab <- full_join(a,b,by = "file_id") write.table(ab, file = "manifest_file_corresp.txt", sep = "\t", quote = FALSE, row.names = FALSE, col....
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ROGUE.R \name{SE_fun} \alias{SE_fun} \title{Identify highly informative genes using S-E model} \usage{ SE_fun(expr, span = 0.5, r = 1, mt.method = "fdr", if.adj = T) } \arguments{ \item{expr}{The expression matrix. Rows should be genes and co...
/man/SE_fun.Rd
permissive
BinDuan/ROGUE
R
false
true
1,242
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ROGUE.R \name{SE_fun} \alias{SE_fun} \title{Identify highly informative genes using S-E model} \usage{ SE_fun(expr, span = 0.5, r = 1, mt.method = "fdr", if.adj = T) } \arguments{ \item{expr}{The expression matrix. Rows should be genes and co...
library(RColorBrewer) library(latticeExtra) library(reshape2) library(data.table) if (system("hostname",intern=TRUE) == "ADM-108625") { setwd("C:/Users/jmaburto/Documents/GitHub/DecompMex/DecompMex") } else { if (system("hostname",intern=TRUE) %in% c("triffe-N80Vm", "tim-ThinkPad-L440")){ # if I'm on the lapto...
/DecompMex/R BMJ Open resubmit/6_Suicide_Analysis.R
no_license
timriffe/DecompMex
R
false
false
10,067
r
library(RColorBrewer) library(latticeExtra) library(reshape2) library(data.table) if (system("hostname",intern=TRUE) == "ADM-108625") { setwd("C:/Users/jmaburto/Documents/GitHub/DecompMex/DecompMex") } else { if (system("hostname",intern=TRUE) %in% c("triffe-N80Vm", "tim-ThinkPad-L440")){ # if I'm on the lapto...
.libPaths("/home/cog/inijman/Rlibs/3.4.1") library(ExomeDepth) library(methods) target.file <-"/hpc/cog_bioinf/diagnostiek/projects/WES_CNV/exomeCopy_crev2_20bp_flat/annotated_ENSEMBL_UCSC_merged_collapsed_sorted_v2_20bpflank_flatnoMT.bed" # set path to BED file pathToRefBams <- "/hpc/cog_bioinf/diagnostiek/projects/...
/ExomeDepth_create_Ref_set.R
no_license
UMCUGenetics/exomedepth_scripts
R
false
false
1,188
r
.libPaths("/home/cog/inijman/Rlibs/3.4.1") library(ExomeDepth) library(methods) target.file <-"/hpc/cog_bioinf/diagnostiek/projects/WES_CNV/exomeCopy_crev2_20bp_flat/annotated_ENSEMBL_UCSC_merged_collapsed_sorted_v2_20bpflank_flatnoMT.bed" # set path to BED file pathToRefBams <- "/hpc/cog_bioinf/diagnostiek/projects/...
## source functions source( "metapopulation-functions_15-01-22.r" ) ########################################################################################################## ## Set up environment for analysing season by season ## # get together the stuff we need from the file # generate matrix of unique ids and their ...
/setup-sc.r
no_license
BethLevick/metapopulation-model
R
false
false
3,701
r
## source functions source( "metapopulation-functions_15-01-22.r" ) ########################################################################################################## ## Set up environment for analysing season by season ## # get together the stuff we need from the file # generate matrix of unique ids and their ...
library(dplyr) library(data.table) fh <-fread("./Power_data/household_power_consumption.txt",na.strings = '?',stringsAsFactors= FALSE) pwr <-filter(fh,Date=="2/2/2007"|Date=="1/2/2007") pwr$Global_active_power <- as.numeric(as.character(pwr$Global_active_power)) pwr$Global_reactive_power <- as.numeric(as.chara...
/pwr.R
no_license
knowmax/Exploratory_courses
R
false
false
661
r
library(dplyr) library(data.table) fh <-fread("./Power_data/household_power_consumption.txt",na.strings = '?',stringsAsFactors= FALSE) pwr <-filter(fh,Date=="2/2/2007"|Date=="1/2/2007") pwr$Global_active_power <- as.numeric(as.character(pwr$Global_active_power)) pwr$Global_reactive_power <- as.numeric(as.chara...