content large_stringlengths 0 6.46M | path large_stringlengths 3 331 | license_type large_stringclasses 2
values | repo_name large_stringlengths 5 125 | language large_stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.46M | extension large_stringclasses 75
values | text stringlengths 0 6.46M |
|---|---|---|---|---|---|---|---|---|---|
% Generated by roxygen2 (4.0.1): do not edit by hand
\name{bins.greedy}
\alias{bins.greedy}
\alias{bins.greedy.impl}
\title{Greedy binning algorithm.}
\usage{
bins.greedy(x, nbins, minpts = floor(0.5 * length(x)/nbins), thresh = 0.8,
naive = FALSE)
bins.greedy.impl(xval, xtbl, xstp, binsz, nbins, thresh, verbose = F... | /man/bins.greedy.Rd | no_license | WayneZHAO1989/binr | R | false | false | 2,926 | rd | % Generated by roxygen2 (4.0.1): do not edit by hand
\name{bins.greedy}
\alias{bins.greedy}
\alias{bins.greedy.impl}
\title{Greedy binning algorithm.}
\usage{
bins.greedy(x, nbins, minpts = floor(0.5 * length(x)/nbins), thresh = 0.8,
naive = FALSE)
bins.greedy.impl(xval, xtbl, xstp, binsz, nbins, thresh, verbose = F... |
library(ggplot2)
library(pROC)
library(Seurat)
setwd("./")
#Drug Score ROC
VD<-read.table(file="./Validated_Drugs_COVID19.txt",header = F)
PD<-unique(c(as.character(VD[,1])))
PD.table<-data.frame(drug=PD,group="PD")
Rocs<-data.frame()
Cd<-readRDS("COVID19_drugscore_FDA_limma.rds")
Drugs<-unique(as.character(r... | /ROC/ROC_COVID19.R | no_license | lanagarmire/Single-cell-drug-repositioning | R | false | false | 7,113 | r | library(ggplot2)
library(pROC)
library(Seurat)
setwd("./")
#Drug Score ROC
VD<-read.table(file="./Validated_Drugs_COVID19.txt",header = F)
PD<-unique(c(as.character(VD[,1])))
PD.table<-data.frame(drug=PD,group="PD")
Rocs<-data.frame()
Cd<-readRDS("COVID19_drugscore_FDA_limma.rds")
Drugs<-unique(as.character(r... |
library(easyPubMed)
### Name: table_articles_byAuth
### Title: Extract Publication and Affiliation Data from PubMed Records
### Aliases: table_articles_byAuth
### ** Examples
## Not run:
##D #
##D #
##D dami_query <- "Damiano Fantini[AU]"
##D dami_on_pubmed <- get_pubmed_ids(dami_query)
##D dami_abstracts_xml <- f... | /data/genthat_extracted_code/easyPubMed/examples/table_articles_byAuth.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 910 | r | library(easyPubMed)
### Name: table_articles_byAuth
### Title: Extract Publication and Affiliation Data from PubMed Records
### Aliases: table_articles_byAuth
### ** Examples
## Not run:
##D #
##D #
##D dami_query <- "Damiano Fantini[AU]"
##D dami_on_pubmed <- get_pubmed_ids(dami_query)
##D dami_abstracts_xml <- f... |
## Common code used for all the plots is contained a single common file named
## "loadtidydata.R". It performs the following common functions :
## 1. Download data ("household_power_consumption.zip") from cloudfront site
## 2. Unzip as "household_power_consumption.txt" file
## 3. Load the filtered data f... | /plot3.R | no_license | bhaskar-reddy/exploratory.data.analysis | R | false | false | 1,018 | r | ## Common code used for all the plots is contained a single common file named
## "loadtidydata.R". It performs the following common functions :
## 1. Download data ("household_power_consumption.zip") from cloudfront site
## 2. Unzip as "household_power_consumption.txt" file
## 3. Load the filtered data f... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/raster.R
\name{osm_raster}
\alias{osm_raster}
\title{Load an Open Street Map image}
\usage{
osm_raster(
bbox,
spec,
zoom = osm_zoom_num_tiles(6),
cache_spec = NULL,
quiet = NA
)
}
\arguments{
\item{bbox}{A [wk::rct()] or object with... | /man/osm_raster.Rd | no_license | paleolimbot/rosm | R | false | true | 903 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/raster.R
\name{osm_raster}
\alias{osm_raster}
\title{Load an Open Street Map image}
\usage{
osm_raster(
bbox,
spec,
zoom = osm_zoom_num_tiles(6),
cache_spec = NULL,
quiet = NA
)
}
\arguments{
\item{bbox}{A [wk::rct()] or object with... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/analyticsreporting_objects.R
\name{ReportData}
\alias{ReportData}
\title{ReportData Object}
\usage{
ReportData(minimums = NULL, samplingSpaceSizes = NULL, totals = NULL,
samplesReadCounts = NULL, isDataGolden = NULL, rows = NULL,
rowCount... | /googleanalyticsreportingv4.auto/man/ReportData.Rd | permissive | GVersteeg/autoGoogleAPI | R | false | true | 1,176 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/analyticsreporting_objects.R
\name{ReportData}
\alias{ReportData}
\title{ReportData Object}
\usage{
ReportData(minimums = NULL, samplingSpaceSizes = NULL, totals = NULL,
samplesReadCounts = NULL, isDataGolden = NULL, rows = NULL,
rowCount... |
######data current dataset
####dataOR original dataset
######adaptive lasso on the propensity and prediction models separately
######do not take into account the relationship between
#dataOR=simdat
#propenVarList=NULL; outcomeVarList0=NULL; outcomeVarList1=NULL;
#treat.varname=treat.varname; outcome.varname=outcome.va... | /simulation/case2b/Functions/Lasso.R | no_license | TingtingKayla/Stats_Robust_Causal_Estimation | R | false | false | 9,916 | r | ######data current dataset
####dataOR original dataset
######adaptive lasso on the propensity and prediction models separately
######do not take into account the relationship between
#dataOR=simdat
#propenVarList=NULL; outcomeVarList0=NULL; outcomeVarList1=NULL;
#treat.varname=treat.varname; outcome.varname=outcome.va... |
data <- readRDS("./data/flu_data_with_backfill_edit.rds")
fully_observed_data <- data.frame(readRDS("./data/fully_observed_data_formatted.rds"))
test_regions <- c("National")
for (test_region in test_regions){
for (s in c("2010/2011")){
peak_week <- which.max(fully_observed_data[fully_observed_data$season == s... | /R/season_onset.R | no_license | gcgibson/2018-2019-cdc-flu-contest | R | false | false | 549 | r |
data <- readRDS("./data/flu_data_with_backfill_edit.rds")
fully_observed_data <- data.frame(readRDS("./data/fully_observed_data_formatted.rds"))
test_regions <- c("National")
for (test_region in test_regions){
for (s in c("2010/2011")){
peak_week <- which.max(fully_observed_data[fully_observed_data$season == s... |
#I will create a separate script for the "Cover" raster creation because the methods
#are unique.
setwd("/Volumes/Lockbox/Leopard Analysis/")
library(e1071)
library(raster)
library(maptools)
library(spatstat)
library(RColorBrewer)
varNames = c("Open", "Grass", "Cover", "River", "Roads",
"Human", "Glade... | /Cover Raster.R | no_license | beringei/GIS | R | false | false | 11,604 | r | #I will create a separate script for the "Cover" raster creation because the methods
#are unique.
setwd("/Volumes/Lockbox/Leopard Analysis/")
library(e1071)
library(raster)
library(maptools)
library(spatstat)
library(RColorBrewer)
varNames = c("Open", "Grass", "Cover", "River", "Roads",
"Human", "Glade... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dashboardthemes.R
\name{shinyDashboardThemes}
\alias{shinyDashboardThemes}
\title{Calls a custom theme object created using shinyDashboardThemeDIY}
\usage{
shinyDashboardThemes(theme)
}
\arguments{
\item{theme}{String. Name of theme to be use... | /man/shinyDashboardThemes.Rd | no_license | SuplanMPGO/dashboardthemes | R | false | true | 1,315 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dashboardthemes.R
\name{shinyDashboardThemes}
\alias{shinyDashboardThemes}
\title{Calls a custom theme object created using shinyDashboardThemeDIY}
\usage{
shinyDashboardThemes(theme)
}
\arguments{
\item{theme}{String. Name of theme to be use... |
/2. SECOND YEAR/Statistical Software/R/Scripts classes /Clase1.R | no_license | laurajuliamelis/BachelorDegree_Statistics | R | false | false | 6,868 | r | ||
# Clear workspace
# ------------------------------------------------------------------------------
rm(list=ls())
# Load libraries
# ------------------------------------------------------------------------------
library('tidyverse')
library('readr')
library('broom')
library('cowplot')
# Load data
# -------------------... | /scripts/06_adjusted_analysis.R | no_license | anhnguyendepocen/applied_tutorials | R | false | false | 1,402 | r | # Clear workspace
# ------------------------------------------------------------------------------
rm(list=ls())
# Load libraries
# ------------------------------------------------------------------------------
library('tidyverse')
library('readr')
library('broom')
library('cowplot')
# Load data
# -------------------... |
library(tableone)
tabela.disfagia <- print(CreateTableOne(data = DF_pos, vars = c("IDADE", "IMC", "DURACAO", "Dias"), strata = "POS_DISFAGIA"), exact = T, printToggle = F)
tabela.disfonia <- print(CreateTableOne(data = DF_pos, vars = c("IDADE", "IMC", "DURACAO", "Dias"), strata = "POS_DISFONIA"), exact = T, printToggle... | /scripts/tabelas.R | no_license | philsf-biostat/SAR-2018-004-FC | R | false | false | 326 | r | library(tableone)
tabela.disfagia <- print(CreateTableOne(data = DF_pos, vars = c("IDADE", "IMC", "DURACAO", "Dias"), strata = "POS_DISFAGIA"), exact = T, printToggle = F)
tabela.disfonia <- print(CreateTableOne(data = DF_pos, vars = c("IDADE", "IMC", "DURACAO", "Dias"), strata = "POS_DISFONIA"), exact = T, printToggle... |
#' Handicap a race using many races
#'
#' Assess and establish the performance of a winner by using the ratings from
#' many different, but similar, races, calls \link{zipf_race}.
#'
#' @details The \strong{past_races} dataframe is split according to
#' \strong{race_id}, so each split should be a small dataframe of a s... | /R/zipf_hcp.R | no_license | OHRacing/RcappeR | R | false | false | 4,985 | r | #' Handicap a race using many races
#'
#' Assess and establish the performance of a winner by using the ratings from
#' many different, but similar, races, calls \link{zipf_race}.
#'
#' @details The \strong{past_races} dataframe is split according to
#' \strong{race_id}, so each split should be a small dataframe of a s... |
install.packages("dplyr")
install.packages("ggplot2")
library(dplyr)
library(ggplot2)
head(mpg)
dim(mpg)
str(mpg)
summary(mpg)
View(mpg)
mpg %>%
group_by(manufacturer) %>%
summarise(mean.hwy=mean(hwy)) %>%
arrange(desc(mean.hwy))
mpg %>%
filter(manufacturer=="ford") %>%
group_by(model) %>%
arrange(desc(h... | /200901_1.R | no_license | Youngjun-Kwon/R-study | R | false | false | 417 | r | install.packages("dplyr")
install.packages("ggplot2")
library(dplyr)
library(ggplot2)
head(mpg)
dim(mpg)
str(mpg)
summary(mpg)
View(mpg)
mpg %>%
group_by(manufacturer) %>%
summarise(mean.hwy=mean(hwy)) %>%
arrange(desc(mean.hwy))
mpg %>%
filter(manufacturer=="ford") %>%
group_by(model) %>%
arrange(desc(h... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geom_bkde.r
\name{geom_bkde}
\alias{geom_bkde}
\alias{stat_bkde}
\title{Display a smooth density estimate.}
\usage{
geom_bkde(mapping = NULL, data = NULL, stat = "bkde",
position = "identity", bandwidth = NULL, range.x = NULL,
na.rm = FAL... | /man/geom_bkde.Rd | no_license | eleakin/ggalt | R | false | true | 4,820 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/geom_bkde.r
\name{geom_bkde}
\alias{geom_bkde}
\alias{stat_bkde}
\title{Display a smooth density estimate.}
\usage{
geom_bkde(mapping = NULL, data = NULL, stat = "bkde",
position = "identity", bandwidth = NULL, range.x = NULL,
na.rm = FAL... |
#' Constructor for an ErccDbLite object.
#'
#' @param x the name of the sqlite file
#' @param ... additional arguments related to ERCC annotation database.
#' @return an ErccDbLite object.
#'
#' @export
ErccDbLite <- function (x, ...) {
erccdb <- TxDbLite(x, ...)
class(erccdb) <- "ErccDbLite"
return(erccdb)
}
| /R/ErccDbLite.R | no_license | RamsinghLab/TxDbLite | R | false | false | 318 | r | #' Constructor for an ErccDbLite object.
#'
#' @param x the name of the sqlite file
#' @param ... additional arguments related to ERCC annotation database.
#' @return an ErccDbLite object.
#'
#' @export
ErccDbLite <- function (x, ...) {
erccdb <- TxDbLite(x, ...)
class(erccdb) <- "ErccDbLite"
return(erccdb)
}
|
testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 4.09173728822251e+149, 4.12396251261199e-221, 0), .Dim = c(5L, 1L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_rows,testlist)
str(result) | /multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613116812-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 251 | r | testlist <- list(A = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 4.09173728822251e+149, 4.12396251261199e-221, 0), .Dim = c(5L, 1L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_rows,testlist)
str(result) |
s.image <- function(dfxy, z, xax=1, yax=2, span=0.5,
xlim = NULL, ylim = NULL,
kgrid=2, scale=TRUE,
grid = FALSE, addaxes = FALSE, cgrid = 0, include.origin = FALSE,
origin = c(0, 0), sub = "", csub = 1, possub = "topleft",
neig = NULL, cneig = 1, image.plot=TRUE, contour.plot=TRUE,
pixmap = ... | /R/s.image.R | no_license | cran/ade4 | R | false | false | 1,947 | r | s.image <- function(dfxy, z, xax=1, yax=2, span=0.5,
xlim = NULL, ylim = NULL,
kgrid=2, scale=TRUE,
grid = FALSE, addaxes = FALSE, cgrid = 0, include.origin = FALSE,
origin = c(0, 0), sub = "", csub = 1, possub = "topleft",
neig = NULL, cneig = 1, image.plot=TRUE, contour.plot=TRUE,
pixmap = ... |
rm(list=ls())
.libPaths("/global/home/users/cbrook/R/x86_64-pc-linux-gnu-library/3.6")
#setwd("/Users/caraebrook/Documents/R/R_repositories/Berkeley-Reopening/Dec-2020/all-runs/Re-Run-12-24/FigS1/")
#no group, no test, no trace
library(data.table)
library(plyr)
library(dplyr)
library(EpiEstim)
library(deSolve)
libra... | /all-model-runs/Fig3-Testing-TAT-LOD-Freq/weekly-2/weekly-TAT-4-LOD-10.R | no_license | carabrook/Berkeley-COVID-testing | R | false | false | 85,180 | r | rm(list=ls())
.libPaths("/global/home/users/cbrook/R/x86_64-pc-linux-gnu-library/3.6")
#setwd("/Users/caraebrook/Documents/R/R_repositories/Berkeley-Reopening/Dec-2020/all-runs/Re-Run-12-24/FigS1/")
#no group, no test, no trace
library(data.table)
library(plyr)
library(dplyr)
library(EpiEstim)
library(deSolve)
libra... |
###############################################################################
######## DEFINE REGATTA PROCESSING FUNCTIONS ########
###############################################################################
getCompetitorScores = function(results, competitors) {
###IN : results ... | /summary_approach/code/DefineRegattaFunctions.R | permissive | cfowle/elo_sailor | R | false | false | 3,110 | r | ###############################################################################
######## DEFINE REGATTA PROCESSING FUNCTIONS ########
###############################################################################
getCompetitorScores = function(results, competitors) {
###IN : results ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/position_disjoint_ranges.R
\name{position_disjoint_ranges}
\alias{position_disjoint_ranges}
\title{Segregating overlapping ranges}
\usage{
position_disjoint_ranges(extend = 1, stepsize = 1)
}
\arguments{
\item{extend}{a \code{numeric} of leng... | /man/position_disjoint_ranges.Rd | permissive | dimbage/ggh4x | R | false | true | 2,252 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/position_disjoint_ranges.R
\name{position_disjoint_ranges}
\alias{position_disjoint_ranges}
\title{Segregating overlapping ranges}
\usage{
position_disjoint_ranges(extend = 1, stepsize = 1)
}
\arguments{
\item{extend}{a \code{numeric} of leng... |
## Matrix inversion is usually a costly computation. The functions below
## create a matrix object caching the inverse of a matrix rather than
## compute it repeatedly. The first function creates a CaheMatrix object
## and the second function computes and caches the inverse of a CacheMatrix
## object if it has not alre... | /cachematrix.R | no_license | jpelsis/ProgrammingAssignment2 | R | false | false | 1,932 | r | ## Matrix inversion is usually a costly computation. The functions below
## create a matrix object caching the inverse of a matrix rather than
## compute it repeatedly. The first function creates a CaheMatrix object
## and the second function computes and caches the inverse of a CacheMatrix
## object if it has not alre... |
#' Construct the System Matrices of a Explanatory Variables Component
#'
#' Constructs the system matrices of a explanatory variables component.
#'
#' @inheritParams GetSysMat
#' @inheritParams statespacer
#' @inheritParams StateSpaceEval
#' @inheritParams LocalLevel
#' @inheritParams Cholesky
#'
#' @return
... | /fuzzedpackages/statespacer/R/Components-Regressors.R | no_license | akhikolla/testpackages | R | false | false | 19,612 | r | #' Construct the System Matrices of a Explanatory Variables Component
#'
#' Constructs the system matrices of a explanatory variables component.
#'
#' @inheritParams GetSysMat
#' @inheritParams statespacer
#' @inheritParams StateSpaceEval
#' @inheritParams LocalLevel
#' @inheritParams Cholesky
#'
#' @return
... |
\name{ExportFile}
\alias{ExportFile}
\title{Export an object into a csv text file}
\description{
Saves a csv text file containing the object passed as argument.
}
\usage{
ExportFile(SAdata, filename, ...)
}
\arguments{
\item{...}{any argument to be passed to \code{write.table}}
\item{SAdata}{a \c... | /man/ExportFile.Rd | no_license | mbask/treeglia | R | false | false | 771 | rd | \name{ExportFile}
\alias{ExportFile}
\title{Export an object into a csv text file}
\description{
Saves a csv text file containing the object passed as argument.
}
\usage{
ExportFile(SAdata, filename, ...)
}
\arguments{
\item{...}{any argument to be passed to \code{write.table}}
\item{SAdata}{a \c... |
install.packages("ggplot2")
install.packages("gridExtra")
install.packages("lme4")
install.packages("GGally")
install.packages("AICcmodavg")
install.packages("interplot")
library(gridExtra)
library(lme4)
library(GGally)
library(ggplot2)
library(AICcmodavg)
library(interplot)
data<-read.csv("C:/Users/rebec... | /Ch2_LABO_HierarchicalTesting_20171201.R | no_license | rtrubitt/Trubitt_Thesis_Code | R | false | false | 4,038 | r | install.packages("ggplot2")
install.packages("gridExtra")
install.packages("lme4")
install.packages("GGally")
install.packages("AICcmodavg")
install.packages("interplot")
library(gridExtra)
library(lme4)
library(GGally)
library(ggplot2)
library(AICcmodavg)
library(interplot)
data<-read.csv("C:/Users/rebec... |
#' TensorFlow for R
#'
#' \href{https://www.tensorflow.org}{TensorFlow} is an open source software library
#' for numerical computation using data flow graphs. Nodes in the graph
#' represent mathematical operations, while the graph edges represent the
#' multidimensional data arrays (tensors) communicated between the... | /R/package.R | permissive | jsta/tensorflow | R | false | false | 7,359 | r |
#' TensorFlow for R
#'
#' \href{https://www.tensorflow.org}{TensorFlow} is an open source software library
#' for numerical computation using data flow graphs. Nodes in the graph
#' represent mathematical operations, while the graph edges represent the
#' multidimensional data arrays (tensors) communicated between the... |
pacman::p_load(plyr, dplyr, ggplot2)
clev.d <- read.csv("./course materials/class session materials/data/AllClevelandCrimeData.csv")
str(clev.d)
# How many types of crimes occur in Cleveland?
nlevels(clev.d$ReportedCharge)
# Wow, that's a lot, what are they?
levels(clev.d$ReportedCharge)
# Lots of similar... | /12_TimeSeriesCounts/TimeSeriesCount.R | no_license | lindstroje/IntroRangeR | R | false | false | 5,100 | r | pacman::p_load(plyr, dplyr, ggplot2)
clev.d <- read.csv("./course materials/class session materials/data/AllClevelandCrimeData.csv")
str(clev.d)
# How many types of crimes occur in Cleveland?
nlevels(clev.d$ReportedCharge)
# Wow, that's a lot, what are they?
levels(clev.d$ReportedCharge)
# Lots of similar... |
\name{integrateTrapezoid}
\alias{integrateTrapezoid}
\title{Use trapezoidal integration}
\description{Estimate the integral of one-dimensional function using the trapezoidal rule.}
\usage{integrateTrapezoid(x, y, type=c("A", "dA", "cA"))}
\arguments{
\item{x}{x values, or a single value that is taken as the (con... | /man/integrateTrapezoid.Rd | no_license | marie-geissler/oce | R | false | false | 1,595 | rd | \name{integrateTrapezoid}
\alias{integrateTrapezoid}
\title{Use trapezoidal integration}
\description{Estimate the integral of one-dimensional function using the trapezoidal rule.}
\usage{integrateTrapezoid(x, y, type=c("A", "dA", "cA"))}
\arguments{
\item{x}{x values, or a single value that is taken as the (con... |
#'Text summarization of the model results
#'
#'Summarize the model results
#'
#'@param modelReturn censReg model results
#'@param siteINFO dataframe including station name (station_nm) and siteID (site.no) (easiestly retrieved from dataRetrieval package)
#'@param saveOutput logical defaults to FALSE. Set to TRUE if an ... | /R/summaryPrintout.R | permissive | lhubbard-USGS/GSqwsr | R | false | false | 2,892 | r | #'Text summarization of the model results
#'
#'Summarize the model results
#'
#'@param modelReturn censReg model results
#'@param siteINFO dataframe including station name (station_nm) and siteID (site.no) (easiestly retrieved from dataRetrieval package)
#'@param saveOutput logical defaults to FALSE. Set to TRUE if an ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utilities.R
\name{aic.maxent}
\alias{aic.maxent}
\alias{calc.aicc}
\alias{get.params}
\title{Calculate AICc from Maxent model prediction}
\usage{
aic.maxent(p.occs, ncoefs, p = NULL)
}
\arguments{
\item{p.occs}{data frame: raw (maxent.jar) or... | /man/aic.maxent.Rd | no_license | andrepazv/ENMeval | R | false | true | 4,213 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utilities.R
\name{aic.maxent}
\alias{aic.maxent}
\alias{calc.aicc}
\alias{get.params}
\title{Calculate AICc from Maxent model prediction}
\usage{
aic.maxent(p.occs, ncoefs, p = NULL)
}
\arguments{
\item{p.occs}{data frame: raw (maxent.jar) or... |
library(ncdf4)
library(chron)
#reding file
open <-function(n) {
ncname <- paste("rf", n, "_1apr_30nov.nc", sep = "")
ncin <- nc_open(ncname)
#getting variables
lat <- ncvar_get(ncin, "lat")
lon <- ncvar_get(ncin, "lon")
t <- ncvar_get(ncin, "time")
nlon <- dim(lon)
nlat <- dim(lat)
nt <- dim(t)
tunits <- ncatt_get(n... | /ARIMA_Model_Rainfall/Guwahati/readncGAU.R | no_license | apoddar573/Indian_Monsoons | R | false | false | 1,726 | r | library(ncdf4)
library(chron)
#reding file
open <-function(n) {
ncname <- paste("rf", n, "_1apr_30nov.nc", sep = "")
ncin <- nc_open(ncname)
#getting variables
lat <- ncvar_get(ncin, "lat")
lon <- ncvar_get(ncin, "lon")
t <- ncvar_get(ncin, "time")
nlon <- dim(lon)
nlat <- dim(lat)
nt <- dim(t)
tunits <- ncatt_get(n... |
#:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "churn")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "class")
lrn =... | /models/openml_churn/classification_class/7752e908a381b547e6e8e1b00258024c/code.R | no_license | pysiakk/CaseStudies2019S | R | false | false | 745 | r | #:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "churn")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "class")
lrn =... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mictools.R
\name{mictools}
\alias{mictools}
\title{Function that implements the \code{mictools} pipeline.
In particular it computes the null and observed distribution of the \code{tic_e} measure}
\usage{
mictools(x, alpha = 9, C = 5, seed = 0... | /man/mictools.Rd | no_license | rsamantha/minerva | R | false | true | 3,528 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mictools.R
\name{mictools}
\alias{mictools}
\title{Function that implements the \code{mictools} pipeline.
In particular it computes the null and observed distribution of the \code{tic_e} measure}
\usage{
mictools(x, alpha = 9, C = 5, seed = 0... |
#' @title Monte-Carlo simulation test for SPDs
#'
#' @description Comparison of an observed summed radiocarbon date distribution (aka SPD) with simulated outcomes from a theoretical model
#'
#' @param x A vector of radiocarbon ages
#' @param errors A vector of errors corresponding to each radiocarbon age
#' @param n... | /R/tests.R | no_license | pmschauer/rcarbon | R | false | false | 35,767 | r |
#' @title Monte-Carlo simulation test for SPDs
#'
#' @description Comparison of an observed summed radiocarbon date distribution (aka SPD) with simulated outcomes from a theoretical model
#'
#' @param x A vector of radiocarbon ages
#' @param errors A vector of errors corresponding to each radiocarbon age
#' @param n... |
library(genoset)
library(BigMatrix)
library(CGPtools)
library(VariantTools)
source("~/svn/Packages/VariantTools/scripts/getAlleleByLocus_mod.R")
meta<-getCGPMetadata(JSON="http://research.gene.com/cgp/released.json")
## ds = readGenoSet("/gne/research/data/cgp/SNPArray.V4/illumina_2.5M.genoset.genotypes.and.raw.RData"... | /scripts/array_het.R | no_license | lawremi/VariantTools | R | false | false | 3,520 | r | library(genoset)
library(BigMatrix)
library(CGPtools)
library(VariantTools)
source("~/svn/Packages/VariantTools/scripts/getAlleleByLocus_mod.R")
meta<-getCGPMetadata(JSON="http://research.gene.com/cgp/released.json")
## ds = readGenoSet("/gne/research/data/cgp/SNPArray.V4/illumina_2.5M.genoset.genotypes.and.raw.RData"... |
#####
#calculate Pi, PiS, PiN for ama data
load('diversity_piNS_3.RData')
## load data.
haps = read.csv('ama_haps_seqs_demog_merged.csv')
haps = haps [,2:ncol(haps)]
## Get the sequences in a DNAStringSet.
seqs = names(haps)
seqs = seqs[nchar(seqs) > 100]
## Convert to another format.
library('Biostrings')
li... | /Figure S4/gen_diversity_AMA.R | no_license | codynelson08/MESAseq_compiled_code | R | false | false | 1,321 | r | #####
#calculate Pi, PiS, PiN for ama data
load('diversity_piNS_3.RData')
## load data.
haps = read.csv('ama_haps_seqs_demog_merged.csv')
haps = haps [,2:ncol(haps)]
## Get the sequences in a DNAStringSet.
seqs = names(haps)
seqs = seqs[nchar(seqs) > 100]
## Convert to another format.
library('Biostrings')
li... |
# Vancomycin Dose-Adjustment Regimen - Bayesian Optimised Dosing Regimen
# -----------------------------------------------------------------------------
# Takes induction dataset and changes the dosage after the time when the first
# blood sample would be taken. Uses empirical bayesian estimation to
# determine pa... | /scripts/190708_Vanc_Regimen_Bayes_PeakTrough.R | no_license | jhhughes256/vanc_tdm | R | false | false | 15,657 | r | # Vancomycin Dose-Adjustment Regimen - Bayesian Optimised Dosing Regimen
# -----------------------------------------------------------------------------
# Takes induction dataset and changes the dosage after the time when the first
# blood sample would be taken. Uses empirical bayesian estimation to
# determine pa... |
library(MetaboLouise)
### Name: NetworkCreateR
### Title: NetworkCreateR
### Aliases: NetworkCreateR
### ** Examples
Network <- NetworkCreateR(N = 50, BA_power = 0.5, BA_mValue = 4)
image(Network)
| /data/genthat_extracted_code/MetaboLouise/examples/NetworkCreateR.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 205 | r | library(MetaboLouise)
### Name: NetworkCreateR
### Title: NetworkCreateR
### Aliases: NetworkCreateR
### ** Examples
Network <- NetworkCreateR(N = 50, BA_power = 0.5, BA_mValue = 4)
image(Network)
|
### =========================================================================
### Some low-level (not exported) utility functions to operate on ordinary
### vectors (including lists and data frames)
### -------------------------------------------------------------------------
###
### Unless stated otherwise, nothing in... | /R/vector-utils.R | no_license | EugOT/S4Vectors | R | false | false | 9,101 | r | ### =========================================================================
### Some low-level (not exported) utility functions to operate on ordinary
### vectors (including lists and data frames)
### -------------------------------------------------------------------------
###
### Unless stated otherwise, nothing in... |
library(glmmEP)
### Name: summary.glmmEP
### Title: Inferential summary for a generalized linear mixed model with
### expectation propagation fitting.
### Aliases: summary.glmmEP
### ** Examples
dataObj <- glmmSimData(seed=54321)
y <- dataObj$y
Xfixed <- dataObj$Xfixed
Xrandom <- dataObj$Xrandom
idNum <- data... | /data/genthat_extracted_code/glmmEP/examples/summary.glmmEP.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 427 | r | library(glmmEP)
### Name: summary.glmmEP
### Title: Inferential summary for a generalized linear mixed model with
### expectation propagation fitting.
### Aliases: summary.glmmEP
### ** Examples
dataObj <- glmmSimData(seed=54321)
y <- dataObj$y
Xfixed <- dataObj$Xfixed
Xrandom <- dataObj$Xrandom
idNum <- data... |
library(lmSupport)
### Name: figAxis
### Title: Wrapper for standarized use of axis()
### Aliases: figAxis
### Keywords: graphic
### ** Examples
X = rep(2:9,4)+jitter(rep(0,32))
Y = X + rnorm(length(X),0,5)
m = lm(Y ~ X)
dNew = data.frame(X=seq(2,9,by=.01))
p = modelPredictions(m,dNew)
figNewDevice()
figPlotRegio... | /data/genthat_extracted_code/lmSupport/examples/figAxis.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 582 | r | library(lmSupport)
### Name: figAxis
### Title: Wrapper for standarized use of axis()
### Aliases: figAxis
### Keywords: graphic
### ** Examples
X = rep(2:9,4)+jitter(rep(0,32))
Y = X + rnorm(length(X),0,5)
m = lm(Y ~ X)
dNew = data.frame(X=seq(2,9,by=.01))
p = modelPredictions(m,dNew)
figNewDevice()
figPlotRegio... |
data=read.csv("https://raw.githubusercontent.com/yukefu/stat6289-project1/master/sleeping-alone-data-new.csv")
summary(data)
library(tidyr)
library(shiny)
library(ggplot2)
library(DT)
library(dplyr)
table1=round(prop.table(table(data$RelationshipStatus , data$HowOften)),4)
m1=matrix(nrow=36, ncol=5)
m1[,5]=rep("Relati... | /stat6289project1code.R | no_license | yukefu/stat6289-project1 | R | false | false | 9,057 | r | data=read.csv("https://raw.githubusercontent.com/yukefu/stat6289-project1/master/sleeping-alone-data-new.csv")
summary(data)
library(tidyr)
library(shiny)
library(ggplot2)
library(DT)
library(dplyr)
table1=round(prop.table(table(data$RelationshipStatus , data$HowOften)),4)
m1=matrix(nrow=36, ncol=5)
m1[,5]=rep("Relati... |
library(forecast)
library(readxl)
library(stargazer)
library(fpp)
library(fpp2)
library(scales)
library(quantmod)
library(urca)
library(vars)
library(tseries)
library(ggplot2)
library(dplyr)
library(TSA)
data <- read_excel("C:/Users/challasa/Documents/Shravya/OneDrive/IOWA/original.xlsx", sheet = 5)
data_dtp3 <- filt... | /Sample_test.R | no_license | nitinmittapally/vaccine-prioritzation | R | false | false | 2,277 | r | library(forecast)
library(readxl)
library(stargazer)
library(fpp)
library(fpp2)
library(scales)
library(quantmod)
library(urca)
library(vars)
library(tseries)
library(ggplot2)
library(dplyr)
library(TSA)
data <- read_excel("C:/Users/challasa/Documents/Shravya/OneDrive/IOWA/original.xlsx", sheet = 5)
data_dtp3 <- filt... |
## Put comments here that give an overall description of what your
## functions do
## Caching the Inverse of a Matrix
## Write a short comment describing this function
##This function makeCacheMatrix gets a matrix as an input, set the value of the matrix,
##get the value of the matrix, set the Inverse Matrix and get ... | /cachematrix.R | no_license | markliwag/ProgrammingAssignment2 | R | false | false | 2,181 | r | ## Put comments here that give an overall description of what your
## functions do
## Caching the Inverse of a Matrix
## Write a short comment describing this function
##This function makeCacheMatrix gets a matrix as an input, set the value of the matrix,
##get the value of the matrix, set the Inverse Matrix and get ... |
## ================================
## Recode a sequence object
## ================================
recodef <- function(x, recodes, otherwise=NULL, na=NULL){
prev_al <- levels(x)
used_al <- c(unlist(recodes), na)
## Seek for coding instruction not in previous levels
inexistant_al <- which(is.na(match(used_al, prev... | /R/seqrecode.R | no_license | cran/TraMineR | R | false | false | 3,332 | r | ## ================================
## Recode a sequence object
## ================================
recodef <- function(x, recodes, otherwise=NULL, na=NULL){
prev_al <- levels(x)
used_al <- c(unlist(recodes), na)
## Seek for coding instruction not in previous levels
inexistant_al <- which(is.na(match(used_al, prev... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/editTemplate.r
\name{editTemplate}
\alias{editTemplate}
\title{Edit 3D template}
\usage{
editTemplate(template, fixed, n)
}
\arguments{
\item{template}{Matrix of template 3D coordinates}
\item{fixed}{Number of "fixed" landmark points (non su... | /man/editTemplate.Rd | no_license | geomorphR/geomorph | R | false | true | 2,001 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/editTemplate.r
\name{editTemplate}
\alias{editTemplate}
\title{Edit 3D template}
\usage{
editTemplate(template, fixed, n)
}
\arguments{
\item{template}{Matrix of template 3D coordinates}
\item{fixed}{Number of "fixed" landmark points (non su... |
###
test.TPR <- function(conf.summary,aggregate = c("micro","macro")){
ag = match.arg(aggregate)
return(list("byClass" = 1-test.FNR(conf.summary,aggregate=aggregate)[[1]],
"aggregate" = 1-test.FNR(conf.summary,aggregate=aggregate)[[2]]))
}
# Tests an example using the exampleSignatures data:
... | /sqm/inst/tests/test.TPR.R | no_license | lhsego/sUtils | R | false | false | 1,834 | r | ###
test.TPR <- function(conf.summary,aggregate = c("micro","macro")){
ag = match.arg(aggregate)
return(list("byClass" = 1-test.FNR(conf.summary,aggregate=aggregate)[[1]],
"aggregate" = 1-test.FNR(conf.summary,aggregate=aggregate)[[2]]))
}
# Tests an example using the exampleSignatures data:
... |
library(asypow)
### Name: asypow.noncent
### Title: Asymptotic Noncentrality Parameter
### Aliases: asypow.noncent
### Keywords: htest
### ** Examples
# Three Sample Poisson Example :
# Three independent Poisson processes produce events at
# mean rates of 1, 2 and 3 per day.
# Find the information matrix
poi... | /data/genthat_extracted_code/asypow/examples/asypow.noncent.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 681 | r | library(asypow)
### Name: asypow.noncent
### Title: Asymptotic Noncentrality Parameter
### Aliases: asypow.noncent
### Keywords: htest
### ** Examples
# Three Sample Poisson Example :
# Three independent Poisson processes produce events at
# mean rates of 1, 2 and 3 per day.
# Find the information matrix
poi... |
context("Group by")
df <- data.frame(x = rep(1:3, each = 10), y = rep(1:6, each = 5))
test_that("group_by with .add = TRUE adds groups", {
add_groups1 <- function(tbl) group_by(tbl, x, y, .add = TRUE)
add_groups2 <- function(tbl) group_by(group_by(tbl, x, .add = TRUE), y, .add = TRUE)
expect_equal(group_vars(a... | /tests/testthat/test-group-by.r | permissive | mpaulacaldas/dplyr | R | false | false | 16,401 | r | context("Group by")
df <- data.frame(x = rep(1:3, each = 10), y = rep(1:6, each = 5))
test_that("group_by with .add = TRUE adds groups", {
add_groups1 <- function(tbl) group_by(tbl, x, y, .add = TRUE)
add_groups2 <- function(tbl) group_by(group_by(tbl, x, .add = TRUE), y, .add = TRUE)
expect_equal(group_vars(a... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hello_function.R
\name{hello_function}
\alias{hello_function}
\title{Say hello to my little function}
\usage{
hello_function(name)
}
\arguments{
\item{name}{character}
}
\value{
character
}
\description{
This function says hello.
}
\examples{... | /man/hello_function.Rd | permissive | nayefahmad/foofactors2 | R | false | true | 358 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/hello_function.R
\name{hello_function}
\alias{hello_function}
\title{Say hello to my little function}
\usage{
hello_function(name)
}
\arguments{
\item{name}{character}
}
\value{
character
}
\description{
This function says hello.
}
\examples{... |
## -------------------------------------------------
## FIGURE HABITAT SELECTION ANALISIS 1
## -------------------------------------------------
rm(list=ls())
library(dplyr)
setwd("D:/PhD/Fourth chapter/Results/RSF_habitatsel3/othersec_bootstrap_IDyear")
p1 <- read.csv("RSF.results.pre.othersec.IDyear.csv... | /Ch. 4/Results/Fig_habselection1.r | no_license | anasanz/MyScripts | R | false | false | 7,731 | r |
## -------------------------------------------------
## FIGURE HABITAT SELECTION ANALISIS 1
## -------------------------------------------------
rm(list=ls())
library(dplyr)
setwd("D:/PhD/Fourth chapter/Results/RSF_habitatsel3/othersec_bootstrap_IDyear")
p1 <- read.csv("RSF.results.pre.othersec.IDyear.csv... |
context("events")
test_that("change variables", {
target_r <- function(t, y, p) {
-y * p
}
event_r <- function(t, y, p) {
y * 2
}
target_c <- "exponential"
event_c <- "double_variables"
dllname <- "dde_growth"
set.seed(1)
y0 <- runif(5)
p <- rep(1, length(y0))
tol <- 1e-8
tt <- seq(0, ... | /tests/testthat/test-events.R | permissive | mrc-ide/dde | R | false | false | 10,982 | r | context("events")
test_that("change variables", {
target_r <- function(t, y, p) {
-y * p
}
event_r <- function(t, y, p) {
y * 2
}
target_c <- "exponential"
event_c <- "double_variables"
dllname <- "dde_growth"
set.seed(1)
y0 <- runif(5)
p <- rep(1, length(y0))
tol <- 1e-8
tt <- seq(0, ... |
library(ggplot2)
library(caTools)
library(randomForest)
library(dplyr)
df <- read.csv("FinalSEERDatasetForMinor.csv",stringsAsFactors = FALSE)
df$Status <- as.factor(df$Status)
#TRAIN-TEST SPLIT
set.seed(101)
sample <- sample.split(df$Status,SplitRatio = 0.95)
train <- subset(df,sample == T)
test <- subse... | /RandomForestSEER.R | no_license | Kaustubh789/Breast-Caner-Patient-Survival-Prediction- | R | false | false | 523 | r | library(ggplot2)
library(caTools)
library(randomForest)
library(dplyr)
df <- read.csv("FinalSEERDatasetForMinor.csv",stringsAsFactors = FALSE)
df$Status <- as.factor(df$Status)
#TRAIN-TEST SPLIT
set.seed(101)
sample <- sample.split(df$Status,SplitRatio = 0.95)
train <- subset(df,sample == T)
test <- subse... |
# TODO: Add comment
#
# Author: claudio
###############################################################################
pdf(file="grafici/densitaStudent.pdf")
x <- seq(-4,4,length.out = 100)
y1 <- dt(x,df=2)
y2 <- dt(x,df=5)
y3 <-dnorm(x)
plot(x,y3,xlab="x",ylab=expression(f(x)),type="l",col="red",lwd=2)
lines(x... | /codiceR/densitaStudent.R | no_license | tega/grafici-stat2 | R | false | false | 539 | r | # TODO: Add comment
#
# Author: claudio
###############################################################################
pdf(file="grafici/densitaStudent.pdf")
x <- seq(-4,4,length.out = 100)
y1 <- dt(x,df=2)
y2 <- dt(x,df=5)
y3 <-dnorm(x)
plot(x,y3,xlab="x",ylab=expression(f(x)),type="l",col="red",lwd=2)
lines(x... |
\name{plotd}
\alias{plotd}
\title{Plot the distribution of predictions for each class}
\description{
Plot the distribution of the predicted values for each class.
Can be used for \code{\link[earth]{earth}} models, but also for models built by
\code{\link{lm}},
\code{\link{glm}},
\code{\link[MASS]{lda}},
etc.
}
\usage{
... | /man/plotd.Rd | no_license | cran/earth | R | false | false | 13,890 | rd | \name{plotd}
\alias{plotd}
\title{Plot the distribution of predictions for each class}
\description{
Plot the distribution of the predicted values for each class.
Can be used for \code{\link[earth]{earth}} models, but also for models built by
\code{\link{lm}},
\code{\link{glm}},
\code{\link[MASS]{lda}},
etc.
}
\usage{
... |
#Library
library(ggplot2)
#mtcars data
head(mtcars)
# First type of color
png("#95_Violin_plot_ggplot2_1.png" , width = 480, height = 480 )
p <- ggplot(mtcars, aes(factor(cyl), mpg))
p + geom_violin(aes(fill = cyl))
dev.off()
# Second type
png("#95_Violin_plot_ggplot2_2.png" , width = 480, height = 480 )
p <- ggplo... | /OLD_GALLERY_RSCRIPT/#95_Violin_plot_ggplot2.R | permissive | holtzy/R-graph-gallery | R | false | false | 405 | r |
#Library
library(ggplot2)
#mtcars data
head(mtcars)
# First type of color
png("#95_Violin_plot_ggplot2_1.png" , width = 480, height = 480 )
p <- ggplot(mtcars, aes(factor(cyl), mpg))
p + geom_violin(aes(fill = cyl))
dev.off()
# Second type
png("#95_Violin_plot_ggplot2_2.png" , width = 480, height = 480 )
p <- ggplo... |
# Define server logic required to draw a bar
shinyServer(function(input, output) {
output$barplot <- renderPlot({
# create plot from filtered data
colnames(data)<-c('state','CountofPrescriptions','TotalPrescribers')
if(input$y=='CountofPrescriptions') {
title_var='Count of Opioid... | /pareto/stateLevel/server.R | no_license | asidamo/Amanuel_DQ5_Shiny | R | false | false | 882 | r |
# Define server logic required to draw a bar
shinyServer(function(input, output) {
output$barplot <- renderPlot({
# create plot from filtered data
colnames(data)<-c('state','CountofPrescriptions','TotalPrescribers')
if(input$y=='CountofPrescriptions') {
title_var='Count of Opioid... |
# Taking sample data
data1<-"http://rci.rutgers.edu/~rwomack/UNRATE.csv"
data2<-"http://rci.rutgers.edu/~rwomack/CPIAUCSL.csv"
#load sample data
data<-read.csv(data1, row.names=1)
#data$VALUE
#Monthly Transactions
tsDataMonthly <- ts(data$VALUE, start=c(1948,1), frequency = 12)
#tsDataMonthly
plot(tsDataMo... | /FFC.Framework/TestConsole/Scripts/R/FFC.R | no_license | ashenfern/FFCF | R | false | false | 1,379 | r | # Taking sample data
data1<-"http://rci.rutgers.edu/~rwomack/UNRATE.csv"
data2<-"http://rci.rutgers.edu/~rwomack/CPIAUCSL.csv"
#load sample data
data<-read.csv(data1, row.names=1)
#data$VALUE
#Monthly Transactions
tsDataMonthly <- ts(data$VALUE, start=c(1948,1), frequency = 12)
#tsDataMonthly
plot(tsDataMo... |
#' Mutation enrichment analysis
#'
#' Conduct the mutation mapping analysis based on protein 3D structures
#'
#' @param gene0 A gene systematic name
#' @param SNPlist0 A SNP list for the strains from specific phenotype
#' @param gene_annotation0 The gene annotation summary
#' @param pdb The dir store the residue distan... | /R/clumps_analysis.R | permissive | hongzhonglu/Yeastspot3D | R | false | false | 4,070 | r | #' Mutation enrichment analysis
#'
#' Conduct the mutation mapping analysis based on protein 3D structures
#'
#' @param gene0 A gene systematic name
#' @param SNPlist0 A SNP list for the strains from specific phenotype
#' @param gene_annotation0 The gene annotation summary
#' @param pdb The dir store the residue distan... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plots.R
\name{plot_densities}
\alias{plot_densities}
\alias{plot.densities}
\title{Plot probability density and data}
\usage{
plot_densities(density.plot_inputs, outdir, ...)
}
\arguments{
\item{density.plot_inputs}{list containing trait.samp... | /modules/priors/man/plot_densities.Rd | permissive | PecanProject/pecan | R | false | true | 579 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plots.R
\name{plot_densities}
\alias{plot_densities}
\alias{plot.densities}
\title{Plot probability density and data}
\usage{
plot_densities(density.plot_inputs, outdir, ...)
}
\arguments{
\item{density.plot_inputs}{list containing trait.samp... |
testlist <- list(a = 0L, b = 0L, x = c(437918234L, 437918234L, 437918234L, 437918234L, 437918234L, 437918234L, 452984831L, -16777216L, 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:::anyOutside,testlist)
str(result) | /grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610387379-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 307 | r | testlist <- list(a = 0L, b = 0L, x = c(437918234L, 437918234L, 437918234L, 437918234L, 437918234L, 437918234L, 452984831L, -16777216L, 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:::anyOutside,testlist)
str(result) |
test_that("inputs are checked when creating AuthState", {
client <- gargle_oauth_client(id = "CLIENT_ID", secret = "SECRET")
expect_snapshot(
init_AuthState(
package = NULL,
client = client,
api_key = "API_KEY",
auth_active = TRUE
),
error = TRUE
)
expect_snapshot(init_AuthS... | /tests/testthat/test-AuthState-class.R | permissive | r-lib/gargle | R | false | false | 4,326 | r | test_that("inputs are checked when creating AuthState", {
client <- gargle_oauth_client(id = "CLIENT_ID", secret = "SECRET")
expect_snapshot(
init_AuthState(
package = NULL,
client = client,
api_key = "API_KEY",
auth_active = TRUE
),
error = TRUE
)
expect_snapshot(init_AuthS... |
\name{import_sintax_file}
\alias{import_sintax_file}
\title{
Import sintax Taxonomy File
}
\description{
Converts the tab-delimited output of USEARCH's (version 9+) sintax command to a phyloseq tax_table object. The confidence level for taxonomic assignment is chosen on import.
}
\usage{
import_sintax_file(in_file, co... | /man/import_sintax_file.Rd | no_license | jfq3/RDPutils | R | false | false | 1,187 | rd | \name{import_sintax_file}
\alias{import_sintax_file}
\title{
Import sintax Taxonomy File
}
\description{
Converts the tab-delimited output of USEARCH's (version 9+) sintax command to a phyloseq tax_table object. The confidence level for taxonomic assignment is chosen on import.
}
\usage{
import_sintax_file(in_file, co... |
\alias{gtkCTreeNodeSetShift}
\name{gtkCTreeNodeSetShift}
\title{gtkCTreeNodeSetShift}
\description{
Shift the given cell the given amounts in pixels.
\strong{WARNING: \code{gtk_ctree_node_set_shift} is deprecated and should not be used in newly-written code.}
}
\usage{gtkCTreeNodeSetShift(object, node, column, vertical... | /RGtk2/man/gtkCTreeNodeSetShift.Rd | no_license | lawremi/RGtk2 | R | false | false | 639 | rd | \alias{gtkCTreeNodeSetShift}
\name{gtkCTreeNodeSetShift}
\title{gtkCTreeNodeSetShift}
\description{
Shift the given cell the given amounts in pixels.
\strong{WARNING: \code{gtk_ctree_node_set_shift} is deprecated and should not be used in newly-written code.}
}
\usage{gtkCTreeNodeSetShift(object, node, column, vertical... |
# file contains only helper html headers/styles for the frontend off the app.
get_html_head <- function() {
tags$head(
tags$link(rel="stylesheet",
href="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/katex.min.css",
integrity="sha384-dbVIfZGuN1Yq7/1Ocstc1lUEm+AT+/rCkibIcC/OmWo5f0EA48Vf8Cy... | /html_helpers.R | no_license | storaged/VAP-SIRS | R | false | false | 3,455 | r | # file contains only helper html headers/styles for the frontend off the app.
get_html_head <- function() {
tags$head(
tags$link(rel="stylesheet",
href="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/katex.min.css",
integrity="sha384-dbVIfZGuN1Yq7/1Ocstc1lUEm+AT+/rCkibIcC/OmWo5f0EA48Vf8Cy... |
#
# Copyright 2007-2018 The OpenMx Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... | /SilveR/R-3.5.1/library/OpenMx/demo/GrowthMixtureModel_PathRaw.R | permissive | kevinmiles/SilveR | R | false | false | 4,699 | r | #
# Copyright 2007-2018 The OpenMx Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/transformation_functions.R
\name{Gamma2Theta}
\alias{Gamma2Theta}
\title{Transformation of \eGamma matrix to \eTheta matrix}
\usage{
Gamma2Theta(Gamma, k = NULL)
}
\arguments{
\item{Gamma}{Numeric \dxd variogram matrix.}
\item{k}{\code{NULL}... | /man/Gamma2Theta.Rd | no_license | sebastian-engelke/graphicalExtremes | R | false | true | 1,396 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/transformation_functions.R
\name{Gamma2Theta}
\alias{Gamma2Theta}
\title{Transformation of \eGamma matrix to \eTheta matrix}
\usage{
Gamma2Theta(Gamma, k = NULL)
}
\arguments{
\item{Gamma}{Numeric \dxd variogram matrix.}
\item{k}{\code{NULL}... |
## Return an inverse of an invertable matrix
## Initializes a matrix object that can cache the calculated inverse of the matrix
makeCacheMatrix <- function(x = matrix()) {
m_inverse <- NULL
setCache <- function(y){
x <<- y
m_inverse <<- NULL
}
get_matrix <- function() x
set_inverse <- function(inver... | /cachematrix.R | no_license | marineatami/ProgrammingAssignment2 | R | false | false | 935 | r | ## Return an inverse of an invertable matrix
## Initializes a matrix object that can cache the calculated inverse of the matrix
makeCacheMatrix <- function(x = matrix()) {
m_inverse <- NULL
setCache <- function(y){
x <<- y
m_inverse <<- NULL
}
get_matrix <- function() x
set_inverse <- function(inver... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/analytics_functions.R
\name{management.customDimensions.get}
\alias{management.customDimensions.get}
\title{Get a custom dimension to which the user has access.}
\usage{
management.customDimensions.get(accountId, webPropertyId, customDimensio... | /googleanalyticsv3.auto/man/management.customDimensions.get.Rd | permissive | Phippsy/autoGoogleAPI | R | false | true | 1,168 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/analytics_functions.R
\name{management.customDimensions.get}
\alias{management.customDimensions.get}
\title{Get a custom dimension to which the user has access.}
\usage{
management.customDimensions.get(accountId, webPropertyId, customDimensio... |
library(reliaR)
### Name: InvGenExpEsurvival
### Title: Survival related functions for the Inverse Generalized
### Exponential(IGE) distribution
### Aliases: InvGenExpsurvival crf.inv.genexp hinv.genexp hra.inv.genexp
### sinv.genexp
### Keywords: survival
### ** Examples
## load data set
data(repairtimes)
## M... | /data/genthat_extracted_code/reliaR/examples/InvGenExpEsurvival.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 981 | r | library(reliaR)
### Name: InvGenExpEsurvival
### Title: Survival related functions for the Inverse Generalized
### Exponential(IGE) distribution
### Aliases: InvGenExpsurvival crf.inv.genexp hinv.genexp hra.inv.genexp
### sinv.genexp
### Keywords: survival
### ** Examples
## load data set
data(repairtimes)
## M... |
### lme4
#' @importFrom lmerTest lmer
#' @export
lmerTest::lmer
| /R/reexport.R | no_license | cran/afex | R | false | false | 74 | r | ### lme4
#' @importFrom lmerTest lmer
#' @export
lmerTest::lmer
|
## ----setup, include=FALSE------------------------------------------------
library(knitr)
opts_chunk$set(fig.width=7, fig.height=5, comment="")
library(BrailleR)
## ----hist, fig.cap="A histogram of 1000 random values from a normal distribution"----
x=rnorm(1000)
VI(hist(x))
## ----BrailleRHistExample------... | /data/genthat_extracted_code/BrailleR/vignettes/Ex1histograms.R | no_license | surayaaramli/typeRrh | R | false | false | 382 | r | ## ----setup, include=FALSE------------------------------------------------
library(knitr)
opts_chunk$set(fig.width=7, fig.height=5, comment="")
library(BrailleR)
## ----hist, fig.cap="A histogram of 1000 random values from a normal distribution"----
x=rnorm(1000)
VI(hist(x))
## ----BrailleRHistExample------... |
library(sf)
########################################################################################################################
#
# date version auteur commentaire
# 2016/08/09 0.0.5 Francois Semecurbe
# 2016/08/11 0.0.7 Francois Semecurbe ... | /R/kernelSmoothing.R | no_license | PsarAU/btb | R | false | false | 14,072 | r | library(sf)
########################################################################################################################
#
# date version auteur commentaire
# 2016/08/09 0.0.5 Francois Semecurbe
# 2016/08/11 0.0.7 Francois Semecurbe ... |
#' Rewrite a list of clauses to a string containing a Boolean formula in disjunctive normal form
#'
#' @param dnf list of clauses
#' @return string containing a Boolean formula in disjunctive normal form
format_dnf <- function(dnf) {
return(Reduce(function(x, y) {paste(x, y, sep = " + ")}, dnf))
}
#' Plot fuzzy set... | /R/xyplot.R | no_license | cran/QCAtools | R | false | false | 2,435 | r | #' Rewrite a list of clauses to a string containing a Boolean formula in disjunctive normal form
#'
#' @param dnf list of clauses
#' @return string containing a Boolean formula in disjunctive normal form
format_dnf <- function(dnf) {
return(Reduce(function(x, y) {paste(x, y, sep = " + ")}, dnf))
}
#' Plot fuzzy set... |
#factors
(gender = sample(c('M','F'), size = 20, replace = T))
summary(gender)
genderF = factor(gender)
summary(genderF)
genderF
(likscale = sample(c('Ex', 'Good', 'Sat', 'Poor'), size = 20, replace = T))
summary(likscale)
class(likscale)
likscaleF = factor(likscale)
summary(likscaleF)
class(likscaleF)
likscaleOF = f... | /factor.R | no_license | aiyyomacha/analytics1 | R | false | false | 543 | r | #factors
(gender = sample(c('M','F'), size = 20, replace = T))
summary(gender)
genderF = factor(gender)
summary(genderF)
genderF
(likscale = sample(c('Ex', 'Good', 'Sat', 'Poor'), size = 20, replace = T))
summary(likscale)
class(likscale)
likscaleF = factor(likscale)
summary(likscaleF)
class(likscaleF)
likscaleOF = f... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/internal_network_plot.R
\name{internal_network_plot}
\alias{internal_network_plot}
\title{Plot Internal Network Breadth and Size as a scatter plot}
\usage{
internal_network_plot(
data,
hrvar = "Organization",
mingroup = 5,
return = "p... | /man/internal_network_plot.Rd | permissive | Global19/wpa | R | false | true | 1,265 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/internal_network_plot.R
\name{internal_network_plot}
\alias{internal_network_plot}
\title{Plot Internal Network Breadth and Size as a scatter plot}
\usage{
internal_network_plot(
data,
hrvar = "Organization",
mingroup = 5,
return = "p... |
testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554... | /DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615831685-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 2,048 | r | testlist <- list(Beta = 0, CVLinf = 86341236051411296, FM = 1.53632495265886e-311, L50 = 0, L95 = 0, LenBins = c(2.0975686864138e+162, -2.68131210337361e-144, -1.11215735981244e+199, -4.48649879577108e+143, 1.6611802228813e+218, 900371.947279558, 1.07063092954708e+238, 2.88003257377011e-142, 1.29554... |
read_ply <-
function(filename){ # In-progress function to read ply files and convert to auto3dgm data
file = suppressWarnings(read.table(filename, sep="" , stringsAsFactors=F, fill=T, colClasses = rep('character',4) ) )
# Check for valid ASCII PLY file
if(file[1,1] != "ply"){stop("Not a valid ASCII PLY file")}... | /R/read_ply.R | no_license | NBStephens/auto3dgm-fork | R | false | false | 910 | r | read_ply <-
function(filename){ # In-progress function to read ply files and convert to auto3dgm data
file = suppressWarnings(read.table(filename, sep="" , stringsAsFactors=F, fill=T, colClasses = rep('character',4) ) )
# Check for valid ASCII PLY file
if(file[1,1] != "ply"){stop("Not a valid ASCII PLY file")}... |
\name{noice}
\alias{noice}
\title{Prints a call object nicely}
\description{Prints a \code{call}-mode object nicely, with one argument per line. This is useful, for example, in displaying readably the outcomes of \code{sys.call()}, which is often used to create a \code{call} attribute for the results of complicated ... | /man/noice.Rd | no_license | cran/mvbutils | R | false | false | 2,315 | rd | \name{noice}
\alias{noice}
\title{Prints a call object nicely}
\description{Prints a \code{call}-mode object nicely, with one argument per line. This is useful, for example, in displaying readably the outcomes of \code{sys.call()}, which is often used to create a \code{call} attribute for the results of complicated ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spatialdatatable.R
\name{setSDT}
\alias{setSDT}
\title{Set SDT}
\usage{
setSDT(x, polyline_column = NULL, ...)
}
\description{
creates a spatial.data.table object
}
| /man/setSDT.Rd | no_license | jimsforks/spatialdatatable | R | false | true | 243 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spatialdatatable.R
\name{setSDT}
\alias{setSDT}
\title{Set SDT}
\usage{
setSDT(x, polyline_column = NULL, ...)
}
\description{
creates a spatial.data.table object
}
|
## Simulation Examples used in the paper
# Example 1
model1 <- function(N, p, family, a, b, c){
active <- 1:8
Sigma <- diag(p)
x <- rmvexp(n = N, p = p, rate = rep(1, p), corr = Sigma); x <- x-1
true_beta <- rep(0, length = p)
B <- rbinom(8, 1, 0.4)
true_beta[1:8] <- a*((-1)^B)*(4*log(N)/sqrt(N) + ... | /R/Simulation_examples.R | no_license | AlexPijyan/STEPWISE | R | false | false | 9,450 | r | ## Simulation Examples used in the paper
# Example 1
model1 <- function(N, p, family, a, b, c){
active <- 1:8
Sigma <- diag(p)
x <- rmvexp(n = N, p = p, rate = rep(1, p), corr = Sigma); x <- x-1
true_beta <- rep(0, length = p)
B <- rbinom(8, 1, 0.4)
true_beta[1:8] <- a*((-1)^B)*(4*log(N)/sqrt(N) + ... |
#Data file is renamed as w1EDA.txt and it must be in the current working directory
data <- read.table("w1EDA.txt", header = TRUE, sep = ";")
data1 <- subset(data, Date == "1/2/2007" | Date == "2/2/2007")
data1$Date <- as.Date(data1$Date, format="%d/%m/%Y")
data1$Global_active_power <- as.numeric(data1$Global_active_p... | /plot1.R | no_license | hammadpatel/ExData_Plotting1 | R | false | false | 530 | r |
#Data file is renamed as w1EDA.txt and it must be in the current working directory
data <- read.table("w1EDA.txt", header = TRUE, sep = ";")
data1 <- subset(data, Date == "1/2/2007" | Date == "2/2/2007")
data1$Date <- as.Date(data1$Date, format="%d/%m/%Y")
data1$Global_active_power <- as.numeric(data1$Global_active_p... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/games_functions.R
\name{turnBasedMatches.dismiss}
\alias{turnBasedMatches.dismiss}
\title{Dismiss a turn-based match from the match list. The match will no longer show up in the list and will not generate notifications.}
\usage{
turnBasedMatc... | /googlegamesv1.auto/man/turnBasedMatches.dismiss.Rd | permissive | Phippsy/autoGoogleAPI | R | false | true | 1,063 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/games_functions.R
\name{turnBasedMatches.dismiss}
\alias{turnBasedMatches.dismiss}
\title{Dismiss a turn-based match from the match list. The match will no longer show up in the list and will not generate notifications.}
\usage{
turnBasedMatc... |
\name{linearKinhom}
\alias{linearKinhom}
\title{
Inhomogeneous Linear K Function
}
\description{
Computes an estimate of the inhomogeneous linear \eqn{K} function
for a point pattern on a linear network.
}
\usage{
linearKinhom(X, lambda=NULL, r=NULL, ..., correction="Ang",
normalise=TRUE, normpower=1... | /man/linearKinhom.Rd | no_license | wdeback/spatstat | R | false | false | 5,740 | rd | \name{linearKinhom}
\alias{linearKinhom}
\title{
Inhomogeneous Linear K Function
}
\description{
Computes an estimate of the inhomogeneous linear \eqn{K} function
for a point pattern on a linear network.
}
\usage{
linearKinhom(X, lambda=NULL, r=NULL, ..., correction="Ang",
normalise=TRUE, normpower=1... |
Boston <- read.csv("Boston.csv")
#Scaling data for KNN
#scaledData <- scale(Boston)
library( ggplot2 )
library(corrplot)
library(caTools)
library(gridExtra)
library(ROCR)
library ( rpart )
library ( rpart.plot )
Boston [ , "X" ] = list ( NULL )
str(Boston)
#check optimasisasi cluster using kmeans
#Unused
kmax <- 1... | /chasCluster.R | no_license | pribadi1st/Boston_R | R | false | false | 4,693 | r | Boston <- read.csv("Boston.csv")
#Scaling data for KNN
#scaledData <- scale(Boston)
library( ggplot2 )
library(corrplot)
library(caTools)
library(gridExtra)
library(ROCR)
library ( rpart )
library ( rpart.plot )
Boston [ , "X" ] = list ( NULL )
str(Boston)
#check optimasisasi cluster using kmeans
#Unused
kmax <- 1... |
<<<<<<< HEAD
##August 15, 2018
## R Programming Course Week 3 Programming Assignment
## Write function that calculates the inverse of a matrix or gets the cached value if already calculated
##makeCacheMatrix is a function that is a list of functions that set the value of a matrix, get hte value of the matrix, se... | /cachematrix.R | no_license | angelamhkim/ProgrammingAssignment2 | R | false | false | 1,437 | r | <<<<<<< HEAD
##August 15, 2018
## R Programming Course Week 3 Programming Assignment
## Write function that calculates the inverse of a matrix or gets the cached value if already calculated
##makeCacheMatrix is a function that is a list of functions that set the value of a matrix, get hte value of the matrix, se... |
library(readxl)
library(ggplot2)
library(dplyr)
options(max.print = 10000)
orig_list <- data.frame(readxl::read_excel("R/datasets/Titanic/titanic3_assignment.xls"))
plist <- orig_list
plist$survived <- as.factor(plist$survived)
plist <- plist %>% mutate(survived = ifelse(survived == 0, FALSE, TRUE))
summary(plist)
... | /Iyer19230456-Assignment-5 - Copy.R | no_license | sbharath82/R--Programming-in-DA-_-NUIG | R | false | false | 5,684 | r | library(readxl)
library(ggplot2)
library(dplyr)
options(max.print = 10000)
orig_list <- data.frame(readxl::read_excel("R/datasets/Titanic/titanic3_assignment.xls"))
plist <- orig_list
plist$survived <- as.factor(plist$survived)
plist <- plist %>% mutate(survived = ifelse(survived == 0, FALSE, TRUE))
summary(plist)
... |
# https://towardsdatascience.com/modelling-binary-logistic-regression-using-tidymodels-library-in-r-part-1-c1bdce0ac055
library(tidymodels)
library(tidyverse)
dataset <- read_csv('https://raw.githubusercontent.com/stringfestdata/stringfest-resource-library/main/datasets/contestants.csv') %>%
mutate_if(is.numeric... | /dev/logistic-regression.R | no_license | stringfestdata/satrday-r-power-bi | R | false | false | 1,022 | r | # https://towardsdatascience.com/modelling-binary-logistic-regression-using-tidymodels-library-in-r-part-1-c1bdce0ac055
library(tidymodels)
library(tidyverse)
dataset <- read_csv('https://raw.githubusercontent.com/stringfestdata/stringfest-resource-library/main/datasets/contestants.csv') %>%
mutate_if(is.numeric... |
.selfZip <- function (x, f, ...)
mapply(f,
x[-length(x)],
x[-1],
MoreArgs=list(...),
SIMPLIFY=FALSE)
.islandSplitDiscrete <- function (x) {
if (sum(x) == 0) {
return(c())
} else {
nums <- c(x, 0, 0)
sign.diffs <- diff(sign(diff(nums)))
... | /R/hs_ranges.R | permissive | nucleosome-dynamics/NucDyn | R | false | false | 2,983 | r | .selfZip <- function (x, f, ...)
mapply(f,
x[-length(x)],
x[-1],
MoreArgs=list(...),
SIMPLIFY=FALSE)
.islandSplitDiscrete <- function (x) {
if (sum(x) == 0) {
return(c())
} else {
nums <- c(x, 0, 0)
sign.diffs <- diff(sign(diff(nums)))
... |
testlist <- list(hi = 0, lo = 2.76941525057495e-313, mu = 0, sig = 0)
result <- do.call(gjam:::tnormRcpp,testlist)
str(result) | /gjam/inst/testfiles/tnormRcpp/libFuzzer_tnormRcpp/tnormRcpp_valgrind_files/1610044336-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 126 | r | testlist <- list(hi = 0, lo = 2.76941525057495e-313, mu = 0, sig = 0)
result <- do.call(gjam:::tnormRcpp,testlist)
str(result) |
library(alocv)
library(rbenchmark)
N = c(300, 500, 1000, 2500, 5000, 10000)
P = c(100, 800, 1200, 2000, 2500, 10000)
K = c(60, 500, 800, 1200, 2000, 2500)
tune_param = 10^seq(-2, -1, length.out = 25)
a = 0.5
m = length(N)
bmk = data.frame()
for(i in 1:m) {
n = N[i]
p = P[i]
k = K[i]
true_be... | /R/time_simple.R | permissive | Francis-Hsu/Summer-ALO | R | false | false | 1,582 | r | library(alocv)
library(rbenchmark)
N = c(300, 500, 1000, 2500, 5000, 10000)
P = c(100, 800, 1200, 2000, 2500, 10000)
K = c(60, 500, 800, 1200, 2000, 2500)
tune_param = 10^seq(-2, -1, length.out = 25)
a = 0.5
m = length(N)
bmk = data.frame()
for(i in 1:m) {
n = N[i]
p = P[i]
k = K[i]
true_be... |
##This assignment is to write a pair of functions that cache the inverse of a matrix.
##This function creates a special matrix object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setinverse <- function(s... | /cachematrix.R | no_license | tpraturi/ProgrammingAssignment2 | R | false | false | 976 | r | ##This assignment is to write a pair of functions that cache the inverse of a matrix.
##This function creates a special matrix object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setinverse <- function(s... |
#################################################
##############this is an example#################
#################################################
rm(list=ls(all=TRUE))
library(maxLik)
library(rgl)
library(reshape)
source("https://raw.githubusercontent.com/abc1m2x3c/DorfmanGroupTesting/master/src.R")
#input the da... | /Example_of_realdata.R | no_license | abc1m2x3c/DorfmanGroupTesting | R | false | false | 1,434 | r | #################################################
##############this is an example#################
#################################################
rm(list=ls(all=TRUE))
library(maxLik)
library(rgl)
library(reshape)
source("https://raw.githubusercontent.com/abc1m2x3c/DorfmanGroupTesting/master/src.R")
#input the da... |
library(gdsfmt)
library(SeqArray)
file.create("sample.txt")
output <- file("sample.txt")
open(output, "w")
f <- seqOpen("hapmap_r23a.gds")
sampleID = seqGetData(f, "sample.id")
returnData <- function(data) {
chrom = data[[1]]
pos = data[[2]]
alleles <- c(strsplit(data[[3]][1], ",")[[1]], ".")
... | /RlineScriptV3.R | no_license | The-Jacob-Lopez/fileConverter | R | false | false | 1,333 | r | library(gdsfmt)
library(SeqArray)
file.create("sample.txt")
output <- file("sample.txt")
open(output, "w")
f <- seqOpen("hapmap_r23a.gds")
sampleID = seqGetData(f, "sample.id")
returnData <- function(data) {
chrom = data[[1]]
pos = data[[2]]
alleles <- c(strsplit(data[[3]][1], ",")[[1]], ".")
... |
## A pair of functions that cache the inverse of a matrix.
## This function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
inv<- NULL
set <- function(y){
x <<- y
inv <<- NULL
}
get <- function() x
setInverse <- function(solveMatr... | /cachematrix.R | no_license | sunali-sunil/ProgrammingAssignment2 | R | false | false | 823 | r | ## A pair of functions that cache the inverse of a matrix.
## This function creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
inv<- NULL
set <- function(y){
x <<- y
inv <<- NULL
}
get <- function() x
setInverse <- function(solveMatr... |
wd <- "C:/Users/jsardinha/Documents/GitHub/EPAExploratoryAnalysis"
setwd(wd)
####
# File Name: plot2.R
# Written By: Jovan Sardinha
# Created On: May 25, 2014
# Email: jovan.sardinha@gmail.com
# Operating System: Windows 7 (32 bit)
# R Version: R version 3.1.0 (2014-04-10)
# Packages Installed
install.packages("ply... | /plot2.R | no_license | jovsa/EPA-exploratory-analysis | R | false | false | 1,580 | r | wd <- "C:/Users/jsardinha/Documents/GitHub/EPAExploratoryAnalysis"
setwd(wd)
####
# File Name: plot2.R
# Written By: Jovan Sardinha
# Created On: May 25, 2014
# Email: jovan.sardinha@gmail.com
# Operating System: Windows 7 (32 bit)
# R Version: R version 3.1.0 (2014-04-10)
# Packages Installed
install.packages("ply... |
# some useful xaringan tips
.pull-left[
```{r plot_2, fig.show='hide'}
```
]
.pull-right[
```{r ref.label = 'plot_2', echo=F, fig.height=7}
```
]
<iframe src="3dreg.html" width="120%" height="90%" frameBorder="0"></iframe>
library(sjPlot)
library(sjmisc)
library(sjlabelled)
# reference list at the very end
#... | /code/xaringan_tips.R | no_license | Lingbing/intro_econR | R | false | false | 487 | r | # some useful xaringan tips
.pull-left[
```{r plot_2, fig.show='hide'}
```
]
.pull-right[
```{r ref.label = 'plot_2', echo=F, fig.height=7}
```
]
<iframe src="3dreg.html" width="120%" height="90%" frameBorder="0"></iframe>
library(sjPlot)
library(sjmisc)
library(sjlabelled)
# reference list at the very end
#... |
'''
stringr 은 벡터형의 문자열을 다루는 다양한 기능이 들어있습니다.
'''
install.packages("stringr")
library(stringr)
emp <- read.csv("data/emp.csv")
emp
str(emp)
# r정규표현식식
# str_detect(벡터형, 정규식) - 패턴검사
?str_detect
emp$FIRST_NAME
str_detect(emp$FIRST_NAME, "a") # a를 포함하는
str_detect(emp$FIRST_NAME, "[aA") # a or A를 포함하는
str_detect(emp$FIRS... | /basic_r/code/02dplyr/script07(문자열다루기stringR).R | no_license | moonstar3109/R | R | false | false | 2,601 | r | '''
stringr 은 벡터형의 문자열을 다루는 다양한 기능이 들어있습니다.
'''
install.packages("stringr")
library(stringr)
emp <- read.csv("data/emp.csv")
emp
str(emp)
# r정규표현식식
# str_detect(벡터형, 정규식) - 패턴검사
?str_detect
emp$FIRST_NAME
str_detect(emp$FIRST_NAME, "a") # a를 포함하는
str_detect(emp$FIRST_NAME, "[aA") # a or A를 포함하는
str_detect(emp$FIRS... |
# clear your environment from any existing data
rm(list = ls())
# clear existing plots
dev.off()
# First, we will start by loading our dataset
Heart <- read.csv(file.choose())
data <- Heart[c(4,9,11,13,14,15)]
# split data
set.seed(10)
train <- createDataPartition(data$AHD, p = 0.7, list = FALSE)
trainning <- data[t... | /tttt.R | no_license | JayFu/learningnote | R | false | false | 2,369 | r | # clear your environment from any existing data
rm(list = ls())
# clear existing plots
dev.off()
# First, we will start by loading our dataset
Heart <- read.csv(file.choose())
data <- Heart[c(4,9,11,13,14,15)]
# split data
set.seed(10)
train <- createDataPartition(data$AHD, p = 0.7, list = FALSE)
trainning <- data[t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.