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 |
|---|---|---|---|---|---|---|---|---|---|
zakup_zwierzecia <- function(stan_gracza, stan_stada, zwierzak) {
wartosci_zwierzat <- c(R = 1, S = 6, P = 12, C = 36, H = 72, SD = 6, BD = 36)
if (sum(stan_gracza[1:5]*wartosci_zwierzat[1:5]) >= wartosci_zwierzat[zwierzak]) {
return (kup_zwierze_yolo(zwierzak, stan_gracza, stan_stada))
} else {
return (c... | /R/zakup_zwierzecia.R | no_license | nkneblewska/SuperFarmerRCNK | R | false | false | 357 | r | zakup_zwierzecia <- function(stan_gracza, stan_stada, zwierzak) {
wartosci_zwierzat <- c(R = 1, S = 6, P = 12, C = 36, H = 72, SD = 6, BD = 36)
if (sum(stan_gracza[1:5]*wartosci_zwierzat[1:5]) >= wartosci_zwierzat[zwierzak]) {
return (kup_zwierze_yolo(zwierzak, stan_gracza, stan_stada))
} else {
return (c... |
library(tidyverse)
library(readr)
library(dplyr)
library(ggplot2)
#Her må man sette sin egen WD
setwd("C:\Users\47958\Desktop\BED2056")
#Henter inn data, som jeg lastet ned og pakket ut. Fjern "#"
#Birth17 <- read_csv("Birth17.txt")
#Birth18 <- read_csv("Birth18.txt")
#Birth19 <- read_csv("Birth19.txt")
###... | /Assginment 7.R | no_license | edvardberg/homeworkbed2056 | R | false | false | 1,771 | r | library(tidyverse)
library(readr)
library(dplyr)
library(ggplot2)
#Her må man sette sin egen WD
setwd("C:\Users\47958\Desktop\BED2056")
#Henter inn data, som jeg lastet ned og pakket ut. Fjern "#"
#Birth17 <- read_csv("Birth17.txt")
#Birth18 <- read_csv("Birth18.txt")
#Birth19 <- read_csv("Birth19.txt")
###... |
# set up graphics parameters
colerz <- topo.colors(nsp)
rcol <- "darkslateblue"
linez <- rep(1:6, 100) # enough for 600 species for now
lspbyrs <- 1
lresbyrs <- 2
lwd=2
#years to plot for within-year dynamics
plotyrs<- seq(1, nyrs, by=floor(nyrs/8))
| /R/sourcefiles/zarchive/getGraphParms.R | no_license | lizzieinvancouver/temporalvar | R | false | false | 251 | r | # set up graphics parameters
colerz <- topo.colors(nsp)
rcol <- "darkslateblue"
linez <- rep(1:6, 100) # enough for 600 species for now
lspbyrs <- 1
lresbyrs <- 2
lwd=2
#years to plot for within-year dynamics
plotyrs<- seq(1, nyrs, by=floor(nyrs/8))
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extractModelStructure.R
\name{as.MxRAMModel}
\alias{as.MxRAMModel}
\title{as.MxRAMModel: Create an MxRAMModel from a lavaan or OpenMx model object}
\usage{
as.MxRAMModel(model, exogenous = TRUE, standardized = FALSE, ...)
}
\arguments{
\item{... | /man/as.MxRAMModel.Rd | no_license | trbrick/MICr | R | false | true | 919 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/extractModelStructure.R
\name{as.MxRAMModel}
\alias{as.MxRAMModel}
\title{as.MxRAMModel: Create an MxRAMModel from a lavaan or OpenMx model object}
\usage{
as.MxRAMModel(model, exogenous = TRUE, standardized = FALSE, ...)
}
\arguments{
\item{... |
# Load in the R package
library(rpart)
my_tree_three <- rpart(Survived ~ Pclass + Sex + Age + SibSp + Parch + Fare + Embarked,
data = train, method = "class", control = rpart.control(minsplit = 50, cp = 0))
# Visualize the decision tree using plot() and text()
plot(my_tree_three)
text(my_tree_t... | /HW1/src/other/6.R | no_license | Sohrabbeig/DataMiningCourse | R | false | false | 849 | r | # Load in the R package
library(rpart)
my_tree_three <- rpart(Survived ~ Pclass + Sex + Age + SibSp + Parch + Fare + Embarked,
data = train, method = "class", control = rpart.control(minsplit = 50, cp = 0))
# Visualize the decision tree using plot() and text()
plot(my_tree_three)
text(my_tree_t... |
get_api2_collocations <- function(term = "consciousness", years = c(1700, 1799)) {
api_call_start <- "https://vm0175.kaj.pouta.csc.fi/ecco-search2/collocations"
api_call_term <- paste0("?term=", term)
api_call_options <- "&sumScaling=DF&minSumFreq=100&limit=100&pretty&localScaling=FLAT"
api_call_years <- paste... | /collocations-shinyapp/api2_collocatins_functions.R | no_license | COMHIS/estc-turin | R | false | false | 479 | r |
get_api2_collocations <- function(term = "consciousness", years = c(1700, 1799)) {
api_call_start <- "https://vm0175.kaj.pouta.csc.fi/ecco-search2/collocations"
api_call_term <- paste0("?term=", term)
api_call_options <- "&sumScaling=DF&minSumFreq=100&limit=100&pretty&localScaling=FLAT"
api_call_years <- paste... |
#
# This is the server logic of a Shiny web application. You can run the
# application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(ggplot2)
library(dplyr)
# select columns to be used in the analysis
cardata <- m... | /server.R | no_license | Vmudsam/DevelopingDataProject-CourseProject | R | false | false | 1,674 | r | #
# This is the server logic of a Shiny web application. You can run the
# application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(ggplot2)
library(dplyr)
# select columns to be used in the analysis
cardata <- m... |
##########################
# Body condition analyses
##########################
# load required libraries
library(tidyverse);library(nlme);
library(MuMIn);library(stringi)
library(spdep);library(INLA)
library(marcoUtils);library(mgcv)
library(stringi);library(gtools)
library(XLConnect);library(ncf)
library(RColorBrewe... | /Analyses.R | no_license | drmarcogir/vultures | R | false | false | 14,593 | r | ##########################
# Body condition analyses
##########################
# load required libraries
library(tidyverse);library(nlme);
library(MuMIn);library(stringi)
library(spdep);library(INLA)
library(marcoUtils);library(mgcv)
library(stringi);library(gtools)
library(XLConnect);library(ncf)
library(RColorBrewe... |
#############################################
#### 13장. 웹 데이터 수집 (정적 웹크롤링)####
#############################################
install.packages('rvest')
installed.packages()
library(rvest)
url <- 'https://movie.naver.com/movie/point/af/list.nhn'
html <- read_html(url, encoding = 'utf-8')
html
# 영화제목; .title .movie... | /src/06_R/ch13_웹데이터수집.R | no_license | a124124/bigdata | R | false | false | 4,047 | r | #############################################
#### 13장. 웹 데이터 수집 (정적 웹크롤링)####
#############################################
install.packages('rvest')
installed.packages()
library(rvest)
url <- 'https://movie.naver.com/movie/point/af/list.nhn'
html <- read_html(url, encoding = 'utf-8')
html
# 영화제목; .title .movie... |
# carichiamo i pacchetti necessari
install.packages("devtools")
library(devtools)
devtools::install_github("statsbomb/StatsBombR", force = TRUE)
devtools::install_github("FCrSTATS/SBpitch")
# se non caricare dplyr, installatelo e poi library(dplyr)
library(tidyverse)
library(StatsBombR)
library(SBpitch)
# tutte i dat... | /R_workshop/02_Lab2_StatsBomb_pass.R | no_license | FEM-modena/D4SI | R | false | false | 1,648 | r | # carichiamo i pacchetti necessari
install.packages("devtools")
library(devtools)
devtools::install_github("statsbomb/StatsBombR", force = TRUE)
devtools::install_github("FCrSTATS/SBpitch")
# se non caricare dplyr, installatelo e poi library(dplyr)
library(tidyverse)
library(StatsBombR)
library(SBpitch)
# tutte i dat... |
#!/usr/bin/env Rscript
# print usage
usage <- function() {
cat(
'usage: mad.R <file>
mad.R
author: Colby Chiang (cc2qe@virginia.edu)
description: calculate median absolute deviation from a column of numbers
positional arguments:
file File with one column of numerical values [stdin]
')
}
# compute R... | /bin/mad.R | permissive | xtmgah/voir | R | false | false | 837 | r | #!/usr/bin/env Rscript
# print usage
usage <- function() {
cat(
'usage: mad.R <file>
mad.R
author: Colby Chiang (cc2qe@virginia.edu)
description: calculate median absolute deviation from a column of numbers
positional arguments:
file File with one column of numerical values [stdin]
')
}
# compute R... |
#' Create a history tibble for a onenode tree.
#'
#' A helper function to create_onenode_tree to create clean,
#' uniform tibbles that keep track of the history of the tree.
#'
#' @param z a list containing vectors q and p and a stepsize h representing a point in phase space plus a stepsize.
#' @param depth the depth i... | /R/build_tree.R | no_license | pourzanj/RNUTS | R | false | false | 18,288 | r | #' Create a history tibble for a onenode tree.
#'
#' A helper function to create_onenode_tree to create clean,
#' uniform tibbles that keep track of the history of the tree.
#'
#' @param z a list containing vectors q and p and a stepsize h representing a point in phase space plus a stepsize.
#' @param depth the depth i... |
library(tidyverse)
## Data
library(babynames)
head(babynames)
tail(babynames)
girls <- subset(babynames, sex=="F")
girls
boys <- subset(babynames, sex=="M")
boys
since1950 <- subset(babynames, year>=1950)
since1950
## Number of unique names per year.
ggplot(boys)
ggplot(boys, aes(... | /ggplot/003_ggplot_distributions.R | no_license | jalapic/learnR | R | false | false | 4,339 | r |
library(tidyverse)
## Data
library(babynames)
head(babynames)
tail(babynames)
girls <- subset(babynames, sex=="F")
girls
boys <- subset(babynames, sex=="M")
boys
since1950 <- subset(babynames, year>=1950)
since1950
## Number of unique names per year.
ggplot(boys)
ggplot(boys, aes(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ts_normalization.R
\name{ts_normalization}
\alias{ts_normalization}
\title{Normalize univariate timeseries}
\usage{
ts_normalization(
data,
length_val,
length_test,
value_col = "value",
joined = TRUE,
metrics = FALSE
)
}
\argument... | /man/ts_normalization.Rd | permissive | thfuchs/tsRNN | R | false | true | 1,500 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ts_normalization.R
\name{ts_normalization}
\alias{ts_normalization}
\title{Normalize univariate timeseries}
\usage{
ts_normalization(
data,
length_val,
length_test,
value_col = "value",
joined = TRUE,
metrics = FALSE
)
}
\argument... |
gr_ll_flexrsurv_fromto_GA0B0ABE0Br0PeriodControl<-function(allparam,
Y, X0, X, Z, W,
BX0,
Id, FirstId, LastId=NULL,
expected_rate,
expected_logit_end,
expected_logit_enter,
expected_logit_end_byperiod,
expected_logit_enter_byperiod,
weights_byperiod,
Id_byperiod,
weights=NULL,
Yco... | /R/gr_ll_flexrsurv_fromto_GA0B0ABE0Br0PeriodControl.R | no_license | cran/flexrsurv | R | false | false | 35,639 | r | gr_ll_flexrsurv_fromto_GA0B0ABE0Br0PeriodControl<-function(allparam,
Y, X0, X, Z, W,
BX0,
Id, FirstId, LastId=NULL,
expected_rate,
expected_logit_end,
expected_logit_enter,
expected_logit_end_byperiod,
expected_logit_enter_byperiod,
weights_byperiod,
Id_byperiod,
weights=NULL,
Yco... |
# dl dataset
download.file(url = "https://mq-software-carpentry.github.io/R-git-for-research/data/SAFI_messy.xlsx",
destfile = "./data/SAFI_messy.xlsx", mode = "wb")
download.file(url = "https://mq-software-carpentry.github.io/R-git-for-research/data/SAFI_clean.csv",
destfile = "./data/S... | /scripts/data_downloads.R | no_license | Sambam210/data-carpentry-r | R | false | false | 683 | r | # dl dataset
download.file(url = "https://mq-software-carpentry.github.io/R-git-for-research/data/SAFI_messy.xlsx",
destfile = "./data/SAFI_messy.xlsx", mode = "wb")
download.file(url = "https://mq-software-carpentry.github.io/R-git-for-research/data/SAFI_clean.csv",
destfile = "./data/S... |
#calculating within vs. between species variance, following Anderegg et al. 2018 Ecology Letters.
rm(list=ls())
source('paths.r')
library(lme4)
library(caper)
library(MuMIn)
#set output path.----
output.path <- variance_decomp_output.path
#load data.----
d <- readRDS(intra_specific_analysis_data.path)
#Filter based o... | /data_analysis/4._trait_variance_decomposition.r | no_license | colinaverill/Averill_et_al_2019_myco.traits | R | false | false | 2,979 | r | #calculating within vs. between species variance, following Anderegg et al. 2018 Ecology Letters.
rm(list=ls())
source('paths.r')
library(lme4)
library(caper)
library(MuMIn)
#set output path.----
output.path <- variance_decomp_output.path
#load data.----
d <- readRDS(intra_specific_analysis_data.path)
#Filter based o... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/analysis_functions.R
\name{countCustomers}
\alias{countCustomers}
\title{Count customers by group}
\usage{
countCustomers(df, groupVars = NULL)
}
\arguments{
\item{df}{A data frame with a column named customerUID}
\item{groupVars}{A characte... | /man/countCustomers.Rd | permissive | chrischizinski/huntfishapp | R | false | true | 1,799 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/analysis_functions.R
\name{countCustomers}
\alias{countCustomers}
\title{Count customers by group}
\usage{
countCustomers(df, groupVars = NULL)
}
\arguments{
\item{df}{A data frame with a column named customerUID}
\item{groupVars}{A characte... |
#' Produces the possible permutations of a set of nodes
#'
#' @param max A vector of integers. The maximum value of an integer value starting at 0. Defaults to 1. The number of permutation is defined by \code{max}'s length
#' @keywords internal
#' @return A \code{matrix} of permutations
#' @importFrom rlang exprs
#' @... | /R/helpers.R | no_license | yadmasu1/CausalQueries | R | false | false | 12,183 | r |
#' Produces the possible permutations of a set of nodes
#'
#' @param max A vector of integers. The maximum value of an integer value starting at 0. Defaults to 1. The number of permutation is defined by \code{max}'s length
#' @keywords internal
#' @return A \code{matrix} of permutations
#' @importFrom rlang exprs
#' @... |
# Plot 1 for exploratory data analysis couse
# Script assumes that source data is present in the parent folder of script
# Read the power consumption data
power = read.csv('../household_power_consumption.txt', sep=';', stringsAsFactors=F,
na.strings="?")
# Convert date to 'date'
power$Date = as.Date(... | /plot1.R | no_license | bolero/ExData_Plotting1 | R | false | false | 1,041 | r | # Plot 1 for exploratory data analysis couse
# Script assumes that source data is present in the parent folder of script
# Read the power consumption data
power = read.csv('../household_power_consumption.txt', sep=';', stringsAsFactors=F,
na.strings="?")
# Convert date to 'date'
power$Date = as.Date(... |
#:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "analcatdata_apnea2")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "binaryClass")
lrn ... | /models/openml_analcatdata_apnea2/classification_binaryClass/6011f400d7eaa7b495ddac3f1b4760cb/code.R | no_license | pysiakk/CaseStudies2019S | R | false | false | 695 | r | #:# libraries
library(digest)
library(mlr)
library(OpenML)
library(farff)
#:# config
set.seed(1)
#:# data
dataset <- getOMLDataSet(data.name = "analcatdata_apnea2")
head(dataset$data)
#:# preprocessing
head(dataset$data)
#:# model
task = makeClassifTask(id = "task", data = dataset$data, target = "binaryClass")
lrn ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/successions.R
\name{Successions}
\alias{Successions}
\alias{successions}
\title{Count successions}
\usage{
successions(x)
}
\arguments{
\item{x}{An atomic vector.}
}
\value{
A list containing the indices of the successions (\code{index}), the... | /man/successions.Rd | no_license | kaldhusdal/temporal | R | false | true | 670 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/successions.R
\name{Successions}
\alias{Successions}
\alias{successions}
\title{Count successions}
\usage{
successions(x)
}
\arguments{
\item{x}{An atomic vector.}
}
\value{
A list containing the indices of the successions (\code{index}), the... |
# Com base no modelo implementado abaixo, escreva o `for` loop
# necessário p/ implementar o Mini-batch SGD.
# O tamanho do batch deve ser especificado por meio de uma variável
# chamada batch_size.
# Data generation ----------------------------------------------
n <- 1000
x <- runif(n)
W <- 0.9
B <- 0.1
y <- W *... | /exercicios/02-mini-batch-sgd.R | no_license | brunocp76/CursoDeepLearning | R | false | false | 1,373 | r | # Com base no modelo implementado abaixo, escreva o `for` loop
# necessário p/ implementar o Mini-batch SGD.
# O tamanho do batch deve ser especificado por meio de uma variável
# chamada batch_size.
# Data generation ----------------------------------------------
n <- 1000
x <- runif(n)
W <- 0.9
B <- 0.1
y <- W *... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ddr.R
\name{ddr}
\alias{ddr}
\title{Get DDR data}
\usage{
ddr(date, asset_class, show_col_types = FALSE)
}
\arguments{
\item{date}{the date for which data is required as Date or DateTime object.
Only the year, month and day elements of the ob... | /man/ddr.Rd | no_license | imanuelcostigan/dataonderivatives | R | false | true | 1,653 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ddr.R
\name{ddr}
\alias{ddr}
\title{Get DDR data}
\usage{
ddr(date, asset_class, show_col_types = FALSE)
}
\arguments{
\item{date}{the date for which data is required as Date or DateTime object.
Only the year, month and day elements of the ob... |
setwd("~/Desktop/Data Science/p8105_maternity_leave_nyc/map")
library(tidyverse)
library(spdep)
library(maptools)
library(rgdal)
library(spatialreg)
library(sf)
unpaid_poly <- readOGR(dsn = "nyc_only_zips.shp", layer = "nyc_only_zips")
names(unpaid_poly)
###Creating a queen's neighborhood weight matrix using the p... | /gwr_unpaid.R | no_license | meb2308/p8105_maternity_leave_nyc | R | false | false | 6,300 | r |
setwd("~/Desktop/Data Science/p8105_maternity_leave_nyc/map")
library(tidyverse)
library(spdep)
library(maptools)
library(rgdal)
library(spatialreg)
library(sf)
unpaid_poly <- readOGR(dsn = "nyc_only_zips.shp", layer = "nyc_only_zips")
names(unpaid_poly)
###Creating a queen's neighborhood weight matrix using the p... |
# mostrar at� 2 casas decimais
options("scipen" = 2)
# Ler arquivo csv
Vinhos <- read.csv2("BaseWine_Red_e_White2018.csv", row.names=1)
#Base
View(Vinhos)
#mostrar as vari�veis
str(Vinhos)
#primeiros avalia��o das vari�veis]
summary(Vinhos)
attach(Vinhos)
## Criando label para cada coluna do dataset_##
attr... | /Estatistica/analise_anexo1.R | no_license | pd2f/modelos_basicos | R | false | false | 5,664 | r | # mostrar at� 2 casas decimais
options("scipen" = 2)
# Ler arquivo csv
Vinhos <- read.csv2("BaseWine_Red_e_White2018.csv", row.names=1)
#Base
View(Vinhos)
#mostrar as vari�veis
str(Vinhos)
#primeiros avalia��o das vari�veis]
summary(Vinhos)
attach(Vinhos)
## Criando label para cada coluna do dataset_##
attr... |
library(glmnet)
library(rbenchmark)
library(Rcpp)
sourceCpp("lassoALO.cpp")
sourceCpp("matUpdate.cpp")
source("aloWrappers.R")
#########
# setup
n = 500
p = 200
k = 20
true_beta = rnorm(p, 0, 1)
true_beta[-(1:k)] = 0
# misspecification example
X = matrix(rnorm(n * p, 0, sqrt(1 / k)), n, p)
y = X %*% true_beta + rnorm... | /R/Update_Test.R | permissive | Francis-Hsu/Summer-ALO | R | false | false | 1,595 | r | library(glmnet)
library(rbenchmark)
library(Rcpp)
sourceCpp("lassoALO.cpp")
sourceCpp("matUpdate.cpp")
source("aloWrappers.R")
#########
# setup
n = 500
p = 200
k = 20
true_beta = rnorm(p, 0, 1)
true_beta[-(1:k)] = 0
# misspecification example
X = matrix(rnorm(n * p, 0, sqrt(1 / k)), n, p)
y = X %*% true_beta + rnorm... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/glue_operations.R
\name{glue_stop_trigger}
\alias{glue_stop_trigger}
\title{Stops a specified trigger}
\usage{
glue_stop_trigger(Name)
}
\arguments{
\item{Name}{[required] The name of the trigger to stop.}
}
\description{
Stops a specified tr... | /cran/paws.analytics/man/glue_stop_trigger.Rd | permissive | paws-r/paws | R | false | true | 434 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/glue_operations.R
\name{glue_stop_trigger}
\alias{glue_stop_trigger}
\title{Stops a specified trigger}
\usage{
glue_stop_trigger(Name)
}
\arguments{
\item{Name}{[required] The name of the trigger to stop.}
}
\description{
Stops a specified tr... |
library(epiGWAS)
### Name: robust_outcome
### Title: Implements the robust modified outcome approach
### Aliases: robust_outcome
### ** Examples
n <- 30
p <- 10
X <- matrix((runif(n * p) < 0.4) + (runif(n * p) < 0.4),
ncol = p, nrow = n) # SNP matrix
A <- rbinom(n, 1, 0.3)
propensity <- runif(n, min = ... | /data/genthat_extracted_code/epiGWAS/examples/robust_outcome.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 487 | r | library(epiGWAS)
### Name: robust_outcome
### Title: Implements the robust modified outcome approach
### Aliases: robust_outcome
### ** Examples
n <- 30
p <- 10
X <- matrix((runif(n * p) < 0.4) + (runif(n * p) < 0.4),
ncol = p, nrow = n) # SNP matrix
A <- rbinom(n, 1, 0.3)
propensity <- runif(n, min = ... |
sports <- read.csv("~/Desktop/UCSD/Project-Release/evaluation/threshold2/sports.csv")
sports = sports$cosign_similarity
news <- read.csv("~/Desktop/UCSD/Project-Release/evaluation/threshold2/news.csv")
news = news$cosign_similarity
business <- read.csv("~/Desktop/UCSD/Project-Release/evaluation/threshold2/business.csv"... | /evaluation/threshold2/plot.R | no_license | paulcnichols/EventTracker-V2 | R | false | false | 659 | r | sports <- read.csv("~/Desktop/UCSD/Project-Release/evaluation/threshold2/sports.csv")
sports = sports$cosign_similarity
news <- read.csv("~/Desktop/UCSD/Project-Release/evaluation/threshold2/news.csv")
news = news$cosign_similarity
business <- read.csv("~/Desktop/UCSD/Project-Release/evaluation/threshold2/business.csv"... |
library(ggplot2)
library(reshape2)
box_dat<-dat[,c("URXUAS3", "URXUAS5","URXUAB", "URXUAC", "URXUDMA","URXUMMA","URXUCL")]
box_dat<-melt(box_dat,id.vars = 'URXUCL')
ggplot(data = na.omit(box_dat),aes(x = factor(URXUCL), y=value,fill=factor(URXUCL)))+
geom_boxplot()+
facet_wrap(~variable,scales = 'free')+
labs(x=... | /plots.R | no_license | spaul-genetics/arsenic | R | false | false | 775 | r | library(ggplot2)
library(reshape2)
box_dat<-dat[,c("URXUAS3", "URXUAS5","URXUAB", "URXUAC", "URXUDMA","URXUMMA","URXUCL")]
box_dat<-melt(box_dat,id.vars = 'URXUCL')
ggplot(data = na.omit(box_dat),aes(x = factor(URXUCL), y=value,fill=factor(URXUCL)))+
geom_boxplot()+
facet_wrap(~variable,scales = 'free')+
labs(x=... |
\docType{package}
\name{mlgt-package}
\alias{mlgt-package}
\title{mlgt: Multi-locus geno-typing}
\description{
\tabular{ll}{ Package: \tab mlgt\cr Type: \tab Package\cr
Version: \tab 0.16\cr Date: \tab 2012-03-27\cr Author:
\tab Dave T. Gerrard <david.gerrard@manchester.ac.uk>\cr
License: \tab GPL (>= 2... | /man/mlgt-package.Rd | no_license | cran/mlgt | R | false | false | 1,363 | rd | \docType{package}
\name{mlgt-package}
\alias{mlgt-package}
\title{mlgt: Multi-locus geno-typing}
\description{
\tabular{ll}{ Package: \tab mlgt\cr Type: \tab Package\cr
Version: \tab 0.16\cr Date: \tab 2012-03-27\cr Author:
\tab Dave T. Gerrard <david.gerrard@manchester.ac.uk>\cr
License: \tab GPL (>= 2... |
# loading library
library(pROC)
library(e1071)
NaiveBayesClassification <- function(X_train,y,X_test=data.frame(),cv=5,seed=123,metric="auc")
{
# defining evaluation metric
score <- function(a,b,metric)
{
switch(metric,
auc = auc(a,b),
mae = sum(abs(a-b))/length(a),
rmse = s... | /NaiveBayes.R | permissive | vasanthgx/Models_CV | R | false | false | 2,136 | r | # loading library
library(pROC)
library(e1071)
NaiveBayesClassification <- function(X_train,y,X_test=data.frame(),cv=5,seed=123,metric="auc")
{
# defining evaluation metric
score <- function(a,b,metric)
{
switch(metric,
auc = auc(a,b),
mae = sum(abs(a-b))/length(a),
rmse = s... |
library('vtreat')
context("Test Score Stability")
test_that("testStability: Stability of estimates", {
expandTab <- function(tab) {
# expand out into data
d <- c()
for(vLevelI in seq_len(nrow(tab))) {
for(yLevelI in seq_len(ncol(tab))) {
count <- tab[vLevelI,yLevelI]
if(count>0) {
... | /vtreat/tests/testthat/testStability.R | no_license | ingted/R-Examples | R | false | false | 2,465 | r | library('vtreat')
context("Test Score Stability")
test_that("testStability: Stability of estimates", {
expandTab <- function(tab) {
# expand out into data
d <- c()
for(vLevelI in seq_len(nrow(tab))) {
for(yLevelI in seq_len(ncol(tab))) {
count <- tab[vLevelI,yLevelI]
if(count>0) {
... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/reverse.R
\name{reverse}
\alias{reverse}
\title{Reverse}
\usage{
reverse(x)
}
\arguments{
\item{x}{}
}
\value{
a vector
}
\description{
Reverse returns a copy of a vector whose elements are in
the reverse order. The end.
}
\details{
S... | /man/reverse.Rd | no_license | garrettgman/centering | R | false | false | 376 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/reverse.R
\name{reverse}
\alias{reverse}
\title{Reverse}
\usage{
reverse(x)
}
\arguments{
\item{x}{}
}
\value{
a vector
}
\description{
Reverse returns a copy of a vector whose elements are in
the reverse order. The end.
}
\details{
S... |
## Load required packages https://rstudio-pubs-static.s3.amazonaws.com/55939_3a149c3034c4469ca938b3d9ce964546.html
library(dplyr)
library(data.table)
library(tidyr)
filesPath <- C:/Project/UCI HAR Dataset/UCI HAR Dataset"
setwd(filesPath)
if(!file.exists("./data")) {dir.create("./data")}
fileUrl <- "https://d396qusza... | /run_analysis.R | no_license | Marta9/Getting-and-Cleaning-Data-Course-Project | R | false | false | 3,928 | r | ## Load required packages https://rstudio-pubs-static.s3.amazonaws.com/55939_3a149c3034c4469ca938b3d9ce964546.html
library(dplyr)
library(data.table)
library(tidyr)
filesPath <- C:/Project/UCI HAR Dataset/UCI HAR Dataset"
setwd(filesPath)
if(!file.exists("./data")) {dir.create("./data")}
fileUrl <- "https://d396qusza... |
#Library install and setup
# install.packages("ggplot2")
# install.packages("ggbeeswarm")
library(ggplot2)
library(ggbeeswarm)
library("RODBC")
library("beeswarm")
#GLOBAL VARIABLES#
filesource = FALSE
dummydata = TRUE
dbhandle <- odbcDriverConnect('driver={SQL Server};server=10.134.13.36;database=WICMAST... | /Vocera Message Response Rate-NON-PROD-TEST.R | no_license | mo-g/vocera-messaging | R | false | false | 4,920 | r | #Library install and setup
# install.packages("ggplot2")
# install.packages("ggbeeswarm")
library(ggplot2)
library(ggbeeswarm)
library("RODBC")
library("beeswarm")
#GLOBAL VARIABLES#
filesource = FALSE
dummydata = TRUE
dbhandle <- odbcDriverConnect('driver={SQL Server};server=10.134.13.36;database=WICMAST... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ParseDW.R
\name{ParseDW}
\alias{ParseDW}
\title{ParseDW}
\usage{
ParseDW(report.data)
}
\arguments{
\item{report.data}{jsonlite formatted data frame of report data returned from the API}
}
\value{
Formatted data frame
}
\description{
Internal... | /man/ParseDW.Rd | no_license | framingeinstein/RSiteCatalyst | R | false | true | 656 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ParseDW.R
\name{ParseDW}
\alias{ParseDW}
\title{ParseDW}
\usage{
ParseDW(report.data)
}
\arguments{
\item{report.data}{jsonlite formatted data frame of report data returned from the API}
}
\value{
Formatted data frame
}
\description{
Internal... |
\name{inferHyperparam}
\alias{inferHyperparam}
\title{
Function to infer the hyperparameters for Bayesian inference from an a priori matrix or a data set
}
\description{
Since the Bayesian inference approach implemented in the package is based on conjugate priors, hyperparameters must be provided to model the prior pr... | /man/inferHyperparam.Rd | no_license | cryptomanic/markovchain | R | false | false | 2,087 | rd | \name{inferHyperparam}
\alias{inferHyperparam}
\title{
Function to infer the hyperparameters for Bayesian inference from an a priori matrix or a data set
}
\description{
Since the Bayesian inference approach implemented in the package is based on conjugate priors, hyperparameters must be provided to model the prior pr... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{castle.htseq.fpkm}
\alias{castle.htseq.fpkm}
\title{Gene expression for Castle et al. (ArrayExpress E-MTAB-305) mapped to Ensembl 76 (GRCh38)
and quantified with HTSeq-count and normalised with the FPKM method.
See... | /man/castle.htseq.fpkm.Rd | permissive | barzine/barzinePhdData | R | false | true | 1,340 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{castle.htseq.fpkm}
\alias{castle.htseq.fpkm}
\title{Gene expression for Castle et al. (ArrayExpress E-MTAB-305) mapped to Ensembl 76 (GRCh38)
and quantified with HTSeq-count and normalised with the FPKM method.
See... |
library(dplyr)
library(lubridate)
#Read in data and extract pertinent dates. Also convert dates from text to date format
mData = tbl_df(read.csv("household_power_consumption.txt", sep=';', na.strings="?", stringsAsFactors=F, comment.char="", quote='\"'))
mData = filter(mData, Date == "1/2/2007" | Date == "2/2/2007")
... | /plot1.R | no_license | zornosaur/ExData_Plotting1 | R | false | false | 619 | r | library(dplyr)
library(lubridate)
#Read in data and extract pertinent dates. Also convert dates from text to date format
mData = tbl_df(read.csv("household_power_consumption.txt", sep=';', na.strings="?", stringsAsFactors=F, comment.char="", quote='\"'))
mData = filter(mData, Date == "1/2/2007" | Date == "2/2/2007")
... |
\name{price.ani}
\alias{price.ani}
\title{Demonstrate stock prices in animations}
\usage{
price.ani(price, time, time.begin = min(time), span = 15 * 60, ..., xlab = "price",
ylab = "frequency", xlim, ylim, main)
}
\arguments{
\item{price}{stock prices}
\item{time}{time corresponding to prices}
\item{time.begin}{... | /man/price.ani.Rd | no_license | chmue/animation | R | false | false | 1,099 | rd | \name{price.ani}
\alias{price.ani}
\title{Demonstrate stock prices in animations}
\usage{
price.ani(price, time, time.begin = min(time), span = 15 * 60, ..., xlab = "price",
ylab = "frequency", xlim, ylim, main)
}
\arguments{
\item{price}{stock prices}
\item{time}{time corresponding to prices}
\item{time.begin}{... |
testlist <- list(type = 0L, z = 9.83578205428059e-312)
result <- do.call(esreg::G1_fun,testlist)
str(result) | /esreg/inst/testfiles/G1_fun/libFuzzer_G1_fun/G1_fun_valgrind_files/1609894068-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 108 | r | testlist <- list(type = 0L, z = 9.83578205428059e-312)
result <- do.call(esreg::G1_fun,testlist)
str(result) |
library(CatDyn)
### Name: M.Hoenig
### Title: Estimate natural mortality rate from longevity data
### Aliases: M.Hoenig
### Keywords: ~models
### ** Examples
max.age <- 5.8
time.step <- "day"
M.Hoenig(max.age,time.step)
| /data/genthat_extracted_code/CatDyn/examples/m.hoenig_1.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 227 | r | library(CatDyn)
### Name: M.Hoenig
### Title: Estimate natural mortality rate from longevity data
### Aliases: M.Hoenig
### Keywords: ~models
### ** Examples
max.age <- 5.8
time.step <- "day"
M.Hoenig(max.age,time.step)
|
# Exercise 1: creating and accessing lists
# Create a vector `my_breakfast` of everything you ate for breakfast
my_breakfast <- c("congee")
# Create a vector `my_lunch` of everything you ate (or will eat) for lunch
my_lunch <- c()
# Create a list `meals` that has contains your breakfast and lunch
meals <- list(break... | /chapter-08-exercises/exercise-1/exercise.R | permissive | keyyyyyx/book-exercises | R | false | false | 1,353 | r | # Exercise 1: creating and accessing lists
# Create a vector `my_breakfast` of everything you ate for breakfast
my_breakfast <- c("congee")
# Create a vector `my_lunch` of everything you ate (or will eat) for lunch
my_lunch <- c()
# Create a list `meals` that has contains your breakfast and lunch
meals <- list(break... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cloudsearchdomain_operations.R
\name{cloudsearchdomain_upload_documents}
\alias{cloudsearchdomain_upload_documents}
\title{Posts a batch of documents to a search domain for indexing}
\usage{
cloudsearchdomain_upload_documents(documents, conte... | /cran/paws.analytics/man/cloudsearchdomain_upload_documents.Rd | permissive | peoplecure/paws | R | false | true | 2,360 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cloudsearchdomain_operations.R
\name{cloudsearchdomain_upload_documents}
\alias{cloudsearchdomain_upload_documents}
\title{Posts a batch of documents to a search domain for indexing}
\usage{
cloudsearchdomain_upload_documents(documents, conte... |
#### TESTS FOR strr helpers ####################################################
### Setup ######################################################################
library(dplyr)
context("strr_helpers tests")
data <-
dplyr::tibble(
a = c(rep("A", 200), rep("B", 50), rep("C", 50), rep("D", 50), rep("E", 25),
... | /tests/testthat/test-strr_helpers.R | no_license | UPGo-McGill/strr | R | false | false | 2,214 | r | #### TESTS FOR strr helpers ####################################################
### Setup ######################################################################
library(dplyr)
context("strr_helpers tests")
data <-
dplyr::tibble(
a = c(rep("A", 200), rep("B", 50), rep("C", 50), rep("D", 50), rep("E", 25),
... |
#清除R記憶體資料
rm(list=ls())
gc()
library(randomForest)
ind=sample(2,nrow(iris),replace = T,prob=c(0.8,0.2))
train_data=iris[ind==1,]
test_data=iris[ind==2,]
rf_model=randomForest(Species~.,data=train_data,ntree=100)
pred_test=predict(rf_model,test_data)
confusion_matrix=table(pred_test,test_data$Species)... | /random forest.R | no_license | JackPeng1st/Supervised-learning-Iris-data | R | false | false | 432 | r | #清除R記憶體資料
rm(list=ls())
gc()
library(randomForest)
ind=sample(2,nrow(iris),replace = T,prob=c(0.8,0.2))
train_data=iris[ind==1,]
test_data=iris[ind==2,]
rf_model=randomForest(Species~.,data=train_data,ntree=100)
pred_test=predict(rf_model,test_data)
confusion_matrix=table(pred_test,test_data$Species)... |
testlist <- list(A = structure(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(4L, 7L)), 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/1613112745-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 245 | r | testlist <- list(A = structure(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(4L, 7L)), B = structure(0, .Dim = c(1L, 1L)))
result <- do.call(multivariance:::match_rows,testlist)
str(result) |
## ---- include = FALSE---------------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
## ----setup--------------------------------------------------------------------
library(xtreg2way)
## -------------------------------------------------------------------------... | /inst/doc/Two-Way-Fixed-Effect-Model.R | no_license | cran/xtreg2way | R | false | false | 1,831 | r | ## ---- include = FALSE---------------------------------------------------------
knitr::opts_chunk$set(
collapse = TRUE,
comment = "#>"
)
## ----setup--------------------------------------------------------------------
library(xtreg2way)
## -------------------------------------------------------------------------... |
library(glmnet)
mydata = read.table("./TrainingSet/LassoBIC/central_nervous_system.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.01,family="gaussian",standardize=FALSE)
sink('./Model/EN/Lasso/central_nervous_s... | /Model/EN/Lasso/central_nervous_system/central_nervous_system_006.R | no_license | leon1003/QSMART | R | false | false | 400 | r | library(glmnet)
mydata = read.table("./TrainingSet/LassoBIC/central_nervous_system.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mse",alpha=0.01,family="gaussian",standardize=FALSE)
sink('./Model/EN/Lasso/central_nervous_s... |
library(Delta)
### Name: GetMx
### Title: Get matrix of the problem (Mx) function
### Aliases: GetMx
### Keywords: M1 Mx
### ** Examples
GetMx(matrix(c(1,2,0,3,4,0,0,0,1),3,3))
| /data/genthat_extracted_code/Delta/examples/GetMx.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 184 | r | library(Delta)
### Name: GetMx
### Title: Get matrix of the problem (Mx) function
### Aliases: GetMx
### Keywords: M1 Mx
### ** Examples
GetMx(matrix(c(1,2,0,3,4,0,0,0,1),3,3))
|
#Demonstrates the data structures in R
#Demonstrates the behaviour of data frames
#To Construct a data frame use the data.frame() function
df<-data.frame("SN"=1:2,"Age"=c(21,15),"Name"=c("Dave","John"))
df
#To read data frame from a csv file from the current working directory.
#na.strings="" is passed so that empty v... | /data_structures_data_frames.R | no_license | kondapallishashi/R | R | false | false | 8,121 | r | #Demonstrates the data structures in R
#Demonstrates the behaviour of data frames
#To Construct a data frame use the data.frame() function
df<-data.frame("SN"=1:2,"Age"=c(21,15),"Name"=c("Dave","John"))
df
#To read data frame from a csv file from the current working directory.
#na.strings="" is passed so that empty v... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/exportToJson.R
\name{exportToJson}
\alias{exportToJson}
\title{exportToJson}
\usage{
exportToJson(connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema,
outputPath = getwd(), reports = allReports,
vocabDatabaseSchema = cdmDatabaseSc... | /man/exportToJson.Rd | permissive | mustafaascha/Achilles | R | false | true | 1,744 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/exportToJson.R
\name{exportToJson}
\alias{exportToJson}
\title{exportToJson}
\usage{
exportToJson(connectionDetails, cdmDatabaseSchema, resultsDatabaseSchema,
outputPath = getwd(), reports = allReports,
vocabDatabaseSchema = cdmDatabaseSc... |
# This is the user-interface definition of a Shiny web application.
# You can find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com
#
library(shiny)
library(DT)
source("helper.R")
# Define UI for application that draws a histogram
ui <- navbarPage("2017 Philly Primary Vote Explorer"... | /app.R | no_license | mhollander/2017PhillyDAPrimary | R | false | false | 8,882 | r |
# This is the user-interface definition of a Shiny web application.
# You can find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com
#
library(shiny)
library(DT)
source("helper.R")
# Define UI for application that draws a histogram
ui <- navbarPage("2017 Philly Primary Vote Explorer"... |
#****************************************************************************************************************************************************2. fisher
sidebarLayout(
sidebarPanel(
h4(tags$b("Step 1. Data Preparation")),
p(tags$b("1. Give 2 names to each category of factor shown as column names")),
tags$... | /5MFSrctabtest/ui_2_fisher.R | permissive | mephas/mephas_web | R | false | false | 3,432 | r | #****************************************************************************************************************************************************2. fisher
sidebarLayout(
sidebarPanel(
h4(tags$b("Step 1. Data Preparation")),
p(tags$b("1. Give 2 names to each category of factor shown as column names")),
tags$... |
metaReg<-function(list_of_files,sheet){
object_lenge<-c()
Namen_liste<-c()
for(file in list_of_files){
Name<-substring(file,1,nchar(file)-5)
Namen_liste<-c(Namen_liste,Name)
assign(Name,read.xlsx(file,sheet=sheet))
object_lenge<-c(object_lenge,nrow(get(Name)))
}
start<-Namen_liste[whic... | /R/meta_Reg.R | no_license | AaarrrRookie/GWR | R | false | false | 1,443 | r | metaReg<-function(list_of_files,sheet){
object_lenge<-c()
Namen_liste<-c()
for(file in list_of_files){
Name<-substring(file,1,nchar(file)-5)
Namen_liste<-c(Namen_liste,Name)
assign(Name,read.xlsx(file,sheet=sheet))
object_lenge<-c(object_lenge,nrow(get(Name)))
}
start<-Namen_liste[whic... |
library(dplyr)
'Datasources'
race_by_city <- read.csv(file = "Data/ShareRaceByCity.csv")
police_killings <- read.csv(file = "Data/PoliceKillingsUS.csv")
education_stats <- read.csv(file = "Data/PercentOVer25CompletedHighSchool.csv")
poverty_stats <- read.csv(file = "Data/PercentagePeopleBelowPovertyLevel.csv")
income... | /script.R | no_license | bmetsker/pv_project | R | false | false | 456 | r | library(dplyr)
'Datasources'
race_by_city <- read.csv(file = "Data/ShareRaceByCity.csv")
police_killings <- read.csv(file = "Data/PoliceKillingsUS.csv")
education_stats <- read.csv(file = "Data/PercentOVer25CompletedHighSchool.csv")
poverty_stats <- read.csv(file = "Data/PercentagePeopleBelowPovertyLevel.csv")
income... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helpers.R
\name{get_unique_vars}
\alias{get_unique_vars}
\title{Returns information of the dataframe - The variables which have a constant value}
\usage{
get_unique_vars(df)
}
\arguments{
\item{df}{The dataframe to generate the EDA report}
}
... | /man/get_unique_vars.Rd | permissive | vivekkalyanarangan30/dfprofile | R | false | true | 641 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helpers.R
\name{get_unique_vars}
\alias{get_unique_vars}
\title{Returns information of the dataframe - The variables which have a constant value}
\usage{
get_unique_vars(df)
}
\arguments{
\item{df}{The dataframe to generate the EDA report}
}
... |
\name{ExpQQ}
\alias{ExpQQ}
\title{
Exponential quantile plot
}
\description{
Computes the empirical quantiles of a data vector and the theoretical quantiles of the standard exponential distribution. These quantiles are then plotted in an exponential QQ-plot with the theoretical quantiles on the \eqn{x}-axis and the em... | /man/ExpQQ.Rd | no_license | kevinykuo/ReIns | R | false | false | 2,211 | rd | \name{ExpQQ}
\alias{ExpQQ}
\title{
Exponential quantile plot
}
\description{
Computes the empirical quantiles of a data vector and the theoretical quantiles of the standard exponential distribution. These quantiles are then plotted in an exponential QQ-plot with the theoretical quantiles on the \eqn{x}-axis and the em... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 2383
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 2383
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/e... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/eequery_query57_1344n/eequery_query57_1344n.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 710 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 2383
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 2383
c
c Input Parameter (command line, file):
c input filename QBFLIB/Jordan-Kaiser/reduction-finding-full-set-params-k1c3n4/e... |
\encoding{UTF-8}
\name{genpop class}
\alias{genpop-class}
\alias{dist,genpop,ANY,ANY,ANY,missing-method}
\alias{names,genpop-method}
\alias{show,genpop-method}
\alias{summary,genpop-method}
\alias{print,genpopSummary-method}
\alias{print.genpopSummary}
\alias{is.genpop}
\title{adegenet formal class (S4) for allele coun... | /man/genpop.Rd | no_license | gtonkinhill/adegenet | R | false | false | 3,209 | rd | \encoding{UTF-8}
\name{genpop class}
\alias{genpop-class}
\alias{dist,genpop,ANY,ANY,ANY,missing-method}
\alias{names,genpop-method}
\alias{show,genpop-method}
\alias{summary,genpop-method}
\alias{print,genpopSummary-method}
\alias{print.genpopSummary}
\alias{is.genpop}
\title{adegenet formal class (S4) for allele coun... |
ui <- fluidPage(
titlePanel("Chicago Crime Analysis 2020 "),
mainPanel(tabsetPanel(
tabPanel("Crime Types by Month Frequency",h3("Frequency of Crimes Types by Month"), fluid = TRUE,
# Sidebar panel for Month
sidebarPanel(
... | /ui.R | no_license | GarimaTuteja/RShinyApplication2 | R | false | false | 2,243 | r |
ui <- fluidPage(
titlePanel("Chicago Crime Analysis 2020 "),
mainPanel(tabsetPanel(
tabPanel("Crime Types by Month Frequency",h3("Frequency of Crimes Types by Month"), fluid = TRUE,
# Sidebar panel for Month
sidebarPanel(
... |
## ---- echo = FALSE------------------------------------------------------------
knitr::opts_chunk$set(collapse = TRUE, comment = "#>")
## -----------------------------------------------------------------------------
library(conStruct)
data(conStruct.data)
## ----eval=FALSE--------------------------------------------... | /inst/doc/run-conStruct.R | no_license | cran/conStruct | R | false | false | 2,788 | r | ## ---- echo = FALSE------------------------------------------------------------
knitr::opts_chunk$set(collapse = TRUE, comment = "#>")
## -----------------------------------------------------------------------------
library(conStruct)
data(conStruct.data)
## ----eval=FALSE--------------------------------------------... |
## This is is one of several files containing scripts and functions used in processing and analysis of data for Matthew Dufort's Ph.D. dissertation at the University of Minnesota, titled "Coexistence, Ecomorphology, and Diversification in the Avian Family Picidae (Woodpeckers and Allies)."
## this file contains script... | /Automated_subclade_analyses.R | no_license | mjdufort/dissertation_code | R | false | false | 103,438 | r | ## This is is one of several files containing scripts and functions used in processing and analysis of data for Matthew Dufort's Ph.D. dissertation at the University of Minnesota, titled "Coexistence, Ecomorphology, and Diversification in the Avian Family Picidae (Woodpeckers and Allies)."
## this file contains script... |
library(ape)
testtree <- read.tree("4429_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="4429_0_unrooted.txt") | /codeml_files/newick_trees_processed/4429_0/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 135 | r | library(ape)
testtree <- read.tree("4429_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="4429_0_unrooted.txt") |
#'---
#'author: "Thomas Goossens (CRA-W) - t.goossens@cra.wallonie.be"
#'output:
#' html_document:
#' theme: default
#' toc: false
#' toc_depth: 6
#' toc_float:
#' collapsed: false
#' smooth_scroll: true
#' md_document:
#' theme: default
#' toc: false
#' toc_depth: 6
#' toc_float:
#... | /R/benchmark.hourly_sets.R | no_license | pokyah/agrometeor-spatial-benchmarking | R | false | false | 4,410 | r | #'---
#'author: "Thomas Goossens (CRA-W) - t.goossens@cra.wallonie.be"
#'output:
#' html_document:
#' theme: default
#' toc: false
#' toc_depth: 6
#' toc_float:
#' collapsed: false
#' smooth_scroll: true
#' md_document:
#' theme: default
#' toc: false
#' toc_depth: 6
#' toc_float:
#... |
test_that("Checking show_segmatrix ggplot class", {
result <- show_segmatrix(epcdata)
expect_is(result, 'ggplot')
})
test_that("Checking show_segmatrix plotly class", {
result <- show_segmatrix(epcdata, plotly = T)
expect_is(result, 'plotly')
})
| /tests/testthat/test-show_segmatrix.R | permissive | tbep-tech/tbeptools | R | false | false | 255 | r | test_that("Checking show_segmatrix ggplot class", {
result <- show_segmatrix(epcdata)
expect_is(result, 'ggplot')
})
test_that("Checking show_segmatrix plotly class", {
result <- show_segmatrix(epcdata, plotly = T)
expect_is(result, 'plotly')
})
|
draw.bubble.arc <-
function(mat,proportions,rescale,inches,...){
# the proportions is a matrix of the same dimention as mat, with the each element
# reprenting the proportion within each cell of mat
nx <- ncol(mat)
ny <- nrow(mat)
if(rescale){
inches.mat <- inches*sqrt(mat/rescale) # beca... | /R-libraries/myUtilities/R/draw.bubble.arc.R | no_license | jyqalan/myUtilities | R | false | false | 1,071 | r | draw.bubble.arc <-
function(mat,proportions,rescale,inches,...){
# the proportions is a matrix of the same dimention as mat, with the each element
# reprenting the proportion within each cell of mat
nx <- ncol(mat)
ny <- nrow(mat)
if(rescale){
inches.mat <- inches*sqrt(mat/rescale) # beca... |
library(ape)
testtree <- read.tree("4577_8.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="4577_8_unrooted.txt") | /codeml_files/newick_trees_processed/4577_8/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 135 | r | library(ape)
testtree <- read.tree("4577_8.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="4577_8_unrooted.txt") |
# DIRECTION TO NEXT IMAGE -------------------------------------------------
add_direction <- function() {
.exif$base <-
.exif$base %>%
dplyr::mutate(ANGLE = angles_next(LON, LAT)) %>%
tidyr::fill(ANGLE)
}
# EXIFTOOL ----------------------------------------------------------------
#' Writing exif tags... | /R/write.R | no_license | py-b/gpsinterp | R | false | false | 2,151 | r | # DIRECTION TO NEXT IMAGE -------------------------------------------------
add_direction <- function() {
.exif$base <-
.exif$base %>%
dplyr::mutate(ANGLE = angles_next(LON, LAT)) %>%
tidyr::fill(ANGLE)
}
# EXIFTOOL ----------------------------------------------------------------
#' Writing exif tags... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/f_bin.R
\name{f_bin}
\alias{f_bin}
\alias{f_bin_text}
\alias{f_bin_text_right}
\alias{f_bin_right}
\alias{ff_bin}
\alias{ff_bin_text}
\alias{ff_bin_right}
\alias{ff_bin_text_right}
\alias{f_interval}
\alias{f_interval_text}
\alias{f_interval_... | /man/f_bin.Rd | no_license | trinker/numform | R | false | true | 5,139 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/f_bin.R
\name{f_bin}
\alias{f_bin}
\alias{f_bin_text}
\alias{f_bin_text_right}
\alias{f_bin_right}
\alias{ff_bin}
\alias{ff_bin_text}
\alias{ff_bin_right}
\alias{ff_bin_text_right}
\alias{f_interval}
\alias{f_interval_text}
\alias{f_interval_... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/M2.R
\name{modelfit}
\alias{modelfit}
\title{Model fit statistics}
\usage{
modelfit(GDINA.obj, CI = 0.9, ...)
}
\arguments{
\item{GDINA.obj}{An estimated model object of class \code{GDINA}}
\item{CI}{numeric value from 0 to 1 indicating the ... | /man/modelfit.Rd | no_license | cywongnorman/GDINA | R | false | true | 1,704 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/M2.R
\name{modelfit}
\alias{modelfit}
\title{Model fit statistics}
\usage{
modelfit(GDINA.obj, CI = 0.9, ...)
}
\arguments{
\item{GDINA.obj}{An estimated model object of class \code{GDINA}}
\item{CI}{numeric value from 0 to 1 indicating the ... |
save_output <- function(output,
save_dir,
model,
n.workers,
working_dir,
implementation){
file <- file.path(save_dir, paste0(implementation, "-",
n.workers, "-",... | /R/save.R | no_license | MultiBUGS/multibugstests | R | false | false | 406 | r | save_output <- function(output,
save_dir,
model,
n.workers,
working_dir,
implementation){
file <- file.path(save_dir, paste0(implementation, "-",
n.workers, "-",... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/run.R
\name{get_current_run}
\alias{get_current_run}
\title{Get the context object for a run}
\usage{
get_current_run(allow_offline = TRUE)
}
\arguments{
\item{allow_offline}{If \code{TRUE}, allow the service context to
fall back to offline m... | /man/get_current_run.Rd | permissive | revodavid/azureml-sdk-for-r | R | false | true | 836 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/run.R
\name{get_current_run}
\alias{get_current_run}
\title{Get the context object for a run}
\usage{
get_current_run(allow_offline = TRUE)
}
\arguments{
\item{allow_offline}{If \code{TRUE}, allow the service context to
fall back to offline m... |
library(shiny)
library(plotly)
shinyServer(function(input, output, session) {
library(DiagrammeR)
library(DiagrammeRsvg)
library(rsvg)
# Create a node data frame (ndf)
ndf <- create_node_df(n = 5,
label = c("ST10", "ST20", "ST30", "ST40", "ST50"),
shape ... | /server.R | no_license | jiayi9/diagrammer | R | false | false | 1,062 | r | library(shiny)
library(plotly)
shinyServer(function(input, output, session) {
library(DiagrammeR)
library(DiagrammeRsvg)
library(rsvg)
# Create a node data frame (ndf)
ndf <- create_node_df(n = 5,
label = c("ST10", "ST20", "ST30", "ST40", "ST50"),
shape ... |
#
# This is the server logic of a Shiny web application. You can run the
# application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(shinydashboard)
library(plotly)
library(readr)
library(dplyr)
library(wordcloud)... | /Shiny/server.R | no_license | qswangstat/IMDB-Data-Analysis | R | false | false | 10,253 | r | #
# This is the server logic of a Shiny web application. You can run the
# application by clicking 'Run App' above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(shinydashboard)
library(plotly)
library(readr)
library(dplyr)
library(wordcloud)... |
# Problem 7
# https://projecteuler.net/problem=7
# By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13,
# we can see that the 6th prime is 13.
#What is the 10,001st prime number?
library(primes)
i <- 1
latest_prime <- 2
while(i < 10001) {
latest_prime <- next_prime(c(latest_prime:(latest_prime+2)))
... | /problem_7.R | no_license | kbelcher3/project_euler | R | false | false | 396 | r | # Problem 7
# https://projecteuler.net/problem=7
# By listing the first six prime numbers: 2, 3, 5, 7, 11, and 13,
# we can see that the 6th prime is 13.
#What is the 10,001st prime number?
library(primes)
i <- 1
latest_prime <- 2
while(i < 10001) {
latest_prime <- next_prime(c(latest_prime:(latest_prime+2)))
... |
x=c(1,2,3,5)
x
y=c(2,3,4,6)
plot(x,y)
length(x)
length(y)
ls()
a=matrix(data=c(1,2,3,4), nrow=2, ncol=2)
a
b=matrix(data=c(1,2,3,4),2,2,byrow=TRUE)
b
sqrt(b)
u=rnorm(50)
v=x+rnorm(50, mean=50, sd=1)
plot(u,v)
set.seed(3)
y=rnorm(100)
mean(y)
var(y)
x=rnorm(100)
y=rnorm(100)
plot(x,y)
x= seq(1,10)
x
x=seq(-pi, ... | /Practice/Ch2Intro.R | no_license | animohan/s216 | R | false | false | 622 | r | x=c(1,2,3,5)
x
y=c(2,3,4,6)
plot(x,y)
length(x)
length(y)
ls()
a=matrix(data=c(1,2,3,4), nrow=2, ncol=2)
a
b=matrix(data=c(1,2,3,4),2,2,byrow=TRUE)
b
sqrt(b)
u=rnorm(50)
v=x+rnorm(50, mean=50, sd=1)
plot(u,v)
set.seed(3)
y=rnorm(100)
mean(y)
var(y)
x=rnorm(100)
y=rnorm(100)
plot(x,y)
x= seq(1,10)
x
x=seq(-pi, ... |
load(file='output_data/GSE11121_new_exprSet.Rdata')
exprSet=new_exprSet
dim(exprSet)
colnames(phe)
group_list=phe[,1]
table(group_list)
group_list=ifelse(group_list==1,'died','lived')
library(limma)
tmp=data.frame(case=c(0,0,0,1,1,1),
control=c(1,1,1,0,0,0))
(design <- model.matrix(~0+factor(group_list)... | /GSE11121/step3-DEG.R | no_license | Zheng7AI310/GEO | R | false | false | 2,622 | r | load(file='output_data/GSE11121_new_exprSet.Rdata')
exprSet=new_exprSet
dim(exprSet)
colnames(phe)
group_list=phe[,1]
table(group_list)
group_list=ifelse(group_list==1,'died','lived')
library(limma)
tmp=data.frame(case=c(0,0,0,1,1,1),
control=c(1,1,1,0,0,0))
(design <- model.matrix(~0+factor(group_list)... |
# Created by Matthew A. Birk
# Dependencies: birk, marelac
# Converts % air saturation to other O2 units
# Last updated: Feb 2015
#' Convert Units of Oxygen
#'
#' Given the percent of oxygen compared to air-saturated water (at equilibrium with air) (i.e. percent air saturation), a list of commonly used units of oxygen... | /presens_1.0.0/presens.Rcheck/00_pkg_src/presens/R/o2_unit_conv.R | no_license | matthewabirk/presens | R | false | false | 1,836 | r | # Created by Matthew A. Birk
# Dependencies: birk, marelac
# Converts % air saturation to other O2 units
# Last updated: Feb 2015
#' Convert Units of Oxygen
#'
#' Given the percent of oxygen compared to air-saturated water (at equilibrium with air) (i.e. percent air saturation), a list of commonly used units of oxygen... |
# 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... | /RDM-04-Clustering/customTests.R | no_license | hjhsu/RDM_hj2016 | R | false | false | 2,100 | 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... |
#' Compute asymptotically linear IPTW estimators with super learning
#' for the propensity score
#'
#' @param W A \code{data.frame} of named covariates
#' @param A A \code{numeric} vector of binary treatment assignment (assumed to
#' be equal to 0 or 1)
#' @param Y A \code{numeric} numeric of continuous or binary outc... | /R/adaptive_iptw.R | permissive | kingfish777/drtmle | R | false | false | 14,114 | r | #' Compute asymptotically linear IPTW estimators with super learning
#' for the propensity score
#'
#' @param W A \code{data.frame} of named covariates
#' @param A A \code{numeric} vector of binary treatment assignment (assumed to
#' be equal to 0 or 1)
#' @param Y A \code{numeric} numeric of continuous or binary outc... |
\name{standardise}
\alias{standardise}
\title{Standardization of microarray data for clustering.}
\description{Standardisation of the expression values of every gene
is performed, so that the average expression value for each gene
is zero and the standard deviation is one.}
\usage{standardise(eset)}
\arguments{\it... | /man/standardise.Rd | no_license | iansealy/Mfuzz | R | false | false | 845 | rd | \name{standardise}
\alias{standardise}
\title{Standardization of microarray data for clustering.}
\description{Standardisation of the expression values of every gene
is performed, so that the average expression value for each gene
is zero and the standard deviation is one.}
\usage{standardise(eset)}
\arguments{\it... |
# These functions are the go-betweens between parsnip::fit (or parsnip::fit_xy)
# and the underlying model function (such as ranger::ranger). So if `fit_xy()` is
# used to fit a ranger model, there needs to be a conversion from x/y format
# data to formula/data objects and so on.
#' @importFrom stats model.frame mode... | /R/fit_helpers.R | no_license | conradbm/parsnip | R | false | false | 4,680 | r | # These functions are the go-betweens between parsnip::fit (or parsnip::fit_xy)
# and the underlying model function (such as ranger::ranger). So if `fit_xy()` is
# used to fit a ranger model, there needs to be a conversion from x/y format
# data to formula/data objects and so on.
#' @importFrom stats model.frame mode... |
#' Multiple knockoff path
#'
#' This function generates a path of selected variables using multiple knockoff
#' given the test statistics (kappa, tau)
#'
#' @param kappa A \code{p} vector of test statistics, with kappa_i = 1 indicating the original variable winning
#' @param tau A \code{p} vector of test statistics, sh... | /R/path.R | no_license | hugogogo/cheapknockoff | R | false | false | 1,444 | r | #' Multiple knockoff path
#'
#' This function generates a path of selected variables using multiple knockoff
#' given the test statistics (kappa, tau)
#'
#' @param kappa A \code{p} vector of test statistics, with kappa_i = 1 indicating the original variable winning
#' @param tau A \code{p} vector of test statistics, sh... |
library(dplyr)
#get data
url<-"https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(url, "hhpowerconsumption.zip")
unzip(zipfile="hhpowerconsumption.zip")
hh = read.delim("household_power_consumption.txt", header=TRUE, sep=";", na.strings = "?", stringsAsFactors=FALSE)
... | /plot1.R | no_license | mityan99/ExData_Plotting1 | R | false | false | 884 | r | library(dplyr)
#get data
url<-"https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
download.file(url, "hhpowerconsumption.zip")
unzip(zipfile="hhpowerconsumption.zip")
hh = read.delim("household_power_consumption.txt", header=TRUE, sep=";", na.strings = "?", stringsAsFactors=FALSE)
... |
#MCMC for Stat221 Pset4
#select the dataset to run
args <- as.numeric(commandArgs(trailingOnly = TRUE))
if(length(args) != 1) {
args[1] = 1
}
job.id = args[1]
select = 0
if (job.id > 10){
select = 1
}
library(MASS)
library(scales)
sample.data <- function(n, N, theta) {
rbinom(n, N, theta)
}
get.data <- funct... | /HW4/tianlan_mcmc.R | no_license | lantian2012/STAT221 | R | false | false | 4,212 | r | #MCMC for Stat221 Pset4
#select the dataset to run
args <- as.numeric(commandArgs(trailingOnly = TRUE))
if(length(args) != 1) {
args[1] = 1
}
job.id = args[1]
select = 0
if (job.id > 10){
select = 1
}
library(MASS)
library(scales)
sample.data <- function(n, N, theta) {
rbinom(n, N, theta)
}
get.data <- funct... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/record-batch-reader.R
\docType{class}
\name{RecordBatchReader}
\alias{RecordBatchReader}
\alias{RecordBatchStreamReader}
\alias{RecordBatchFileReader}
\title{RecordBatchReader classes}
\description{
Apache Arrow defines two formats for \href{... | /deps/arrow-0.17.1/r/man/RecordBatchReader.Rd | permissive | snowflakedb/libsnowflakeclient | R | false | true | 3,416 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/record-batch-reader.R
\docType{class}
\name{RecordBatchReader}
\alias{RecordBatchReader}
\alias{RecordBatchStreamReader}
\alias{RecordBatchFileReader}
\title{RecordBatchReader classes}
\description{
Apache Arrow defines two formats for \href{... |
.binary.seq = function (m, n)
{ rep.vector = round (2 ^ (0:(m - 1) ) )
verts = matrix (0, nrow=n, ncol=m)
for (j in 1:m)
verts [,j] = rep (c (0, 1), times=rep.vector [j], each=rep.vector [1 + m - j])
verts
}
.binary.sign = function (binary)
{ sums = apply (binary, 1, sum)
sign = rep (1L, nrow (bin... | /R/comb.prob.r | no_license | cran/empirical | R | false | false | 1,257 | r | .binary.seq = function (m, n)
{ rep.vector = round (2 ^ (0:(m - 1) ) )
verts = matrix (0, nrow=n, ncol=m)
for (j in 1:m)
verts [,j] = rep (c (0, 1), times=rep.vector [j], each=rep.vector [1 + m - j])
verts
}
.binary.sign = function (binary)
{ sums = apply (binary, 1, sum)
sign = rep (1L, nrow (bin... |
## Matrix inversion is usually a costly computation and it make sense to
## cache the inverse of a matrix rather than compute it repeatedly, so
## that when we need it again, it can be looked up in the cache rather
## than recomputed.
## The function creates a special "matrix" object that can cache its inverse.
ma... | /cachematrix.R | no_license | DyOrFly/ProgrammingAssignment2 | R | false | false | 1,122 | r | ## Matrix inversion is usually a costly computation and it make sense to
## cache the inverse of a matrix rather than compute it repeatedly, so
## that when we need it again, it can be looked up in the cache rather
## than recomputed.
## The function creates a special "matrix" object that can cache its inverse.
ma... |
\name{getSteps}
\alias{getSteps}
\title{Number of Steps of a One-Dimensional Cellular Automaton}
\description{
This method extracts the number of steps (generations) from an instance of class \code{CellularAutomaton}.
}
\details{
\code{ca$getSteps()}
}
\value{
\code{getSteps} returns an integer >= 1.
}
\a... | /man/getSteps.Rd | no_license | cran/CellularAutomaton | R | false | false | 359 | rd | \name{getSteps}
\alias{getSteps}
\title{Number of Steps of a One-Dimensional Cellular Automaton}
\description{
This method extracts the number of steps (generations) from an instance of class \code{CellularAutomaton}.
}
\details{
\code{ca$getSteps()}
}
\value{
\code{getSteps} returns an integer >= 1.
}
\a... |
##############################################################################################
# check upper atom count bounds ##############################################################
##############################################################################################
data(chemforms)
masses<-centro[[... | /inst/test_atoms.r | no_license | uweschmitt/enviMass | R | false | false | 1,880 | r | ##############################################################################################
# check upper atom count bounds ##############################################################
##############################################################################################
data(chemforms)
masses<-centro[[... |
#' Convert \code{vars::varprd} to \code{data.frame}
#'
#' @param model \code{vars::varprd} instance
#' @inheritParams fortify_base
#' @param is.date Logical frag indicates whether the \code{stats::ts} is date or not.
#' If not provided, regard the input as date when the frequency is 4 or 12.
#' @param ts.connect Logica... | /R/fortify_vars.R | no_license | richierocks/ggfortify | R | false | false | 4,107 | r | #' Convert \code{vars::varprd} to \code{data.frame}
#'
#' @param model \code{vars::varprd} instance
#' @inheritParams fortify_base
#' @param is.date Logical frag indicates whether the \code{stats::ts} is date or not.
#' If not provided, regard the input as date when the frequency is 4 or 12.
#' @param ts.connect Logica... |
\name{idw}
\alias{idw}
\title{Inverse-distance weighted smoothing of observations at irregular points}
\description{
Performs spatial smoothing of numeric values observed
at a set of irregular locations using inverse-distance weighting.
}
\usage{
idw(X, power=2, at=c("pixels", "points"), ..., se=FALSE)
}
\arguments... | /man/idw.Rd | no_license | spatstat/spatstat.core | R | false | false | 4,984 | rd | \name{idw}
\alias{idw}
\title{Inverse-distance weighted smoothing of observations at irregular points}
\description{
Performs spatial smoothing of numeric values observed
at a set of irregular locations using inverse-distance weighting.
}
\usage{
idw(X, power=2, at=c("pixels", "points"), ..., se=FALSE)
}
\arguments... |
batch.file.initial.lines<-c(
"#!/bin/bash",
"#SBATCH --job-name=spueuc",
"#SBATCH --time=96:00:00",
"#SBATCH --nodes=1",
#"#SBATCH --ntasks-per-node=20",
"#SBATCH --cpus-per-task=1",
"#SBATCH --mem=2500",
"",
"module load R/3.4.0"
)
if(Sys.info()["sysname"]=="Linux"){
# wd<-"/data/kim079/model_opt... | /multi-site_study/scripts/SPUE/SPUE_generic_sites_seeds_upcov_gen_bat.r | no_license | shaunkim079/SPUE | R | false | false | 2,724 | r | batch.file.initial.lines<-c(
"#!/bin/bash",
"#SBATCH --job-name=spueuc",
"#SBATCH --time=96:00:00",
"#SBATCH --nodes=1",
#"#SBATCH --ntasks-per-node=20",
"#SBATCH --cpus-per-task=1",
"#SBATCH --mem=2500",
"",
"module load R/3.4.0"
)
if(Sys.info()["sysname"]=="Linux"){
# wd<-"/data/kim079/model_opt... |
###################################################
### code chunk number 1: RUNFIRST
###################################################
library(MARSS)
options(width = 60)
options(prompt = " ", continue = " ")
op <- par(no.readonly = TRUE)
| /inst/userguide/figures/CS5--RUNFIRST.R | permissive | nwfsc-timeseries/MARSS | R | false | false | 243 | r | ###################################################
### code chunk number 1: RUNFIRST
###################################################
library(MARSS)
options(width = 60)
options(prompt = " ", continue = " ")
op <- par(no.readonly = TRUE)
|
##chapter 4
library(readr)
#read csv data
ozone = read_csv('US EPA data 2017.csv')
#replace space as . for columns name
names(ozone) <- make.names(names(ozone))
#check numbers of rows and columns
nrow(ozone)
ncol(ozone)
#check detail of the data set
str(ozone)
#look at top and bottom of the data
head(ozone)
tai... | /code_portfolio/week2/EDA_checlist.R | no_license | lydiakan310/analytic | R | false | false | 938 | r | ##chapter 4
library(readr)
#read csv data
ozone = read_csv('US EPA data 2017.csv')
#replace space as . for columns name
names(ozone) <- make.names(names(ozone))
#check numbers of rows and columns
nrow(ozone)
ncol(ozone)
#check detail of the data set
str(ozone)
#look at top and bottom of the data
head(ozone)
tai... |
# CART trees similar & slightly worse than log reg
# Much easier to understand
# Selects only significant variables
library(rpart)
library(rpart.plot)
# Regression Tree
# Remove method = "class" for numerical regression output
# add cp or minbucket to adjust tree
CARTmodel = rpart(targetfield ~ inputfields, data=datas... | /Common Scripts/CART_trees.R | no_license | umarmf/AnalyticsEdgeAssignments | R | false | false | 640 | r | # CART trees similar & slightly worse than log reg
# Much easier to understand
# Selects only significant variables
library(rpart)
library(rpart.plot)
# Regression Tree
# Remove method = "class" for numerical regression output
# add cp or minbucket to adjust tree
CARTmodel = rpart(targetfield ~ inputfields, data=datas... |
#' recodeTable Function
#'
#' This function allows us to create recode table
#' @param
#' @keywords
#' @export
#' @examples
#' recodeTable()
recodeTable <- function(df,path){
# column name to camel case
names(df) <- rapportools::tocamel(tolower(names(df)), upper=FALSE)
# summary stats
sumStats<-psych::des... | /R/recodeTable.R | no_license | yubinx/dataPrepAid | R | false | false | 1,497 | r | #' recodeTable Function
#'
#' This function allows us to create recode table
#' @param
#' @keywords
#' @export
#' @examples
#' recodeTable()
recodeTable <- function(df,path){
# column name to camel case
names(df) <- rapportools::tocamel(tolower(names(df)), upper=FALSE)
# summary stats
sumStats<-psych::des... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.