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
#--------------------------------------------------# # fonction repartition des especes en deux groupes # # les plus detectable et les moins detectable # # script applicable que pour les D5 # # pour les PCoA # # lionel.bonsacquet # #...
/R/Grp_Plus_Moins_detectable_D5_pcoa.R
permissive
bonsacquet-l/sim-com
R
false
false
4,278
r
#--------------------------------------------------# # fonction repartition des especes en deux groupes # # les plus detectable et les moins detectable # # script applicable que pour les D5 # # pour les PCoA # # lionel.bonsacquet # #...
testlist <- list(bytes1 = integer(0), pmutation = -41255400998276) result <- do.call(mcga:::ByteCodeMutation,testlist) str(result)
/mcga/inst/testfiles/ByteCodeMutation/libFuzzer_ByteCodeMutation/ByteCodeMutation_valgrind_files/1612802421-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
130
r
testlist <- list(bytes1 = integer(0), pmutation = -41255400998276) result <- do.call(mcga:::ByteCodeMutation,testlist) str(result)
#' @include gbLocation-class.R NULL #' Class \code{"gbFeature"} #' #' \dQuote{gbFeature} is an S4 class that provides a container #' for GenBank feature tables. #' #' @slot .seqinfo An \code{\linkS4class{seqinfo}} object containing the #' full-lenght sequence of the GenBank record that the feature is part #' of as a...
/R/gbFeature-class.R
no_license
awenocur/biofiles
R
false
false
10,347
r
#' @include gbLocation-class.R NULL #' Class \code{"gbFeature"} #' #' \dQuote{gbFeature} is an S4 class that provides a container #' for GenBank feature tables. #' #' @slot .seqinfo An \code{\linkS4class{seqinfo}} object containing the #' full-lenght sequence of the GenBank record that the feature is part #' of as a...
library(survival) # for survival analysis library(glmnet) # for LASSO regularization #library(ROCR) # for ROC analysis #library(gpclib) # for plotting confidence intervals for x and y by calculating intersection of two polygons library(Hmisc) # c-index library(plyr) # data manipulation output.folder = "./outtemp/" # n...
/R_main_CTOT.R
no_license
dkwon/CTOT
R
false
false
24,298
r
library(survival) # for survival analysis library(glmnet) # for LASSO regularization #library(ROCR) # for ROC analysis #library(gpclib) # for plotting confidence intervals for x and y by calculating intersection of two polygons library(Hmisc) # c-index library(plyr) # data manipulation output.folder = "./outtemp/" # n...
#' @title Generation of One Continuous Variable with a Mixture Distribution Using the Power Method Transformation #' #' @description This function simulates one continuous mixture variable. Mixture distributions describe random variables that #' are drawn from more than one component distribution. For a random va...
/R/contmixvar1.R
no_license
minghao2016/SimCorrMix
R
false
false
14,942
r
#' @title Generation of One Continuous Variable with a Mixture Distribution Using the Power Method Transformation #' #' @description This function simulates one continuous mixture variable. Mixture distributions describe random variables that #' are drawn from more than one component distribution. For a random va...
tag_count_file <- "/Users/jimmy.odonnell/Desktop/Analysis_20151013_1719/tag_count.txt" tag_counts <- read.table(file = tag_count_file, header = TRUE, sep = " " ) head(tag_counts) # All combinations of primary and secondary index are considere...
/beta/tag_counts.R
no_license
reikopm/mbonlive_banzai
R
false
false
1,065
r
tag_count_file <- "/Users/jimmy.odonnell/Desktop/Analysis_20151013_1719/tag_count.txt" tag_counts <- read.table(file = tag_count_file, header = TRUE, sep = " " ) head(tag_counts) # All combinations of primary and secondary index are considere...
install.packages("covid19.analytics") library(covid19.analytics) ag <-covid19.data(case = 'aggregated') View(ag) tsc<-covid19.data(case = 'ts-confirmed') report.summary(Nentries = 10,graphical.output = F) report.summary(Nentries = 10,graphical.output = T) tots.per.location(tsc,geo.loc='US') tots.per.location(ts...
/ts-Analitics.R
no_license
sametgumus212/coronavirus
R
false
false
466
r
install.packages("covid19.analytics") library(covid19.analytics) ag <-covid19.data(case = 'aggregated') View(ag) tsc<-covid19.data(case = 'ts-confirmed') report.summary(Nentries = 10,graphical.output = F) report.summary(Nentries = 10,graphical.output = T) tots.per.location(tsc,geo.loc='US') tots.per.location(ts...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/modify.operators.R \name{rSegregate} \alias{rSegregate} \title{Segregate values in a raster into layers} \usage{ rSegregate(obj, by = NULL, flatten = FALSE, background = NULL) } \arguments{ \item{obj}{[\code{RasterLayer(1)}]\cr The object to ...
/man/rSegregate.Rd
no_license
gisdevelope/rasterTools
R
false
true
1,648
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/modify.operators.R \name{rSegregate} \alias{rSegregate} \title{Segregate values in a raster into layers} \usage{ rSegregate(obj, by = NULL, flatten = FALSE, background = NULL) } \arguments{ \item{obj}{[\code{RasterLayer(1)}]\cr The object to ...
# Put custom tests in this file. # Uncommenting the following line of code will disable # auto-detection of new variables and thus prevent swirl from # executing every command twice, which can slow things down. # AUTO_DETECT_NEWVAR <- FALSE # However, this means that you should detect user-created # variables when a...
/Intervalles_de_confiance/customTests.R
no_license
ldoyen/TP3-TC-CI
R
false
false
12,969
r
# Put custom tests in this file. # Uncommenting the following line of code will disable # auto-detection of new variables and thus prevent swirl from # executing every command twice, which can slow things down. # AUTO_DETECT_NEWVAR <- FALSE # However, this means that you should detect user-created # variables when a...
make_understorey_n_retrans_coefficient <- function(retrans) { ### assumed to be x % out <- data.frame(c(1:6), retrans) colnames(out) <- c("Ring", "retrans_coef") return(out) }
/modules/retranslocation_coefficients/make_understorey_n_retrans_coefficient.R
no_license
mingkaijiang/EucFACE_nitrogen_budget
R
false
false
216
r
make_understorey_n_retrans_coefficient <- function(retrans) { ### assumed to be x % out <- data.frame(c(1:6), retrans) colnames(out) <- c("Ring", "retrans_coef") return(out) }
# Estimate model 2 # Author: MM,LN # Version: 2019.11.08 # Revision history # 2011.11.08 Add loop over values of datastub, "m11" and "nondom". LondonFlag <- 0 # 0 : Only Greater London # 1 : London + some adjacent counties allDatastubs <- c("m11","nondom") # "m11" = domestic properties...
/code/currentversion/model/A3Model2.R
no_license
UCL/provis
R
false
false
4,630
r
# Estimate model 2 # Author: MM,LN # Version: 2019.11.08 # Revision history # 2011.11.08 Add loop over values of datastub, "m11" and "nondom". LondonFlag <- 0 # 0 : Only Greater London # 1 : London + some adjacent counties allDatastubs <- c("m11","nondom") # "m11" = domestic properties...
# Logistic Regression # Importing the dataset load("Social_Network_Ads.RData") dataset = dataset[3:5] # Encoding the target feature as factor dataset$Purchased = factor(dataset$Purchased, levels = c(0, 1)) # Splitting the dataset into the Training set and Test set # install.packages('caTools') library(caTools) set.s...
/Udemy-Machine Learning A-Z/logistic.regression-raul.R
no_license
getachew67/Data-Science-using-R
R
false
false
2,484
r
# Logistic Regression # Importing the dataset load("Social_Network_Ads.RData") dataset = dataset[3:5] # Encoding the target feature as factor dataset$Purchased = factor(dataset$Purchased, levels = c(0, 1)) # Splitting the dataset into the Training set and Test set # install.packages('caTools') library(caTools) set.s...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/codebuild_operations.R \name{codebuild_start_build} \alias{codebuild_start_build} \title{Starts running a build} \usage{ codebuild_start_build(projectName, secondarySourcesOverride, secondarySourcesVersionOverride, sourceVersion, artifactsO...
/cran/paws.developer.tools/man/codebuild_start_build.Rd
permissive
sanchezvivi/paws
R
false
true
12,218
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/codebuild_operations.R \name{codebuild_start_build} \alias{codebuild_start_build} \title{Starts running a build} \usage{ codebuild_start_build(projectName, secondarySourcesOverride, secondarySourcesVersionOverride, sourceVersion, artifactsO...
# Copyright (C) 2009 - 2012 Dirk Eddelbuettel and Romain Francois # Copyright (C) 2013 Romain Francois # # This file is part of Rcpp11. # # Rcpp11 is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation, either versio...
/R/Rcpp.package.skeleton.R
no_license
abelxie/Rcpp11
R
false
false
7,025
r
# Copyright (C) 2009 - 2012 Dirk Eddelbuettel and Romain Francois # Copyright (C) 2013 Romain Francois # # This file is part of Rcpp11. # # Rcpp11 is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation, either versio...
library(ggplot2) library(ggformula) library(transmem) PDF <- FALSE if (PDF) pdf("Perfiles23-09-19.pdf", height = 7/1.8, width = 9/1.8) #-----STOCK SOLUTIONS-------------------------------------------------------- StockLi.200_2 <- 130.3 * 0.187872 * 0.99 / 0.1205105 StockNa.11000 <- 1.1693 * 0.996 /41.5065 * 0.393372 *...
/19-09-Simplex-2/19-09-23-LiNa-Mem16_9.R
no_license
Crparedes/master-data-treatment
R
false
false
9,092
r
library(ggplot2) library(ggformula) library(transmem) PDF <- FALSE if (PDF) pdf("Perfiles23-09-19.pdf", height = 7/1.8, width = 9/1.8) #-----STOCK SOLUTIONS-------------------------------------------------------- StockLi.200_2 <- 130.3 * 0.187872 * 0.99 / 0.1205105 StockNa.11000 <- 1.1693 * 0.996 /41.5065 * 0.393372 *...
fun1 <- function() {"fun1"} .script_version <- "v1.0" # formals from import::from .from <- "a script" .into <- "an env" .directory <- "my_dir"
/tests/test_import/module_hidden_objects.R
no_license
cran/import
R
false
false
144
r
fun1 <- function() {"fun1"} .script_version <- "v1.0" # formals from import::from .from <- "a script" .into <- "an env" .directory <- "my_dir"
bubblePlot= function( x,y=NULL, z,col=tim.colors(256), ...){ ctab= color.scale( z, col) points( x,y, col=ctab,pch=16,...) image.plot( legend.only=TRUE,add=TRUE, col=col, zlim =range( z, na.rm=TRUE)) }
/bubblePlot.R
no_license
dnychka/UrbanTypology
R
false
false
221
r
bubblePlot= function( x,y=NULL, z,col=tim.colors(256), ...){ ctab= color.scale( z, col) points( x,y, col=ctab,pch=16,...) image.plot( legend.only=TRUE,add=TRUE, col=col, zlim =range( z, na.rm=TRUE)) }
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ft_serialize.R \name{ft_serialize} \alias{ft_serialize} \alias{ft_get_keys} \title{Serialize raw text to other formats, including to disk} \usage{ ft_serialize(x, to = "xml", from = NULL, ...) ft_get_keys(x) } \arguments{ \item{x}{Input obje...
/man/ft_serialize.Rd
no_license
cran/fulltext
R
false
true
1,530
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ft_serialize.R \name{ft_serialize} \alias{ft_serialize} \alias{ft_get_keys} \title{Serialize raw text to other formats, including to disk} \usage{ ft_serialize(x, to = "xml", from = NULL, ...) ft_get_keys(x) } \arguments{ \item{x}{Input obje...
library(glmnet) mydata = read.table("./TrainingSet/LassoBIC/soft_tissue.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.15,family="gaussian",standardize=TRUE) sink('./Model/EN/Lasso/soft_tissue/soft_tissue_031.t...
/Model/EN/Lasso/soft_tissue/soft_tissue_031.R
no_license
leon1003/QSMART
R
false
false
366
r
library(glmnet) mydata = read.table("./TrainingSet/LassoBIC/soft_tissue.csv",head=T,sep=",") x = as.matrix(mydata[,4:ncol(mydata)]) y = as.matrix(mydata[,1]) set.seed(123) glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.15,family="gaussian",standardize=TRUE) sink('./Model/EN/Lasso/soft_tissue/soft_tissue_031.t...
% Generated by roxygen2 (4.0.1): do not edit by hand \name{tp_accnames} \alias{tp_accnames} \title{Return all accepted names for a taxon name with a given id.} \usage{ tp_accnames(id, key = NULL, callopts = list()) } \arguments{ \item{id}{the taxon identifier code} \item{key}{Your Tropicos API key; loads from .Rprofil...
/man/tp_accnames.Rd
permissive
fmichonneau/taxize
R
false
false
619
rd
% Generated by roxygen2 (4.0.1): do not edit by hand \name{tp_accnames} \alias{tp_accnames} \title{Return all accepted names for a taxon name with a given id.} \usage{ tp_accnames(id, key = NULL, callopts = list()) } \arguments{ \item{id}{the taxon identifier code} \item{key}{Your Tropicos API key; loads from .Rprofil...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cog_spec.R \name{cog_spec} \alias{cog_spec} \alias{as_cog_specs} \title{Cognostic Specification} \usage{ cog_spec(bivariate_continuous = TRUE, bivariate_counts = TRUE, bivariate_step = TRUE, boxplot = TRUE, density_2d_continuous = TRUE, d...
/man/cog_spec.Rd
no_license
hafen/autocogs
R
false
true
2,365
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/cog_spec.R \name{cog_spec} \alias{cog_spec} \alias{as_cog_specs} \title{Cognostic Specification} \usage{ cog_spec(bivariate_continuous = TRUE, bivariate_counts = TRUE, bivariate_step = TRUE, boxplot = TRUE, density_2d_continuous = TRUE, d...
## read in text file hpc <- read.table('./household_power_consumption.txt', header=T, sep =";", na.strings = "?") ## covert dates hpc$Date <- as.Date(hpc$Date, format="%d/%m/%Y") ## subset data on specified dates hpc <- hpc[which(hpc$Date == "2007-02-02" | hpc$Date == "2007-02-01"),] ## convert date/time variables h...
/plot4.R
no_license
brandiloper/ExData_Plotting1
R
false
false
1,137
r
## read in text file hpc <- read.table('./household_power_consumption.txt', header=T, sep =";", na.strings = "?") ## covert dates hpc$Date <- as.Date(hpc$Date, format="%d/%m/%Y") ## subset data on specified dates hpc <- hpc[which(hpc$Date == "2007-02-02" | hpc$Date == "2007-02-01"),] ## convert date/time variables h...
#' scRNA seq matrix of pancreas cells #' #' Data from Tabula Muris project. A subset of the single cell RNA-seq data #' from the pancreas to be used as an example for GeneFishing. The rows are #' genes and columns are cells. #' #' @docType data #' #' @usage data(pancreas) #' #' @keywords datasets #' #' @references ...
/R/pancreas-data.R
no_license
zoevernon/scGeneFishing
R
false
false
585
r
#' scRNA seq matrix of pancreas cells #' #' Data from Tabula Muris project. A subset of the single cell RNA-seq data #' from the pancreas to be used as an example for GeneFishing. The rows are #' genes and columns are cells. #' #' @docType data #' #' @usage data(pancreas) #' #' @keywords datasets #' #' @references ...
# Copyright (c) 2012-2020 Broad Institute, Inc., Massachusetts Institute of Technology, and Regents of the University of California. All rights reserved. # ssGSEA # processes the cmd line for the ssGSEA.project.dataset ssGSEA.cmdline <- function(...) { input.gct.filename <- NA output.prefix ...
/src/ssGSEA.R
permissive
mirabellechen/ssGSEA-gpmodule
R
false
false
3,655
r
# Copyright (c) 2012-2020 Broad Institute, Inc., Massachusetts Institute of Technology, and Regents of the University of California. All rights reserved. # ssGSEA # processes the cmd line for the ssGSEA.project.dataset ssGSEA.cmdline <- function(...) { input.gct.filename <- NA output.prefix ...
#기본 library(doBy) library(dplyr) library(psych) library(Hmisc) library(skimr) library(fBasics) library(ggplot2) Sys.setlocale("LC_ALL","korean")#os가 한글이 아닐시에 꼭 써야함 x_data <- read.csv("C:/Users/seokm/OneDrive/Documents/project_data/X_train.csv",header = TRUE, sep = ',', stringsAsFactors = FALSE,encoding = "CP949") y_...
/1_Code/3_Chung/R/department_Chung/buyer_nm.R
no_license
horaeng1/Asiae_AI
R
false
false
11,027
r
#기본 library(doBy) library(dplyr) library(psych) library(Hmisc) library(skimr) library(fBasics) library(ggplot2) Sys.setlocale("LC_ALL","korean")#os가 한글이 아닐시에 꼭 써야함 x_data <- read.csv("C:/Users/seokm/OneDrive/Documents/project_data/X_train.csv",header = TRUE, sep = ',', stringsAsFactors = FALSE,encoding = "CP949") y_...
library(ggplot2) d <- read.csv(file="./CodierungVideo.csv", head=TRUE, sep=",",stringsAsFactors=FALSE) cor.test(d$M201_MessungKorrekt, d$M201_Q1,method="spearm") theme_set(theme_grey(base_size = 18)) ggplot(d, aes(x=d$M201_MessungKorrekt, y=d$M201_Q1)) + geom_smooth(method=lm) + # Add linear regression line g...
/Auswertung/VideoCodierung.R
no_license
DavidSichau/masterarbeit-phzh
R
false
false
3,297
r
library(ggplot2) d <- read.csv(file="./CodierungVideo.csv", head=TRUE, sep=",",stringsAsFactors=FALSE) cor.test(d$M201_MessungKorrekt, d$M201_Q1,method="spearm") theme_set(theme_grey(base_size = 18)) ggplot(d, aes(x=d$M201_MessungKorrekt, y=d$M201_Q1)) + geom_smooth(method=lm) + # Add linear regression line g...
############################################### # Code for creating Figure 4 for core-transient manuscript library(lme4) library(plyr) # for core-transient functions library(ggplot2) library(merTools) library(tidyr) library(maps) library(gridExtra) library(RColorBrewer) library(sp) library(rgdal) library(raster) libra...
/scripts/R-scripts/core-transient-figure-4.R
no_license
hurlbertlab/core-transient
R
false
false
14,509
r
############################################### # Code for creating Figure 4 for core-transient manuscript library(lme4) library(plyr) # for core-transient functions library(ggplot2) library(merTools) library(tidyr) library(maps) library(gridExtra) library(RColorBrewer) library(sp) library(rgdal) library(raster) libra...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/visEdges.R \name{visEdges} \alias{visEdges} \title{Network visualization edges options} \usage{ visEdges(graph, title = NULL, value = NULL, label = NULL, length = NULL, width = NULL, dashes = NULL, hidden = NULL, hoverWidth = NULL, ...
/man/visEdges.Rd
no_license
ktargows/visNetwork
R
false
true
13,583
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/visEdges.R \name{visEdges} \alias{visEdges} \title{Network visualization edges options} \usage{ visEdges(graph, title = NULL, value = NULL, label = NULL, length = NULL, width = NULL, dashes = NULL, hidden = NULL, hoverWidth = NULL, ...
## cargar librerías e importar raw data afiliados library(tidyverse) library(readxl) library(lubridate) library(janitor) cnae2009_raw <- read_xls("data/dictionaries/estructura_cnae2009.xls") ## limpiar nombres columnas y eliminar blancos extra cnae2009_raw2 <- cnae2009_raw %>% clean_names() %>% mutate(titu...
/2021-04-12_erte-afiliados-sectores/scripts/data_tidying_cnae2009.R
no_license
jescuderoma/filas-y-columnas
R
false
false
2,536
r
## cargar librerías e importar raw data afiliados library(tidyverse) library(readxl) library(lubridate) library(janitor) cnae2009_raw <- read_xls("data/dictionaries/estructura_cnae2009.xls") ## limpiar nombres columnas y eliminar blancos extra cnae2009_raw2 <- cnae2009_raw %>% clean_names() %>% mutate(titu...
#' read my encrypted token #' #' @inheritParams safer::decrypt_string #' @return decrypted token. #' @export token <- function(key, pkey = NULL) { # encrypted token string = "OWe2bHi5r2Iak2wa1OxqKOa8+qTbKvDZkYBgwTZsF9ckzeqnv/deS4/LlgR6nFUHbk8ahTetjF4=" return(safer::decrypt_string(string, key = key, pkey = pkey))...
/R/token.R
no_license
fountainer/token
R
false
false
323
r
#' read my encrypted token #' #' @inheritParams safer::decrypt_string #' @return decrypted token. #' @export token <- function(key, pkey = NULL) { # encrypted token string = "OWe2bHi5r2Iak2wa1OxqKOa8+qTbKvDZkYBgwTZsF9ckzeqnv/deS4/LlgR6nFUHbk8ahTetjF4=" return(safer::decrypt_string(string, key = key, pkey = pkey))...
# Exercise 2: writing and executing functions (II) # Write a function `CompareLength` that takes in 2 vectors, and returns the sentence: # "The difference in lengths is N" CompareLength <- function(v1, v2) { dif <- abs(length(v1) - length(v2)) return (paste("The difference in lengths is ", dif)) } # Pass two vect...
/exercise-2/exercise.R
permissive
jaketherrien/m7-functions
R
false
false
1,303
r
# Exercise 2: writing and executing functions (II) # Write a function `CompareLength` that takes in 2 vectors, and returns the sentence: # "The difference in lengths is N" CompareLength <- function(v1, v2) { dif <- abs(length(v1) - length(v2)) return (paste("The difference in lengths is ", dif)) } # Pass two vect...
#' link between taxa #' #' `geom_taxalink` supports data.frame as input, #' the `colour`, `size`, `linetype` and `alpha` can be mapped. When the `data` was provided, #' the `mapping` should be also provided, which `taxa1` and `taxa2` should be mapped created #' by `aes`, `aes_` or `aes_string`. In addition, the `hra...
/R/geom_taxalink.R
no_license
huipengxi/ggtree
R
false
false
11,644
r
#' link between taxa #' #' `geom_taxalink` supports data.frame as input, #' the `colour`, `size`, `linetype` and `alpha` can be mapped. When the `data` was provided, #' the `mapping` should be also provided, which `taxa1` and `taxa2` should be mapped created #' by `aes`, `aes_` or `aes_string`. In addition, the `hra...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/LowLevelClasses.R \docType{class} \name{Count-class} \alias{Count-class} \title{An S4 class for a Count} \description{ A count class provides a number of occurrences of the query and the timeline that it happens } \section{Slots}{ \describe{...
/man/Count-class.Rd
permissive
rfherrerac/Capr
R
false
true
473
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/LowLevelClasses.R \docType{class} \name{Count-class} \alias{Count-class} \title{An S4 class for a Count} \description{ A count class provides a number of occurrences of the query and the timeline that it happens } \section{Slots}{ \describe{...
# Compare the reaction from different sources: RAVEN, kegg and eggnog # Revised by Hongzhong 2019-8-5 # load library library(readxl) library(stringr) library(tidyverse) library(hongR) source('function_general.R') #----------------------------------------------------------- # initially compare the new RXN from differe...
/rxn_annotate/Compare new RXN from different source.R
permissive
SysBioChalmers/Yeast-Species-GEMs
R
false
false
5,681
r
# Compare the reaction from different sources: RAVEN, kegg and eggnog # Revised by Hongzhong 2019-8-5 # load library library(readxl) library(stringr) library(tidyverse) library(hongR) source('function_general.R') #----------------------------------------------------------- # initially compare the new RXN from differe...
#' @title Internal bigPLS functions #' #' @name internal-bootPLS #' #' @description These are not to be called by the user. #' #' @aliases ust spls.dv correctp correctp.withoutK spls.Cboot cv.split #' @author Jérémy Magnanensi, Frédéric Bertrand\cr #' \email{frederic.bertrand@@utt.fr}\cr #' \url{https://fbertran.git...
/R/internal-bootPLS.R
no_license
fbertran/bootPLS
R
false
false
12,861
r
#' @title Internal bigPLS functions #' #' @name internal-bootPLS #' #' @description These are not to be called by the user. #' #' @aliases ust spls.dv correctp correctp.withoutK spls.Cboot cv.split #' @author Jérémy Magnanensi, Frédéric Bertrand\cr #' \email{frederic.bertrand@@utt.fr}\cr #' \url{https://fbertran.git...
#Jesús Alberto Cuéllar Loera #06/Agosto/2019 #Clase 1 dbh <- c(16.5, 25.3, 22.1, 17.2, 16.1, 8.1, 34.3, 5.4, 5.7, 11.2, 24.1, 14.5, 7.7, 15.6, 15.9, 10, 17.5, 20.5, 7.8, 27.3, 9.7, 6.5, 23.4, 8.2, 28.5, 10.4, 11.5, 14.3, 17.2, 16.8) length(dbh) sum(dbh)/length(dbh) mean(dbh) range(dbh) stem(dbh)...
/Clase 1/Clase1.R
no_license
JesusCuellar00/MCF202
R
false
false
814
r
#Jesús Alberto Cuéllar Loera #06/Agosto/2019 #Clase 1 dbh <- c(16.5, 25.3, 22.1, 17.2, 16.1, 8.1, 34.3, 5.4, 5.7, 11.2, 24.1, 14.5, 7.7, 15.6, 15.9, 10, 17.5, 20.5, 7.8, 27.3, 9.7, 6.5, 23.4, 8.2, 28.5, 10.4, 11.5, 14.3, 17.2, 16.8) length(dbh) sum(dbh)/length(dbh) mean(dbh) range(dbh) stem(dbh)...
descr_extract_JAGS<-function (res_l, res_0, res_u){ # extraction of descriptive statistics from objects provided by JAGS kk <- dim(res_0)[2]-4 reff <- paste(rep("theta_", kk), c(1:kk), sep = "") names_row <- c("mu", "log_tau", reff, "theta_new") no_rows <- length(names_row) descr_names_col <- c("m_l",...
/R/descr_extract_JAGS.R
no_license
hunansona/si4bayesmeta
R
false
false
2,455
r
descr_extract_JAGS<-function (res_l, res_0, res_u){ # extraction of descriptive statistics from objects provided by JAGS kk <- dim(res_0)[2]-4 reff <- paste(rep("theta_", kk), c(1:kk), sep = "") names_row <- c("mu", "log_tau", reff, "theta_new") no_rows <- length(names_row) descr_names_col <- c("m_l",...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sg_3hd.R \name{sg_3hd} \alias{sg_3hd} \title{Function for calculating Specific Gravity - Third Harvest Date (SG_2HD)} \usage{ sg_3hd(sgs1_3hd, sgs2_3hd) } \arguments{ \item{sgs1_3hd}{Specific gravity sample 1 (Third harvest date)} \item{sgs2...
/man/sg_3hd.Rd
permissive
c5sire/sbformula
R
false
true
1,226
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/sg_3hd.R \name{sg_3hd} \alias{sg_3hd} \title{Function for calculating Specific Gravity - Third Harvest Date (SG_2HD)} \usage{ sg_3hd(sgs1_3hd, sgs2_3hd) } \arguments{ \item{sgs1_3hd}{Specific gravity sample 1 (Third harvest date)} \item{sgs2...
#' Run PCA on the main data #' #' This function takes an object of class iCellR and runs PCA on the main data. #' @param x An object of class iCellR. #' @param method Choose from "base.mean.rank" or "gene.model", default is "base.mean.rank". If gene.model is chosen you need to provide gene.list. #' @param top.rank A nu...
/R/F012.run.pca.R
no_license
kant/iCellR
R
false
false
3,604
r
#' Run PCA on the main data #' #' This function takes an object of class iCellR and runs PCA on the main data. #' @param x An object of class iCellR. #' @param method Choose from "base.mean.rank" or "gene.model", default is "base.mean.rank". If gene.model is chosen you need to provide gene.list. #' @param top.rank A nu...
# Set up ------------------------------------------------------------------ # set working directory setwd("~/Documents/Projects/MIDI") # initiate libraries library(tidyverse) library(tuneR) library(tidytext) library(markovchain) # read in reference pitch table pitch.tbl <- read_csv("midi pitch table.csv") ...
/chainriffs.R
no_license
areyes13/metal-skynet
R
false
false
3,669
r
# Set up ------------------------------------------------------------------ # set working directory setwd("~/Documents/Projects/MIDI") # initiate libraries library(tidyverse) library(tuneR) library(tidytext) library(markovchain) # read in reference pitch table pitch.tbl <- read_csv("midi pitch table.csv") ...
#Tag processing script for Zac's NN modeling manuscript library(gRumble) source('tag_fxns.R') #set data drive & folders w data d.dir <- "/Users/jhmoxley/Documents/Biologia & Animales/[[SharkTank]]/data_for_Biologgingwork/Neral_network_datasets_Zac" #metadata for deployments #deployment <- "CC_2_24_PR151106" #fn <- "L...
/NN_dataprocessing.R
no_license
JayMox/CC_CamTags
R
false
false
3,125
r
#Tag processing script for Zac's NN modeling manuscript library(gRumble) source('tag_fxns.R') #set data drive & folders w data d.dir <- "/Users/jhmoxley/Documents/Biologia & Animales/[[SharkTank]]/data_for_Biologgingwork/Neral_network_datasets_Zac" #metadata for deployments #deployment <- "CC_2_24_PR151106" #fn <- "L...
####################### # XGBOOST weighted 14 # ####################### # Clear the workspace rm(list=ls()) # Set working directory setwd("C:/Users/Tom/Documents/Kaggle/Santander") # Load the required libraries library(data.table) library(bit64) library(xgboost) library(stringr) # Submission date and file name subm...
/Submission/09-12-2016/xgboost weighted 14.R
no_license
PetrShypila/Santander-Product-Recommendation
R
false
false
25,698
r
####################### # XGBOOST weighted 14 # ####################### # Clear the workspace rm(list=ls()) # Set working directory setwd("C:/Users/Tom/Documents/Kaggle/Santander") # Load the required libraries library(data.table) library(bit64) library(xgboost) library(stringr) # Submission date and file name subm...
#https://cran.r-project.org/web/packages/olsrr/olsrr.pdf install.packages('lubridate') library(olsrr) model <- lm(mpg ~ disp + hp + wt + qsec, data = mtcars) k <- ols_step_all_possible(model) plot(k) k summary(lm(mpg ~ wt, data=mtcars)) summary(lm(mpg ~ wt+ hp, data=mtcars))
/dd.R
no_license
amit2625/FA_5_2018
R
false
false
277
r
#https://cran.r-project.org/web/packages/olsrr/olsrr.pdf install.packages('lubridate') library(olsrr) model <- lm(mpg ~ disp + hp + wt + qsec, data = mtcars) k <- ols_step_all_possible(model) plot(k) k summary(lm(mpg ~ wt, data=mtcars)) summary(lm(mpg ~ wt+ hp, data=mtcars))
##Basic statistics=group ##Layer1= vector ##Layer2=raster ##ponderation= number 1 ##output= output vector library(raster) library(sp) p1=coordinates(Layer1) result<-cbind() for (j in 1:dim(p1)[1]){ point<-p1[j,] r <- readGDAL(Layer2@file@name) dist <- distanceFromPoints(r, point) position<-which(dist@data@...
/collections/qgis_rscripts2/rscripts/Inverse_Distance_Weigthing.rsx
no_license
qgis/QGIS-Resources
R
false
false
3,812
rsx
##Basic statistics=group ##Layer1= vector ##Layer2=raster ##ponderation= number 1 ##output= output vector library(raster) library(sp) p1=coordinates(Layer1) result<-cbind() for (j in 1:dim(p1)[1]){ point<-p1[j,] r <- readGDAL(Layer2@file@name) dist <- distanceFromPoints(r, point) position<-which(dist@data@...
library(aqp) library(microbenchmark) library(daff) load(system.file("data/munsell.rda", package="aqp")[1]) x <- munsell2rgb(munsell$hue, munsell$value, munsell$chroma, return_triplets = TRUE) y <- munsell2rgb2(munsell$hue, munsell$value, munsell$chroma, return_triplets = TRUE) all.equal(x, y) d <- diff_data(x, y) r...
/misc/sandbox/munsell2rgb-DT-testing.R
no_license
rsbivand/aqp
R
false
false
492
r
library(aqp) library(microbenchmark) library(daff) load(system.file("data/munsell.rda", package="aqp")[1]) x <- munsell2rgb(munsell$hue, munsell$value, munsell$chroma, return_triplets = TRUE) y <- munsell2rgb2(munsell$hue, munsell$value, munsell$chroma, return_triplets = TRUE) all.equal(x, y) d <- diff_data(x, y) r...
`getDividends` <- function(Symbol,from='1970-01-01',to=Sys.Date(),env=parent.frame(),src='yahoo', auto.assign=FALSE,auto.update=FALSE,verbose=FALSE,split.adjust=TRUE,...) { if(missing(env)) env <- parent.frame(1) if(is.null(env)) auto.assign <- FALSE Symbol.name <- ifelse(!is.character(Symbol), ...
/quantmod-master/R/getDividends.R
permissive
Sdoof/PyFinTech
R
false
false
1,409
r
`getDividends` <- function(Symbol,from='1970-01-01',to=Sys.Date(),env=parent.frame(),src='yahoo', auto.assign=FALSE,auto.update=FALSE,verbose=FALSE,split.adjust=TRUE,...) { if(missing(env)) env <- parent.frame(1) if(is.null(env)) auto.assign <- FALSE Symbol.name <- ifelse(!is.character(Symbol), ...
# ---- pkgdown::deploy_site_github() ---- # # Follows the steps of deploy_site_github() but renders into # `preview/pr#` of `gh-pages` branch. # Pull gh-pages branch callr::run("git", c("remote", "set-branches", "--add", "origin", "gh-pages"), echo_cmd = TRUE) callr::run("git", c("fetch", "origin", "gh-pages"), echo_c...
/.github/pkgdown-pr-preview-build.R
permissive
rstudio/learnr
R
false
false
1,434
r
# ---- pkgdown::deploy_site_github() ---- # # Follows the steps of deploy_site_github() but renders into # `preview/pr#` of `gh-pages` branch. # Pull gh-pages branch callr::run("git", c("remote", "set-branches", "--add", "origin", "gh-pages"), echo_cmd = TRUE) callr::run("git", c("fetch", "origin", "gh-pages"), echo_c...
DPMdensity = function(y, ngrid=1000L, grid=NULL, method="truncated", nclusters=50L, updateAlpha=TRUE, useHyperpriors=TRUE, status=TRUE, state=NULL, nskip=1000L, ndpost=1000L, keepevery=1L, printevery=1000L, ...
/R/DPMdensity.R
no_license
chujiluo/BNPqte
R
false
false
8,632
r
DPMdensity = function(y, ngrid=1000L, grid=NULL, method="truncated", nclusters=50L, updateAlpha=TRUE, useHyperpriors=TRUE, status=TRUE, state=NULL, nskip=1000L, ndpost=1000L, keepevery=1L, printevery=1000L, ...
# function [Yraw,yearlab] = transform(ydata,tcode,yearlab) # %TRANSFORM Transform large dataset to stationarity # %This code corrects the number of observations lost from transformations # Yraw = 0*ydata; # for i=1:size(ydata,2) # Yraw(:,i) = transx(ydata(:,i),tcode(i)); # end # end transform <- function(ydata, tcode...
/transform.R
no_license
Ruangoose/Large-TVP-VAR
R
false
false
653
r
# function [Yraw,yearlab] = transform(ydata,tcode,yearlab) # %TRANSFORM Transform large dataset to stationarity # %This code corrects the number of observations lost from transformations # Yraw = 0*ydata; # for i=1:size(ydata,2) # Yraw(:,i) = transx(ydata(:,i),tcode(i)); # end # end transform <- function(ydata, tcode...
library(shiny) library(shinydashboard) library(knitr) library(dplyr) library(sparkline) library(highcharter) library(jsonlite) library(DT) library(lazyeval) library(FSA) library(rstudioapi) library(shinyWidgets) library(shinyBS) library(tidyr) library(shinyjs) library(DBI) library(leaflet) library(htmltools) library(ht...
/app/global.R
no_license
castafra/traile
R
false
false
977
r
library(shiny) library(shinydashboard) library(knitr) library(dplyr) library(sparkline) library(highcharter) library(jsonlite) library(DT) library(lazyeval) library(FSA) library(rstudioapi) library(shinyWidgets) library(shinyBS) library(tidyr) library(shinyjs) library(DBI) library(leaflet) library(htmltools) library(ht...
#' Specifying hierarchical columns with arguments `pattern` or `by` #' #' @name specifying_columns #' #' @description #' Within the `hmatch_` group of functions, there are three ways to specify the #' hierarchical columns to be matched. #' #' In all cases, it is assumed that matched columns are already correctly #' ord...
/R/doc_specifying_columns.R
no_license
ntncmch/hmatch
R
false
false
2,622
r
#' Specifying hierarchical columns with arguments `pattern` or `by` #' #' @name specifying_columns #' #' @description #' Within the `hmatch_` group of functions, there are three ways to specify the #' hierarchical columns to be matched. #' #' In all cases, it is assumed that matched columns are already correctly #' ord...
rm(list=ls()) # values of logical type: # TRUE, T # FALSE, F 4 < 5 10 > 100 4 == 5 # logical operators: # == ... Equal to # != ... Not equal to # < ... Less than # > ... Greater # <= ... Less or equal to # >= ... Greater or equal to # ! ... NOT # | ... OR # & ... AND # isTRUE(var) result <- 4 < 5 result typeof(resu...
/section02/logicaloperators.R
no_license
AmundsenJunior/r-programming-udemy
R
false
false
403
r
rm(list=ls()) # values of logical type: # TRUE, T # FALSE, F 4 < 5 10 > 100 4 == 5 # logical operators: # == ... Equal to # != ... Not equal to # < ... Less than # > ... Greater # <= ... Less or equal to # >= ... Greater or equal to # ! ... NOT # | ... OR # & ... AND # isTRUE(var) result <- 4 < 5 result typeof(resu...
# load libraries ---- library(tidyverse) # install.packages('tidyverse') library(stringr) library(rgdal) library(raster) library(rasterVis) library(maps) library(mapproj) select = dplyr::select stack = raster::stack # define functions ---- process_singledir = function(dir_results, dir_simulation, do_csv=T, do_tif=T,...
/process_results.R
no_license
bbest/graysreef
R
false
false
13,480
r
# load libraries ---- library(tidyverse) # install.packages('tidyverse') library(stringr) library(rgdal) library(raster) library(rasterVis) library(maps) library(mapproj) select = dplyr::select stack = raster::stack # define functions ---- process_singledir = function(dir_results, dir_simulation, do_csv=T, do_tif=T,...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bertin.r \name{bertinCluster} \alias{bertinCluster} \title{Bertin display with corresponding cluster analysis.} \usage{ bertinCluster( x, dmethod = c("euclidean", "euclidean"), cmethod = c("ward", "ward"), p = c(2, 2), al...
/man/bertinCluster.Rd
no_license
cran/OpenRepGrid
R
false
true
6,318
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/bertin.r \name{bertinCluster} \alias{bertinCluster} \title{Bertin display with corresponding cluster analysis.} \usage{ bertinCluster( x, dmethod = c("euclidean", "euclidean"), cmethod = c("ward", "ward"), p = c(2, 2), al...
#Exploratory Data Analysis:- # install.packages("tidyverse") # install.packages("funModeling") # install.packages("Hmisc") library(funModeling) library(tidyverse) library(Hmisc) dirty_csv = read.csv(file.choose()) view(dirty_csv) dim(dirty_csv) #Observing the data and looking at its summary glimp...
/EDA.R
no_license
shivmistry605/MAST90106-Data-Science-Project-Group-3
R
false
false
646
r
#Exploratory Data Analysis:- # install.packages("tidyverse") # install.packages("funModeling") # install.packages("Hmisc") library(funModeling) library(tidyverse) library(Hmisc) dirty_csv = read.csv(file.choose()) view(dirty_csv) dim(dirty_csv) #Observing the data and looking at its summary glimp...
makeCacheMatrix <- function(y = matrix()) { inv <- NULL set <- function(z) { y <<- z inv <<- NULL } get <- function() x setInverse <- function(inverse) inv <<- inverse getInverse <- function() inv list(set = set, get = get, setInverse = setInverse, getInverse = getInverse) }...
/cachematrix.R
no_license
adithyap17067/ProgrammingAssignment2
R
false
false
574
r
makeCacheMatrix <- function(y = matrix()) { inv <- NULL set <- function(z) { y <<- z inv <<- NULL } get <- function() x setInverse <- function(inverse) inv <<- inverse getInverse <- function() inv list(set = set, get = get, setInverse = setInverse, getInverse = getInverse) }...
install.packages('caTools') #for train and test data split install.packages('dplyr') #for Data Manipulation install.packages('ggplot2') #for Data Visualization install.packages('class') #KNN install.packages('caret') #Confusion Matrix install.packages('corrplot') #Correlation Plot library(caTools) li...
/glass.R
no_license
sowmyatushar/R-Programing-Language
R
false
false
2,454
r
install.packages('caTools') #for train and test data split install.packages('dplyr') #for Data Manipulation install.packages('ggplot2') #for Data Visualization install.packages('class') #KNN install.packages('caret') #Confusion Matrix install.packages('corrplot') #Correlation Plot library(caTools) li...
# O-stats plots with better formatting. # Author: QDR # Project: NEON ITV # Created: 19 Oct 2016 # Last modified: 02 Dec 2016 # Modified 2 Dec: plots with Harvard removed, and work on formatting. # Modified 7 Nov: Improve scatterplots # Modified 30 Oct: add continental # Modified 20 Oct: change axis labels source('co...
/code/vis/formattedplots.r
no_license
NEON-biodiversity/mammalitv
R
false
false
30,233
r
# O-stats plots with better formatting. # Author: QDR # Project: NEON ITV # Created: 19 Oct 2016 # Last modified: 02 Dec 2016 # Modified 2 Dec: plots with Harvard removed, and work on formatting. # Modified 7 Nov: Improve scatterplots # Modified 30 Oct: add continental # Modified 20 Oct: change axis labels source('co...
## --------------------------------------------- ## # # # sE.progress # # fE.progress # # # ## --------------------------------------------- ## ## ----...
/R/Progress.R
no_license
jcaledo/renz
R
false
false
6,407
r
## --------------------------------------------- ## # # # sE.progress # # fE.progress # # # ## --------------------------------------------- ## ## ----...
# Team FINANCE 3 # Project Deliverable 2 - Perform analysis on the dataset and build graphical representatons, predictions, etc. # DATA SET - https://www.kaggle.com/nicapotato/womens-ecommerce-clothing-reviews # The OBJECTIVE is to perform exploratory analysis, predict the rating of the clothes, and do clustering ...
/Women's clothes.R
no_license
qiaozhou-qz/Ecommerce
R
false
false
35,466
r
# Team FINANCE 3 # Project Deliverable 2 - Perform analysis on the dataset and build graphical representatons, predictions, etc. # DATA SET - https://www.kaggle.com/nicapotato/womens-ecommerce-clothing-reviews # The OBJECTIVE is to perform exploratory analysis, predict the rating of the clothes, and do clustering ...
###########################################################################/** # @RdocGeneric callNaiveGenotypes # @alias callNaiveGenotypes.numeric # # @title "Calls genotypes in a normal sample" # # \description{ # @get "title". # } # # \usage{ # @usage callNaiveGenotypes,numeric # } # # \arguments{ # \item{y}{A @...
/R/callNaiveGenotypes.R
no_license
HenrikBengtsson/aroma.light-BioC_release
R
false
false
7,173
r
###########################################################################/** # @RdocGeneric callNaiveGenotypes # @alias callNaiveGenotypes.numeric # # @title "Calls genotypes in a normal sample" # # \description{ # @get "title". # } # # \usage{ # @usage callNaiveGenotypes,numeric # } # # \arguments{ # \item{y}{A @...
# Capstone Project # File: toBenchDir.R # Set working directory to the benchmark data directory prj.dir <- file.path(Sys.getenv("HOME"),"git","NLPCapstone") download.dir <- "nlpData.dir"; bench.dir <- "bench" bench.dir <- file.path(prj.dir,download.dir,bench.dir) setwd(bench.dir) print(paste("Current directory: ",getw...
/toBenchDir.R
no_license
gamercier/NLPCapstone
R
false
false
326
r
# Capstone Project # File: toBenchDir.R # Set working directory to the benchmark data directory prj.dir <- file.path(Sys.getenv("HOME"),"git","NLPCapstone") download.dir <- "nlpData.dir"; bench.dir <- "bench" bench.dir <- file.path(prj.dir,download.dir,bench.dir) setwd(bench.dir) print(paste("Current directory: ",getw...
library(bedr) ### Name: is.sorted.region ### Title: checks if region file is sorted ### Aliases: is.sorted.region ### Keywords: ~kwd1 ### ** Examples if (check.binary("bedtools")) { index <- get.example.regions(); a <- index[[1]]; b <- is.sorted.region(a); }
/data/genthat_extracted_code/bedr/examples/is.sorted.region.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
268
r
library(bedr) ### Name: is.sorted.region ### Title: checks if region file is sorted ### Aliases: is.sorted.region ### Keywords: ~kwd1 ### ** Examples if (check.binary("bedtools")) { index <- get.example.regions(); a <- index[[1]]; b <- is.sorted.region(a); }
# Test thtPower.R # library("testthat") library(stringr) path_to_source <- "/home/kwabena/Documents/trafin/lovy/power/src/main/R/" source(str_glue(path_to_source, "thtPower.R")) path_to_data <- "/home/kwabena/Documents/trafin/lovy/power/src/main/Data" describe("thtPower.R", { describe("getThtBased(colName)...
/power/src/main/R/thtPower_tests.R
no_license
fbrute/lovy
R
false
false
778
r
# Test thtPower.R # library("testthat") library(stringr) path_to_source <- "/home/kwabena/Documents/trafin/lovy/power/src/main/R/" source(str_glue(path_to_source, "thtPower.R")) path_to_data <- "/home/kwabena/Documents/trafin/lovy/power/src/main/Data" describe("thtPower.R", { describe("getThtBased(colName)...
library(checkarg) ### Name: isZeroOrNanVector ### Title: Wrapper for the checkarg function, using specific parameter ### settings. ### Aliases: isZeroOrNanVector ### ** Examples isZeroOrNanVector(0) # returns TRUE (argument is valid) isZeroOrNanVector("X") # returns FALSE (argument is invalid) #isZeroOrNanV...
/data/genthat_extracted_code/checkarg/examples/isZeroOrNanVector.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
783
r
library(checkarg) ### Name: isZeroOrNanVector ### Title: Wrapper for the checkarg function, using specific parameter ### settings. ### Aliases: isZeroOrNanVector ### ** Examples isZeroOrNanVector(0) # returns TRUE (argument is valid) isZeroOrNanVector("X") # returns FALSE (argument is invalid) #isZeroOrNanV...
library(testthat) library(ssid) test_check("ssid")
/tests/testthat.R
permissive
JingjieSong/ssid
R
false
false
52
r
library(testthat) library(ssid) test_check("ssid")
# Unit tests library(GenomicDistributions) context("Testthat context...") ############################################################################# # Test data should be with toy examples you can work out by hand # that way you can calculate by hand and compare to the output of the function # toy data for testin...
/tests/testthat/test_all.R
no_license
GenomicsNX/GenomicDistributions
R
false
false
8,854
r
# Unit tests library(GenomicDistributions) context("Testthat context...") ############################################################################# # Test data should be with toy examples you can work out by hand # that way you can calculate by hand and compare to the output of the function # toy data for testin...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/enpy.R \name{prinsens} \alias{prinsens} \title{Principal Sensitivity Components} \usage{ prinsens( x, y, alpha, lambda, intercept = TRUE, penalty_loadings, en_algorithm_opts, eps = 1e-06, sparse = FALSE, ncores = 1L, met...
/man/prinsens.Rd
no_license
cran/pense
R
false
true
2,519
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/enpy.R \name{prinsens} \alias{prinsens} \title{Principal Sensitivity Components} \usage{ prinsens( x, y, alpha, lambda, intercept = TRUE, penalty_loadings, en_algorithm_opts, eps = 1e-06, sparse = FALSE, ncores = 1L, met...
#' test_all #' A function which stress tests an R function with user-defined inputs. #' @param fun an R function to test #' @param input a grid created with \code{\link{lazy_tester}} #' @param output not implemented yet #' @param cores an integer specifying the number of cores to use #' #' @return Returns a table with ...
/R/test_all.R
no_license
andremonaco/testall
R
false
false
3,964
r
#' test_all #' A function which stress tests an R function with user-defined inputs. #' @param fun an R function to test #' @param input a grid created with \code{\link{lazy_tester}} #' @param output not implemented yet #' @param cores an integer specifying the number of cores to use #' #' @return Returns a table with ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plotMCMCResults.forArray3D.R \name{plotMCMCResults.forArray3D} \alias{plotMCMCResults.forArray3D} \title{Calculate and plot a posterior density based on a 3d MCMC data aray.} \usage{ plotMCMCResults.forArray3D(data, scaleBy = 1, doPlot = TRUE...
/man/plotMCMCResults.forArray3D.Rd
permissive
wStockhausen/rTCSAM2015
R
false
true
1,284
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/plotMCMCResults.forArray3D.R \name{plotMCMCResults.forArray3D} \alias{plotMCMCResults.forArray3D} \title{Calculate and plot a posterior density based on a 3d MCMC data aray.} \usage{ plotMCMCResults.forArray3D(data, scaleBy = 1, doPlot = TRUE...
#Printing hi as many times as I want for (i in seq(1,10) ) { print("hi") } #How much money Tim has in his piggy bank #It works #How much tim has in his piggy bank at the first week 10 -> InitialAmmount #His weekly allowence 5 -> WeeklyAllowence #The price of his gum 1.34 -> GumPrice #The loop InitialAm...
/Lab_04/Lab_04.R
no_license
PatrickMorrison0850/CompBioHomeworkAndLabs
R
false
false
3,137
r
#Printing hi as many times as I want for (i in seq(1,10) ) { print("hi") } #How much money Tim has in his piggy bank #It works #How much tim has in his piggy bank at the first week 10 -> InitialAmmount #His weekly allowence 5 -> WeeklyAllowence #The price of his gum 1.34 -> GumPrice #The loop InitialAm...
library(data.table) library(sparkline) # ====準備部分==== source(file = "01_Settings/Path.R", local = T, encoding = "UTF-8") # 感染者ソーステーブルを取得 byDate <- fread(paste0(DATA_PATH, "byDate.csv"), header = T) byDate[is.na(byDate)] <- 0 byDate$date <- lapply(byDate[, 1], function(x) { as.Date(as.character(x), format = "%Y%m%d")...
/00_System/CreateTable.R
permissive
yuster0/2019-ncov-japan
R
false
false
14,387
r
library(data.table) library(sparkline) # ====準備部分==== source(file = "01_Settings/Path.R", local = T, encoding = "UTF-8") # 感染者ソーステーブルを取得 byDate <- fread(paste0(DATA_PATH, "byDate.csv"), header = T) byDate[is.na(byDate)] <- 0 byDate$date <- lapply(byDate[, 1], function(x) { as.Date(as.character(x), format = "%Y%m%d")...
source("borehole_func.R") # set dimensions for gpro d <- 8 #Set the function Name here funcname <- 'bore.function' #Read in the base design. xf <- read.table('XD8N40.txt',header=F) colnames(xf) <- paste('x',1:d,sep='') #Compute test set data xp <- data.matrix(read.table('test8.csv',header=F,sep=',')[,1:d]) colna...
/Designs/Borehole/n40_mLHD/job_borehole.R
no_license
Dustin21/GaSP-Ensemble
R
false
false
1,079
r
source("borehole_func.R") # set dimensions for gpro d <- 8 #Set the function Name here funcname <- 'bore.function' #Read in the base design. xf <- read.table('XD8N40.txt',header=F) colnames(xf) <- paste('x',1:d,sep='') #Compute test set data xp <- data.matrix(read.table('test8.csv',header=F,sep=',')[,1:d]) colna...
params.df <- cbind(data.frame(param=gsub(":\\(Intercept\\)","", rownames(summary(logmorphine_SHPfit)$coefficient)),stringsAsFactors=F), data.frame(summary(logmorphine_SHPfit)$coefficient)) rownames(params.df) <- NULL ann.df <- data.frame(Parameter=gsub(" Limi...
/Morphine DR BPS poster.R
no_license
bkiyota/Cannevert_Co-op2017-19
R
false
false
11,428
r
params.df <- cbind(data.frame(param=gsub(":\\(Intercept\\)","", rownames(summary(logmorphine_SHPfit)$coefficient)),stringsAsFactors=F), data.frame(summary(logmorphine_SHPfit)$coefficient)) rownames(params.df) <- NULL ann.df <- data.frame(Parameter=gsub(" Limi...
qcProbes=list( BSI="^BISULFITE CONVERSION I$", BSII="^BISULFITE CONVERSION II$", EC="^EXTENSION$", SPI="^SPECIFICITY I$", HYB= "^HYBRIDIZATION$", NP="^NON-POLYMORPHIC$", SPII="^SPECIFICITY II$", TR="^TARGET REMOVAL$", SC="^STAINING$", NC="^NEGATIVE$") ## we don't use the normalization controls NORM_...
/R/util.R
no_license
bbmri-nl/MethylAid
R
false
false
5,159
r
qcProbes=list( BSI="^BISULFITE CONVERSION I$", BSII="^BISULFITE CONVERSION II$", EC="^EXTENSION$", SPI="^SPECIFICITY I$", HYB= "^HYBRIDIZATION$", NP="^NON-POLYMORPHIC$", SPII="^SPECIFICITY II$", TR="^TARGET REMOVAL$", SC="^STAINING$", NC="^NEGATIVE$") ## we don't use the normalization controls NORM_...
library(ggplot2) data <- function(){ data_df[,-1:-2] } regress_plot <- function(predictorx, responsey, years){ data_df <- data_df[,-1:-2] data_df <- data_df[data_df$Year>=as.numeric(years),] if (responsey=="wins"){ qplot(data=data_df,x=as.numeric(data_df[,as.numeric(predictorx)]),y=as.nu...
/R Programming project/server.R
no_license
SVG23/SoftwareDevelopment
R
false
false
3,297
r
library(ggplot2) data <- function(){ data_df[,-1:-2] } regress_plot <- function(predictorx, responsey, years){ data_df <- data_df[,-1:-2] data_df <- data_df[data_df$Year>=as.numeric(years),] if (responsey=="wins"){ qplot(data=data_df,x=as.numeric(data_df[,as.numeric(predictorx)]),y=as.nu...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/exports.R \name{md.survcox} \alias{md.survcox} \title{Fit a proportional hazards regression model over disease recurrence data with missing information of possible deaths} \usage{ md.survcox(data, f, maxtime, D, ratetable, iterations ...
/man/md.survcox.Rd
no_license
cran/missDeaths
R
false
true
2,746
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/exports.R \name{md.survcox} \alias{md.survcox} \title{Fit a proportional hazards regression model over disease recurrence data with missing information of possible deaths} \usage{ md.survcox(data, f, maxtime, D, ratetable, iterations ...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/facet_nodes.R \name{facet_nodes} \alias{facet_nodes} \title{Create small multiples based on node attributes} \usage{ facet_nodes(facets, nrow = NULL, ncol = NULL, scales = "fixed", shrink = TRUE, labeller = "label_value", as.table = TRUE, ...
/man/facet_nodes.Rd
permissive
schochastics/ggraph
R
false
true
3,365
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/facet_nodes.R \name{facet_nodes} \alias{facet_nodes} \title{Create small multiples based on node attributes} \usage{ facet_nodes(facets, nrow = NULL, ncol = NULL, scales = "fixed", shrink = TRUE, labeller = "label_value", as.table = TRUE, ...
library(qgtools) ### Name: adc.simudata ### Title: An R function to generate an ADC model simulated data set ### Aliases: adc.simudata ### Keywords: ADC model cotton simuated data cotf2 ### ** Examples library(qgtools) data(cotf2) Ped=cotf2[,c(1:5)] Y=cotf2[,-c(1:5)] YS=adc.simudata(Y,Ped,v=rep(20,9),b=c(100)...
/data/genthat_extracted_code/qgtools/examples/adc.simudata.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
335
r
library(qgtools) ### Name: adc.simudata ### Title: An R function to generate an ADC model simulated data set ### Aliases: adc.simudata ### Keywords: ADC model cotton simuated data cotf2 ### ** Examples library(qgtools) data(cotf2) Ped=cotf2[,c(1:5)] Y=cotf2[,-c(1:5)] YS=adc.simudata(Y,Ped,v=rep(20,9),b=c(100)...
### This script takes the 1000 EWAS permutations and for each site calculates its average ranking # Setting up setwd("../Results") filenames<-paste("../../Data/EWASPermutations/EWASPermutations100Num", seq(1,10,1), ".rdata", sep="") allres<-matrix(ncol=0, nrow=804826) for (f in 1:10){ filename<-filenames[f] load(...
/6.CalcAverageRank.r
no_license
ejh243/EPICStatsPaper
R
false
false
737
r
### This script takes the 1000 EWAS permutations and for each site calculates its average ranking # Setting up setwd("../Results") filenames<-paste("../../Data/EWASPermutations/EWASPermutations100Num", seq(1,10,1), ".rdata", sep="") allres<-matrix(ncol=0, nrow=804826) for (f in 1:10){ filename<-filenames[f] load(...
library(shiny) library(datasets) # Define server logic requirments shinyServer(function(input, output) { # Compute the forumla text in a reactive expression # Generate a plot of the requested variable against mpg and only # include outliers if requested output$semeionplot<- renderPlot(...
/ADS_FINAL/shinybasicfiles/server.R
no_license
manethochen/PrudentialReport
R
false
false
338
r
library(shiny) library(datasets) # Define server logic requirments shinyServer(function(input, output) { # Compute the forumla text in a reactive expression # Generate a plot of the requested variable against mpg and only # include outliers if requested output$semeionplot<- renderPlot(...
library(raster) prj <- "+proj=stere +lat_0=90 +lat_ts=71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0" src <- readAll(raadtools::readtopo("gebco_14")) ##, xylim = extent(-180, 180, -90, 0)) r <- raster(projectExtent(raster(extent(-180, 180, 5, 90), crs = "+init=epsg:4326"), ...
/data-raw/Bathy.R
no_license
mdsumner/NOmap
R
false
false
558
r
library(raster) prj <- "+proj=stere +lat_0=90 +lat_ts=71 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs +ellps=WGS84 +towgs84=0,0,0" src <- readAll(raadtools::readtopo("gebco_14")) ##, xylim = extent(-180, 180, -90, 0)) r <- raster(projectExtent(raster(extent(-180, 180, 5, 90), crs = "+init=epsg:4326"), ...
#' Get the number of efficacy events seen at the doses under investigation. #' #' @param x An R object of class \code{"dose_finding_fit"} #' @param dose Optional integer, at which dose-level? Omit to get data on all doses. #' @param ... arguments passed to other methods #' #' @return integer vector #' #' @export #' #'...
/R/eff_at_dose.R
no_license
brockk/trialr
R
false
false
822
r
#' Get the number of efficacy events seen at the doses under investigation. #' #' @param x An R object of class \code{"dose_finding_fit"} #' @param dose Optional integer, at which dose-level? Omit to get data on all doses. #' @param ... arguments passed to other methods #' #' @return integer vector #' #' @export #' #'...
dget(fake.dat, "fakedat.txt") library(runjags) sim_test <- run.jags("model.txt", data = fake.dat$jags.data, monitor = fake.dat$jags.pars, adapt = 100, n.chains = 2, sample = 200, burnin = 0, inits = fake.dat$jags.inits, method = "parallel") #this runs fine when line 61 is ...
/Runcode.R
no_license
heathergaya/modelproblem
R
false
false
456
r
dget(fake.dat, "fakedat.txt") library(runjags) sim_test <- run.jags("model.txt", data = fake.dat$jags.data, monitor = fake.dat$jags.pars, adapt = 100, n.chains = 2, sample = 200, burnin = 0, inits = fake.dat$jags.inits, method = "parallel") #this runs fine when line 61 is ...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/matstat.R \name{rollFun} \alias{rollFun} \title{Compute rolling (a.k.a. moving) window statistics} \usage{ rollFun(dat, width, FUN, force_rollapply = FALSE, ...) } \arguments{ \item{dat}{a numeric vector, matrix or data.frame. In the ...
/man/rollFun.Rd
no_license
kapilsaxena33/eegR
R
false
false
1,226
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/matstat.R \name{rollFun} \alias{rollFun} \title{Compute rolling (a.k.a. moving) window statistics} \usage{ rollFun(dat, width, FUN, force_rollapply = FALSE, ...) } \arguments{ \item{dat}{a numeric vector, matrix or data.frame. In the ...
library(DAAG) library(ridge) panel.cor <- function(x, y, digits=2, prefix="", cex.cor) { usr <- par("usr"); on.exit(par(usr)) par(usr = c(0, 1, 0, 1)) r <- abs(cor(x, y)) txt <- format(c(r, 0.123456789), digits=digits)[1] txt <- paste(prefix, txt, sep="") if(missing(cex.cor)) cex <- 0.8/strwidth(txt)...
/eda_output/agmesh-commodity-annual-palouse_ed42.R
no_license
erichseamon/dmine
R
false
false
10,722
r
library(DAAG) library(ridge) panel.cor <- function(x, y, digits=2, prefix="", cex.cor) { usr <- par("usr"); on.exit(par(usr)) par(usr = c(0, 1, 0, 1)) r <- abs(cor(x, y)) txt <- format(c(r, 0.123456789), digits=digits)[1] txt <- paste(prefix, txt, sep="") if(missing(cex.cor)) cex <- 0.8/strwidth(txt)...
library(dplyr) loadData <- function() { read.table('data.txt', sep=';', header=TRUE) %>% mutate(Date = as.Date(Date, '%d/%m/%Y')) %>% mutate(Time = as.POSIXct(strptime(paste(Date, ' ', Time), '%Y-%m-%d %H:%M:%S'))) %>% filter(Time >= strftime('2007-02-01 00:00:00'), Time < strftime('2007-02-03 00:0...
/load_data.r
no_license
mrrmaurya/DataPlotting1
R
false
false
352
r
library(dplyr) loadData <- function() { read.table('data.txt', sep=';', header=TRUE) %>% mutate(Date = as.Date(Date, '%d/%m/%Y')) %>% mutate(Time = as.POSIXct(strptime(paste(Date, ' ', Time), '%Y-%m-%d %H:%M:%S'))) %>% filter(Time >= strftime('2007-02-01 00:00:00'), Time < strftime('2007-02-03 00:0...
###################################################################################### #The following is a script for creating a tidy data set containing measurements from # #6 types of activities collected by accelerometers for subjects in training and in # #testing groups. Please read the codebook see the comments ...
/run_analysis.R
no_license
PS930/GCDProject
R
false
false
6,706
r
###################################################################################### #The following is a script for creating a tidy data set containing measurements from # #6 types of activities collected by accelerometers for subjects in training and in # #testing groups. Please read the codebook see the comments ...
library(hillR) ### Name: hill_taxa_parti ### Title: Decompostion of Taxonomic diversity through Hill Numbers ### Aliases: hill_taxa_parti ### ** Examples dummy = FD::dummy hill_taxa_parti(comm = dummy$abun, q = 0) hill_taxa_parti(comm = dummy$abun, q = 1) hill_taxa_parti(comm = dummy$abun, q = 0.9999999) hill_taxa_...
/data/genthat_extracted_code/hillR/examples/hill_taxa_parti.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
536
r
library(hillR) ### Name: hill_taxa_parti ### Title: Decompostion of Taxonomic diversity through Hill Numbers ### Aliases: hill_taxa_parti ### ** Examples dummy = FD::dummy hill_taxa_parti(comm = dummy$abun, q = 0) hill_taxa_parti(comm = dummy$abun, q = 1) hill_taxa_parti(comm = dummy$abun, q = 0.9999999) hill_taxa_...
library(readxl) siegedata23 <- function(siegex) { Siege1 <- read_excel("Siege1.xlsx") Siege2 <- read_excel("Siege2.xlsx") siege1 <-(Siege1$score) siege2 <-(Siege2$score) g_range2 <- range(1000, siege1, siege2) plot(siege1,type="o", col="green",ylim=g_range2,ylab = "Score", xlab = "Game Number (Out of 10)...
/R/siegedata.R
no_license
Dakkerr/StimulantsInVideoGames
R
false
false
530
r
library(readxl) siegedata23 <- function(siegex) { Siege1 <- read_excel("Siege1.xlsx") Siege2 <- read_excel("Siege2.xlsx") siege1 <-(Siege1$score) siege2 <-(Siege2$score) g_range2 <- range(1000, siege1, siege2) plot(siege1,type="o", col="green",ylim=g_range2,ylab = "Score", xlab = "Game Number (Out of 10)...
#' Spark ML -- K-Means Clustering #' #' K-means clustering with support for k-means|| initialization proposed by Bahmani et al. #' Using `ml_kmeans()` with the formula interface requires Spark 2.0+. #' #' @template roxlate-ml-clustering-algo #' @template roxlate-ml-clustering-params #' @template roxlate-ml-tol #' @te...
/R/ml_clustering_kmeans.R
permissive
benblucas/sparklyr
R
false
false
5,288
r
#' Spark ML -- K-Means Clustering #' #' K-means clustering with support for k-means|| initialization proposed by Bahmani et al. #' Using `ml_kmeans()` with the formula interface requires Spark 2.0+. #' #' @template roxlate-ml-clustering-algo #' @template roxlate-ml-clustering-params #' @template roxlate-ml-tol #' @te...
#----------------------------------------------------------------------------------------------------------- #- Combine leaf temperatures and flux measurements to calculate # assimilation-weighted leaf temperatures. # Some of this code was copied over and simplified from "leaf thermocouples.R" #--------------------...
/R/combine_data_plot_assimiationWeightedLeafT.R
no_license
jedrake/wtc4_flux
R
false
false
42,370
r
#----------------------------------------------------------------------------------------------------------- #- Combine leaf temperatures and flux measurements to calculate # assimilation-weighted leaf temperatures. # Some of this code was copied over and simplified from "leaf thermocouples.R" #--------------------...
#' Rozvodnice 28 povodí v ČR #' #' @format SpatialPolygonsDataFrame - 28 polygonů "povodi" #' Hydrometeorologická data pro 28 povodí v ČR #' #' @format data.table obsahující následující proměnné #' #' \describe{ #' \item{DBCN}{databankové číslo (identifikátor povodí) - pomocí něj je možné propojit s datasetem \lin...
/R/data.R
no_license
hanel/KZ2020
R
false
false
905
r
#' Rozvodnice 28 povodí v ČR #' #' @format SpatialPolygonsDataFrame - 28 polygonů "povodi" #' Hydrometeorologická data pro 28 povodí v ČR #' #' @format data.table obsahující následující proměnné #' #' \describe{ #' \item{DBCN}{databankové číslo (identifikátor povodí) - pomocí něj je možné propojit s datasetem \lin...
#' print methods of the tt objects #' #' In tidytuesdayR there are nice print methods for the objects that were used #' to download and store the data from the TidyTuesday repo. They will always #' print the available datasets/files. If there is a readme available, #' it will try to display the tidytuesday readme. #'...
/R/utils.R
permissive
thecodemasterk/tidytuesdayR
R
false
false
2,191
r
#' print methods of the tt objects #' #' In tidytuesdayR there are nice print methods for the objects that were used #' to download and store the data from the TidyTuesday repo. They will always #' print the available datasets/files. If there is a readme available, #' it will try to display the tidytuesday readme. #'...
# BACI-Chironomid # 2014-11-28 CJS sf.autoplot.lmer # 2014-11-26 CJS sink, ggplot, ##***, lmer modifications # Taken from Krebs, Ecological Methodology, 2nd Edition. Box 10.3. # Estimates of chironomid abundance in sediments were taken at one station # above and below a pulp mill outflow pipe for 3 years befo...
/Sampling_Regression_Experiment_Design_and_Analysis/baci-chironomid.r
no_license
burakbayramli/books
R
false
false
7,078
r
# BACI-Chironomid # 2014-11-28 CJS sf.autoplot.lmer # 2014-11-26 CJS sink, ggplot, ##***, lmer modifications # Taken from Krebs, Ecological Methodology, 2nd Edition. Box 10.3. # Estimates of chironomid abundance in sediments were taken at one station # above and below a pulp mill outflow pipe for 3 years befo...
#'@title distance #'@description #'The distance function computes the string distances between main and subtypes of meteroites. #'For measuring the distance between to strings the Jaro-Winker distance is used. #'A value of 1 means there is no similarity between two strings. #'A value of 0 means the similarity between t...
/R/Distance.R
permissive
Oviing/meteroites2
R
false
false
1,329
r
#'@title distance #'@description #'The distance function computes the string distances between main and subtypes of meteroites. #'For measuring the distance between to strings the Jaro-Winker distance is used. #'A value of 1 means there is no similarity between two strings. #'A value of 0 means the similarity between t...
##' kfadvance function ##' ##' A function to ##' ##' @param obs X ##' @param oldmean X ##' @param oldvar X ##' @param A X ##' @param B X ##' @param C X ##' @param D X ##' @param E X ##' @param F X ##' @param W X ##' @param V X ##' @param marglik X ##' @param log X ##' @param na.rm X ##' @return ... ##' @...
/R/kfadvance.R
no_license
bentaylor1/kalmanST
R
false
false
3,117
r
##' kfadvance function ##' ##' A function to ##' ##' @param obs X ##' @param oldmean X ##' @param oldvar X ##' @param A X ##' @param B X ##' @param C X ##' @param D X ##' @param E X ##' @param F X ##' @param W X ##' @param V X ##' @param marglik X ##' @param log X ##' @param na.rm X ##' @return ... ##' @...
# Set up ------------------------------------------------------------------ library(ggplot2) library(purrr) library(sf) outfolder <- "04-garabato-pictures/" if (!dir.exists(outfolder)) dir.create(outfolder) # Functions --------------------------------------------------------------- rotate <- function(a) matrix(c(c...
/04-garabato-pictures.R
no_license
acastroaraujo/visualization
R
false
false
2,144
r
# Set up ------------------------------------------------------------------ library(ggplot2) library(purrr) library(sf) outfolder <- "04-garabato-pictures/" if (!dir.exists(outfolder)) dir.create(outfolder) # Functions --------------------------------------------------------------- rotate <- function(a) matrix(c(c...
.http.request = function(path, query, body, headers) { if (path == "/" || path == "" || path == "/user") { resp_body = "" } else { match_info <- regexec("^/user/(.*)", path) resp_body <- regmatches(path, match_info)[[1]][2] } status_code = 200L resp_headers = character(0) content_type = "text/pl...
/r/rserve/app.R
permissive
the-benchmarker/web-frameworks
R
false
false
444
r
.http.request = function(path, query, body, headers) { if (path == "/" || path == "" || path == "/user") { resp_body = "" } else { match_info <- regexec("^/user/(.*)", path) resp_body <- regmatches(path, match_info)[[1]][2] } status_code = 200L resp_headers = character(0) content_type = "text/pl...
setwd("C:/Users/sli126/Documents/GitHub/R_Programming") data<-read.csv("hw1_data.csv") $11 names(data) #12 data[1:2,] #13 attributes(data) #14 data[152:153,] tail(data,n=2) #15 data[47,]$Ozone #16 sum(as.numeric(is.na(data$Ozone))) #17 miss<-is.na(data$Ozone) nmiss<-data$Ozone[!miss] mean(nmiss) #18 m<-data[Ozone>31 &...
/quiz1.R
no_license
hcydlee/R_Programming
R
false
false
459
r
setwd("C:/Users/sli126/Documents/GitHub/R_Programming") data<-read.csv("hw1_data.csv") $11 names(data) #12 data[1:2,] #13 attributes(data) #14 data[152:153,] tail(data,n=2) #15 data[47,]$Ozone #16 sum(as.numeric(is.na(data$Ozone))) #17 miss<-is.na(data$Ozone) nmiss<-data$Ozone[!miss] mean(nmiss) #18 m<-data[Ozone>31 &...