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 |
|---|---|---|---|---|---|---|---|---|---|
## Get likelihood given observations of the extant species
GetLogLikelihoodExtantGivenMarginals <- function(Extant,MarginalProbs){
NReps <- dim(Extant)[1]
SumExtant <- apply(Extant,2,sum)
LogLikeli <- SumExtant*log(MarginalProbs)+(NReps-SumExtant)*log(1.0-MarginalProbs)
LogLikeli[is.nan(LogLikeli)] <- 0
retur... | /artificial networks/BN-Likelihoods.R | no_license | JohnLlewelyn/Inferring-networks-and-modelling-trophic-cascades | R | false | false | 2,900 | r | ## Get likelihood given observations of the extant species
GetLogLikelihoodExtantGivenMarginals <- function(Extant,MarginalProbs){
NReps <- dim(Extant)[1]
SumExtant <- apply(Extant,2,sum)
LogLikeli <- SumExtant*log(MarginalProbs)+(NReps-SumExtant)*log(1.0-MarginalProbs)
LogLikeli[is.nan(LogLikeli)] <- 0
retur... |
# this script plots the PR counties and will eventually add the ARIA dammage points for Hurriacane Maria
print("starting")
# first, add some libraries
library(sp)
library(raster)
library(rgdal)
library(maptools)
# partial path to the ARIA data
path_vec_east <- c("20170921_1014z_PuertoRico_S1_DPM_NASA_ARIA_v0.4_geoti... | /ARIA_hurricane_maria_analysis_v2.R | no_license | mschwaller/R_code | R | false | false | 3,856 | r | # this script plots the PR counties and will eventually add the ARIA dammage points for Hurriacane Maria
print("starting")
# first, add some libraries
library(sp)
library(raster)
library(rgdal)
library(maptools)
# partial path to the ARIA data
path_vec_east <- c("20170921_1014z_PuertoRico_S1_DPM_NASA_ARIA_v0.4_geoti... |
diagram.levels <-
function (x, perm = FALSE)
{
po <- x & (1L - t(x))
diag(po) <- 0L
for (i in seq_len(ncol(po))) {
tmp <- outer(po[, i], po[i, ], pmin.int)
po <- pmin(po, (1L - tmp))
}
if (isTRUE(sum(po) > 0L) == TRUE) {
if (requireNamespace("Rgraphviz", quietly = TRUE)) {
... | /R/diagram.levels.R | no_license | keinstein/multiplex | R | false | false | 1,823 | r | diagram.levels <-
function (x, perm = FALSE)
{
po <- x & (1L - t(x))
diag(po) <- 0L
for (i in seq_len(ncol(po))) {
tmp <- outer(po[, i], po[i, ], pmin.int)
po <- pmin(po, (1L - tmp))
}
if (isTRUE(sum(po) > 0L) == TRUE) {
if (requireNamespace("Rgraphviz", quietly = TRUE)) {
... |
library(shiny)
# Define UI for slider demo application
shinyUI(pageWithSidebar(
# Application title
headerPanel("Pesquisa Sobre Humanização e Papel de Gatos no Domicílio (PSHPGD) usando Shiny Survey Tool v.02"),
sidebarPanel(
# This is intentionally an empty object.
h6(textOutput("save.results")),... | /RMARKDOWN/WEB_APP/OUTROS/EXEMPLOS/WEB_SURVEY_PIMENTA/ui.R | no_license | eupimenta/textmining_pt | R | false | false | 1,432 | r | library(shiny)
# Define UI for slider demo application
shinyUI(pageWithSidebar(
# Application title
headerPanel("Pesquisa Sobre Humanização e Papel de Gatos no Domicílio (PSHPGD) usando Shiny Survey Tool v.02"),
sidebarPanel(
# This is intentionally an empty object.
h6(textOutput("save.results")),... |
# helpers for data frame conversion in `get_video_details()`
conditional_unnest_wider <- function(data_input, var) {
if (var %in% names(data_input)) {
tidyr::unnest_wider(data_input, var, names_sep = "_")
} else {
data_input
}
}
json_to_df <- function(res) {
intermediate <- res %>%
tibble::enframe... | /R/get_video_details.R | permissive | vishalbelsare/tuber | R | false | false | 4,565 | r | # helpers for data frame conversion in `get_video_details()`
conditional_unnest_wider <- function(data_input, var) {
if (var %in% names(data_input)) {
tidyr::unnest_wider(data_input, var, names_sep = "_")
} else {
data_input
}
}
json_to_df <- function(res) {
intermediate <- res %>%
tibble::enframe... |
# This file is generated by make.paws. Please do not edit here.
#' @importFrom paws.common new_handlers new_service set_config
NULL
#' AWS App Mesh
#'
#' @description
#' AWS App Mesh is a service mesh based on the Envoy proxy that makes it
#' easy to monitor and control microservices. App Mesh standardizes how
#' your... | /cran/paws.networking/R/appmesh_service.R | permissive | jcheng5/paws | R | false | false | 7,132 | r | # This file is generated by make.paws. Please do not edit here.
#' @importFrom paws.common new_handlers new_service set_config
NULL
#' AWS App Mesh
#'
#' @description
#' AWS App Mesh is a service mesh based on the Envoy proxy that makes it
#' easy to monitor and control microservices. App Mesh standardizes how
#' your... |
library(dplyr)
library(lubridate)
generatePlot <- function() {
powerData <- generateDateTimeData()
globalData <- as.numeric(as.character(powerData$Global_active_power))
png("plot2.png" , width = 480, height = 480)
plot(
powerData$DateTime,
globalData,
type = "l",
xlab = "",
ylab = "Global... | /plot2.R | no_license | JohnnyC08/ExData_Plotting1 | R | false | false | 729 | r | library(dplyr)
library(lubridate)
generatePlot <- function() {
powerData <- generateDateTimeData()
globalData <- as.numeric(as.character(powerData$Global_active_power))
png("plot2.png" , width = 480, height = 480)
plot(
powerData$DateTime,
globalData,
type = "l",
xlab = "",
ylab = "Global... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/oulad.R
\docType{data}
\name{vle}
\alias{vle}
\title{Virtual Learning Environment (VLE) struture data from OULAD dataset}
\format{A data frame with 6364 rows and 6 variables:
\describe{
\item{id_site}{Unique "resource" identifier}
\item... | /man/vle.Rd | no_license | Joshuahii0521/oulad-1 | R | false | true | 1,196 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/oulad.R
\docType{data}
\name{vle}
\alias{vle}
\title{Virtual Learning Environment (VLE) struture data from OULAD dataset}
\format{A data frame with 6364 rows and 6 variables:
\describe{
\item{id_site}{Unique "resource" identifier}
\item... |
## Caching the inverse of a matrix
## makeCacheMatrix creates a special "matrix", which is a list containing a function to
## set the value of the matrix, get the value of the matrix
## set the value of the inverse, get the value of the inverse
makeCacheMatrix <- function(x = matrix()) {
m<-NULL
set<-function(y){... | /cachematrix.R | no_license | ashwathi-ravindran/ProgrammingAssignment2 | R | false | false | 1,105 | r | ## Caching the inverse of a matrix
## makeCacheMatrix creates a special "matrix", which is a list containing a function to
## set the value of the matrix, get the value of the matrix
## set the value of the inverse, get the value of the inverse
makeCacheMatrix <- function(x = matrix()) {
m<-NULL
set<-function(y){... |
rm(list = ls());
load("figures/section3/data_setup_hetero.RData");
### create a grid for beta_gamma_2 & beta_lambda_2 and check for identifiablity
bg2_grid <- bl2_grid <- seq(-6,6,length.out = 30);
time_grid <- c(10,30,90);
num_particles <- 2**6; ##
### use csmc until the final choice is made
csmc_config <- list(n... | /figures/section3/generate_grid_hetero_slopes.R | no_license | nianqiaoju/agents | R | false | false | 1,836 | r | rm(list = ls());
load("figures/section3/data_setup_hetero.RData");
### create a grid for beta_gamma_2 & beta_lambda_2 and check for identifiablity
bg2_grid <- bl2_grid <- seq(-6,6,length.out = 30);
time_grid <- c(10,30,90);
num_particles <- 2**6; ##
### use csmc until the final choice is made
csmc_config <- list(n... |
plot4<-function(wd){
setwd(wd)
if(!file.exists('data.zip')){
url<-"http://archive.ics.uci.edu/ml/machine-learning-databases/00235/household_power_consumption.zip"
download.file(url,destfile = "data.zip")
unzip("data.zip")
}
raw_ds<-read.csv(file = 'household_power_consumption.tx... | /plot4.R | no_license | hender1288/Exploratory_Data_Analysis_Course_Project_1 | R | false | false | 1,619 | r | plot4<-function(wd){
setwd(wd)
if(!file.exists('data.zip')){
url<-"http://archive.ics.uci.edu/ml/machine-learning-databases/00235/household_power_consumption.zip"
download.file(url,destfile = "data.zip")
unzip("data.zip")
}
raw_ds<-read.csv(file = 'household_power_consumption.tx... |
rm(list=ls())
library(h2o)
#install.packages("dplyr")
library(dplyr)
# STEP 1
h2o.init()
# H2O cluster total memory: 0.10 GB
# H2O cluster total cores: 2
# H2O cluster allowed cores: 2
# Rtaing predicted - regression
cacao_url <- "http://coursera.h2o.ai/cacao.882.csv"
cacao <- h2o.importFile(path = cacao_url, ... | /python_h2o/Assignment_Review/Assignment2_review.R | no_license | timwu64/Python-for-Data-Science-for-Beginners | R | false | false | 2,036 | r | rm(list=ls())
library(h2o)
#install.packages("dplyr")
library(dplyr)
# STEP 1
h2o.init()
# H2O cluster total memory: 0.10 GB
# H2O cluster total cores: 2
# H2O cluster allowed cores: 2
# Rtaing predicted - regression
cacao_url <- "http://coursera.h2o.ai/cacao.882.csv"
cacao <- h2o.importFile(path = cacao_url, ... |
require(shiny)
require(bs4Dash)
require(DT)
require(shinycssloaders)
require(readxl)
require(dplyr)
require(reshape2)
require(data.table)
require(formattable)
require(writexl)
require(highcharter)
require(plotly)
library(anomalize)
library(strucchange)
library(tidyverse)
list.files(path = "src", pattern = ".R$", f... | /global.R | no_license | guilhermeagsouza/dashboard-previsao-abril | R | false | false | 8,782 | r | require(shiny)
require(bs4Dash)
require(DT)
require(shinycssloaders)
require(readxl)
require(dplyr)
require(reshape2)
require(data.table)
require(formattable)
require(writexl)
require(highcharter)
require(plotly)
library(anomalize)
library(strucchange)
library(tidyverse)
list.files(path = "src", pattern = ".R$", f... |
simp.div = function(x) {
1/sum((x/sum(x))^2)
}
| /pfxr/R/simp.R | no_license | NCEAS/pfx-commercial | R | false | false | 49 | r | simp.div = function(x) {
1/sum((x/sum(x))^2)
}
|
## Write a short comment describing this function
## makeCacheMatrix:
## Return the special vector of four functions:
## 1. set: set the value of the vector
## 2. get: get the value of the vector
## 3. set_: set the value of the inverse
## 4. get_: get the value of the inverse
makeCacheMatrix <- function(x = matrix... | /cachematrix.R | no_license | FFTG/ProgrammingAssignment2 | R | false | false | 935 | r | ## Write a short comment describing this function
## makeCacheMatrix:
## Return the special vector of four functions:
## 1. set: set the value of the vector
## 2. get: get the value of the vector
## 3. set_: set the value of the inverse
## 4. get_: get the value of the inverse
makeCacheMatrix <- function(x = matrix... |
#' Converting HS and NAICS Codes
#'
#' Concords Harmonized System codes (HS0, HS1, HS2, HS3, HS4, HS5, HS combined) to and from North American Industry Classification System codes (NAICS2002, NAICS2007, NAICS2012, NAICS2017, NAICS combined).
#'
#' @param sourcevar An input character vector of HS or NAICS codes. The fun... | /R/concord_hs_naics.R | no_license | syyunn/concordance | R | false | false | 30,353 | r | #' Converting HS and NAICS Codes
#'
#' Concords Harmonized System codes (HS0, HS1, HS2, HS3, HS4, HS5, HS combined) to and from North American Industry Classification System codes (NAICS2002, NAICS2007, NAICS2012, NAICS2017, NAICS combined).
#'
#' @param sourcevar An input character vector of HS or NAICS codes. The fun... |
#' Secure evaluation
#'
#' Evaluate in a sandboxed environment.
#'
#' This function creates a fork, then sets rlimits, uid, gid, priority,
#' apparmor profile where specified, and then evaluates the expression
#' inside the fork. The return object of the evaluation is copied to
#' the parent process and returned by... | /R/eval.secure.R | no_license | ereztourjeman/RAppArmor | R | false | false | 7,283 | r | #' Secure evaluation
#'
#' Evaluate in a sandboxed environment.
#'
#' This function creates a fork, then sets rlimits, uid, gid, priority,
#' apparmor profile where specified, and then evaluates the expression
#' inside the fork. The return object of the evaluation is copied to
#' the parent process and returned by... |
\name{cancertrt}
\alias{cancertrt}
\docType{data}
\title{
Survival time based on two treatments
}
\description{
Survival times (in days) for undergoing standard treatment (S)
and a new treatment (N).
}
\usage{data("cancertrt")}
\format{
A data frame with 17 observations on the following 3 variables.
\describe{
... | /man/cancertrt.Rd | no_license | kloke/npsm | R | false | false | 702 | rd | \name{cancertrt}
\alias{cancertrt}
\docType{data}
\title{
Survival time based on two treatments
}
\description{
Survival times (in days) for undergoing standard treatment (S)
and a new treatment (N).
}
\usage{data("cancertrt")}
\format{
A data frame with 17 observations on the following 3 variables.
\describe{
... |
pacman::p_load(data.table)
SourceData = normalizePath(file.path('../../../SourceData/'))
output.dir = normalizePath(file.path('./1-parse-SourceData/outputs/'))
extra_input.dir = normalizePath(file.path('./1-parse-SourceData/extra_inputs'))
unlink(file.path(output.dir,'*.csv'))
file.copy(list.files(extra_input.dir,patte... | /RTS_Data/FormattedData/PLEXOS/Create_PLEXOS_database/1-parse-SourceData/parse_rts.R | no_license | Tom-Nudell/RTS-GMLC | R | false | false | 10,088 | r | pacman::p_load(data.table)
SourceData = normalizePath(file.path('../../../SourceData/'))
output.dir = normalizePath(file.path('./1-parse-SourceData/outputs/'))
extra_input.dir = normalizePath(file.path('./1-parse-SourceData/extra_inputs'))
unlink(file.path(output.dir,'*.csv'))
file.copy(list.files(extra_input.dir,patte... |
# Plot Vaccinations Over Time
# Gabriel Odom
# 2020-07-12
library(tidyverse)
library(lubridate)
library(readxl)
###### Helper Functions #####################################################
RollUp <- function(.x, .w, .f = mean, ...){
# Find "Rolling" values of a specified function
# Inputs:
# .x: a vector (us... | /code/plot_vaccine_uptake_20210103.R | no_license | gabrielodom/southFL_covid19_website | R | false | false | 2,645 | r | # Plot Vaccinations Over Time
# Gabriel Odom
# 2020-07-12
library(tidyverse)
library(lubridate)
library(readxl)
###### Helper Functions #####################################################
RollUp <- function(.x, .w, .f = mean, ...){
# Find "Rolling" values of a specified function
# Inputs:
# .x: a vector (us... |
#
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(shinydashboard)
library(ggplot2)
library(plotly)
source('Header.R')
source('Body.R')
source... | /app.R | no_license | awaisakram64/Sales-Envision | R | false | false | 2,395 | r | #
# This is a Shiny web application. You can run the application by clicking
# the 'Run App' button above.
#
# Find out more about building applications with Shiny here:
#
# http://shiny.rstudio.com/
#
library(shiny)
library(shinydashboard)
library(ggplot2)
library(plotly)
source('Header.R')
source('Body.R')
source... |
library(openintro)
data(COL)
obs1 <- c(94.26, 79.54, 68.06, 63.96, 68.19, 89.73, 85.41, 76.29, 87.96, 87.32, 77.23, 58.01, 82.76, 80.17, 111.07, 88.07, 68.12, 87.58, 78.14, 39.64, 54.84, 84.88, 77.49, 91.56, 112.59, 97.78, 92.86, 100.78, 88.17, 71.69, 86.64, 80.79, 64.77, 103.2, 84.88, 69.51, 60.65, 68.41, 80.48, 71.3... | /figures02/normalQuantileExer/normalQuantileExer.R | permissive | Cstats-learner/statistics | R | false | false | 6,070 | r | library(openintro)
data(COL)
obs1 <- c(94.26, 79.54, 68.06, 63.96, 68.19, 89.73, 85.41, 76.29, 87.96, 87.32, 77.23, 58.01, 82.76, 80.17, 111.07, 88.07, 68.12, 87.58, 78.14, 39.64, 54.84, 84.88, 77.49, 91.56, 112.59, 97.78, 92.86, 100.78, 88.17, 71.69, 86.64, 80.79, 64.77, 103.2, 84.88, 69.51, 60.65, 68.41, 80.48, 71.3... |
#' @name FuzzySet
#' @title Mathematical Fuzzy Set
#' @family sets
#' @description A general FuzzySet object for mathematical fuzzy sets, inheriting from `Set`.
#'
#' @details
#' Fuzzy sets generalise standard mathematical sets to allow for fuzzy relationships. Whereas a
#' standard, or crisp, set assumes that an eleme... | /R/Set_FuzzySet.R | permissive | xoopR/set6 | R | false | false | 13,706 | r | #' @name FuzzySet
#' @title Mathematical Fuzzy Set
#' @family sets
#' @description A general FuzzySet object for mathematical fuzzy sets, inheriting from `Set`.
#'
#' @details
#' Fuzzy sets generalise standard mathematical sets to allow for fuzzy relationships. Whereas a
#' standard, or crisp, set assumes that an eleme... |
############################################################################
############################################################################
## ##
## Erika's normalization calculation and data-quality checking ##
## with extra comments add by Pete Ditchfield to describe the
##... | /comented script.R | no_license | Mesolith/Isotope-normalisation | R | false | false | 19,752 | r |
############################################################################
############################################################################
## ##
## Erika's normalization calculation and data-quality checking ##
## with extra comments add by Pete Ditchfield to describe the
##... |
testlist <- list(G = numeric(0), Rn = numeric(0), atmp = numeric(0), ra = numeric(0), relh = c(-3.68257182064632e+302, NaN, 5.43230922486616e-312, 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), rs = numeric(0), temp = c(0, -5.48612406879369e+303, NaN, 1.25986739689... | /meteor/inst/testfiles/ET0_PenmanMonteith/libFuzzer_ET0_PenmanMonteith/ET0_PenmanMonteith_valgrind_files/1612737181-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 1,078 | r | testlist <- list(G = numeric(0), Rn = numeric(0), atmp = numeric(0), ra = numeric(0), relh = c(-3.68257182064632e+302, NaN, 5.43230922486616e-312, 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), rs = numeric(0), temp = c(0, -5.48612406879369e+303, NaN, 1.25986739689... |
#' AdaOpt classifier
#'
#' @param n_iterations number of iterations of the optimizer at training time
#' @param learning_rate controls the speed of the optimizer at training time
#' @param reg_lambda L2 regularization parameter for successive errors in the optimizer (at training time)
#' @param reg_alpha L1 regulari... | /R-package/R/adaopt.R | permissive | han-tun/mlsauce | R | false | false | 2,980 | r |
#' AdaOpt classifier
#'
#' @param n_iterations number of iterations of the optimizer at training time
#' @param learning_rate controls the speed of the optimizer at training time
#' @param reg_lambda L2 regularization parameter for successive errors in the optimizer (at training time)
#' @param reg_alpha L1 regulari... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/optimizers.R
\name{average_grad}
\alias{average_grad}
\title{Average_grad}
\usage{
average_grad(p, mom, dampening = FALSE, grad_avg = NULL, ...)
}
\arguments{
\item{p}{p}
\item{mom}{momentum}
\item{dampening}{dampening}
\item{grad_avg}{gra... | /man/average_grad.Rd | permissive | Cdk29/fastai | R | false | true | 460 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/optimizers.R
\name{average_grad}
\alias{average_grad}
\title{Average_grad}
\usage{
average_grad(p, mom, dampening = FALSE, grad_avg = NULL, ...)
}
\arguments{
\item{p}{p}
\item{mom}{momentum}
\item{dampening}{dampening}
\item{grad_avg}{gra... |
## makeCacheMatrix creates a matrix object that caches it's own inverse
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setInverse <- function(solve) m <<- solve
getInverse <- function() m
list(set = set,
g... | /cachematrix.R | no_license | mturnbo/ProgrammingAssignment2 | R | false | false | 729 | r | ## makeCacheMatrix creates a matrix object that caches it's own inverse
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
}
get <- function() x
setInverse <- function(solve) m <<- solve
getInverse <- function() m
list(set = set,
g... |
#!/usr/bin/env Rscript
######
# This script will compile all of the results of the heritability estimates run using
# Mark's heritiability program.
# To run from command line:
# 1. path to the heritability files
# 2. the end of the name of the heritability files
# 3. the folder you want the files this script generat... | /analyze_heritabilities_from_GTAM_061914ERD.R | no_license | DuyDN/bQTL | R | false | false | 4,367 | r | #!/usr/bin/env Rscript
######
# This script will compile all of the results of the heritability estimates run using
# Mark's heritiability program.
# To run from command line:
# 1. path to the heritability files
# 2. the end of the name of the heritability files
# 3. the folder you want the files this script generat... |
library(tidyverse)
d0_f <- read.csv("./data/raw/Baby mental life: Study 2 - WOMEN_September 5, 2018_15.59.csv")
d0_m <- read.csv("./data/raw/Baby mental life: Study 2 - MEN_September 5, 2018_16.01.csv")
d0 <- full_join(d0_f, d0_m)
# get rid of repeating GPS coordinates
repeat_gps <- d0 %>%
select(starts_with("Loca... | /study 2/scripts/deidentify.R | no_license | kgweisman/baby_mental_life | R | false | false | 1,299 | r | library(tidyverse)
d0_f <- read.csv("./data/raw/Baby mental life: Study 2 - WOMEN_September 5, 2018_15.59.csv")
d0_m <- read.csv("./data/raw/Baby mental life: Study 2 - MEN_September 5, 2018_16.01.csv")
d0 <- full_join(d0_f, d0_m)
# get rid of repeating GPS coordinates
repeat_gps <- d0 %>%
select(starts_with("Loca... |
context("environments")
test_that("can't see environment of caller", {
skip_on_cran()
z <- "don't touch me"
ret <- reprex(z, show = FALSE)
expect_match(ret, "object 'z' not found", all = FALSE)
})
test_that("reprex doesn't write into environment of caller", {
skip_on_cran()
z <- "don't touch me"
ret <- ... | /tests/testthat/test-env.R | permissive | romainfrancois/reprex | R | false | false | 929 | r | context("environments")
test_that("can't see environment of caller", {
skip_on_cran()
z <- "don't touch me"
ret <- reprex(z, show = FALSE)
expect_match(ret, "object 'z' not found", all = FALSE)
})
test_that("reprex doesn't write into environment of caller", {
skip_on_cran()
z <- "don't touch me"
ret <- ... |
/atelier 1.R | no_license | wz-leonie/atelier-1 | R | false | false | 678 | r | ||
\name{fDrawfigure}
\alias{fDrawfigure}
\title{
Plot the location of the random point falling within an individual's home range
}
\description{
fDrawfigure extracts either a random point or a probability weighted random point falling within a specified home range. The random point, the observed locations, the spec... | /man/fDrawfigure.Rd | no_license | cran/Digiroo2 | R | false | false | 1,951 | rd | \name{fDrawfigure}
\alias{fDrawfigure}
\title{
Plot the location of the random point falling within an individual's home range
}
\description{
fDrawfigure extracts either a random point or a probability weighted random point falling within a specified home range. The random point, the observed locations, the spec... |
# load SIT package
# Install curl
install.packages('curl', repos = 'http://cran.r-project.org')
install.packages("devtools",dependencies = TRUE)
#first install SIT.date
devtools::install_github('systematicinvestor/SIT.date')
library(curl)
curl_download('https://github.com/systematicinvestor/SIT/raw/master/SIT.tar.gz',... | /loadSIT.R | no_license | RadhikaKalaiselvan/Craps_game | R | false | false | 414 | r | # load SIT package
# Install curl
install.packages('curl', repos = 'http://cran.r-project.org')
install.packages("devtools",dependencies = TRUE)
#first install SIT.date
devtools::install_github('systematicinvestor/SIT.date')
library(curl)
curl_download('https://github.com/systematicinvestor/SIT/raw/master/SIT.tar.gz',... |
#' **File:** `1_extract_mirna_info_from_core_output.R`
#'
#' **Directory Code:** `/mnt/research/pigeqtl/analyses/microRNA/2_mirna_characterization_expression/1_extract_mirna_info_from_core_output/scripts/`
#'
#' **Date:** 1/26/16
#'
#' **Description:** This code extracts the miRDeep2 core module output from the `... | /1_extract_mirna_info_from_core_output/scripts/1_extract_mirna_info_from_core_output.R | no_license | perrykai/scripts_2_mirna_characterization_expression | R | false | false | 4,630 | r | #' **File:** `1_extract_mirna_info_from_core_output.R`
#'
#' **Directory Code:** `/mnt/research/pigeqtl/analyses/microRNA/2_mirna_characterization_expression/1_extract_mirna_info_from_core_output/scripts/`
#'
#' **Date:** 1/26/16
#'
#' **Description:** This code extracts the miRDeep2 core module output from the `... |
## Put comments here that give an overall description of what your
## functions do
## Two functions that combined solve and store the inverse of a square invertible matrix.
## Write a short comment describing this function
## First the function to set and get the inverse matrices into memory.
makeCacheMatrix ... | /cachematrix.R | no_license | benva82/ProgrammingAssignment2 | R | false | false | 1,641 | r | ## Put comments here that give an overall description of what your
## functions do
## Two functions that combined solve and store the inverse of a square invertible matrix.
## Write a short comment describing this function
## First the function to set and get the inverse matrices into memory.
makeCacheMatrix ... |
#SCRIPT FOR MANIPULATING SMN RECEIVERS INFOR
#1. lOAD DATA
if(!exists('handl_OneDrive')) source('C:/Users/myb/OneDrive - Department of Primary Industries and Regional Development/Matias/Analyses/SOURCE_SCRIPTS/Git_other/handl_OneDrive.R')
setwd(handl_OneDrive("Data/Tagging/Acoustic_tagging/Acoustic_tagging_data/... | /4.SubsetSMN_all_receivers.R | no_license | JuanMatiasBraccini/Git_shark_acoustic | R | false | false | 1,448 | r | #SCRIPT FOR MANIPULATING SMN RECEIVERS INFOR
#1. lOAD DATA
if(!exists('handl_OneDrive')) source('C:/Users/myb/OneDrive - Department of Primary Industries and Regional Development/Matias/Analyses/SOURCE_SCRIPTS/Git_other/handl_OneDrive.R')
setwd(handl_OneDrive("Data/Tagging/Acoustic_tagging/Acoustic_tagging_data/... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Add_custom_vcfs.R
\name{parse_vcf_query_into_db}
\alias{parse_vcf_query_into_db}
\title{parse_vcf_query_into_db
This function adds the variants of parsed custom CCLs to a monet DB instance}
\usage{
parse_vcf_query_into_db(
g_query,
ref_ge... | /man/parse_vcf_query_into_db.Rd | no_license | RaikOtto/Uniquorn | R | false | true | 1,031 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Add_custom_vcfs.R
\name{parse_vcf_query_into_db}
\alias{parse_vcf_query_into_db}
\title{parse_vcf_query_into_db
This function adds the variants of parsed custom CCLs to a monet DB instance}
\usage{
parse_vcf_query_into_db(
g_query,
ref_ge... |
#This is the file used to set variables to be used in analysis, as well as to run the analysis.
#Make sure *_analysis.R, *_report.R, *_report.Rmd, *_functions.R, and *_plot.R are all in the same folder as this file.
#Model the setup shown in this file, then run this file from the console using source('This file's direc... | /_scripts/paper_6/paper_6_otitis_media_H66/paper_6_otitis_media_H66_synthetic_control_run.R | permissive | eliaseythorsson/phd_thesis | R | false | false | 3,740 | r | #This is the file used to set variables to be used in analysis, as well as to run the analysis.
#Make sure *_analysis.R, *_report.R, *_report.Rmd, *_functions.R, and *_plot.R are all in the same folder as this file.
#Model the setup shown in this file, then run this file from the console using source('This file's direc... |
context("Functions used in project")
# Initialise --------------------------------------------------------------
# North sea
params <- newMultispeciesParams(NS_species_params_gears, inter,
n = 2/3, p = 0.7, lambda = 2.8 - 2/3)
no_gear <- dim(params@catchability)[1]
no_sp <- dim(params... | /tests/testthat/test-project_methods.R | no_license | patricksykes/mizer | R | false | false | 17,620 | r | context("Functions used in project")
# Initialise --------------------------------------------------------------
# North sea
params <- newMultispeciesParams(NS_species_params_gears, inter,
n = 2/3, p = 0.7, lambda = 2.8 - 2/3)
no_gear <- dim(params@catchability)[1]
no_sp <- dim(params... |
library(PoisNonNor)
### Name: Param.fleishman
### Title: Calculates the Fleishman coefficients
### Aliases: Param.fleishman
### ** Examples
## Not run:
##D rmat = matrix(c(-0.5486,-0.2103, 0.3386, 0.9035, 1.0283, 0.9272), byrow=TRUE, ncol=2)
##D Param.fleishman(rmat)
## End(Not run)
| /data/genthat_extracted_code/PoisNonNor/examples/Param.fleishman.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 292 | r | library(PoisNonNor)
### Name: Param.fleishman
### Title: Calculates the Fleishman coefficients
### Aliases: Param.fleishman
### ** Examples
## Not run:
##D rmat = matrix(c(-0.5486,-0.2103, 0.3386, 0.9035, 1.0283, 0.9272), byrow=TRUE, ncol=2)
##D Param.fleishman(rmat)
## End(Not run)
|
#Read the data file with data for 2 days
datafile <- "./data/1_2_feb2007data.txt"
#Store the data in memory
data <- read.table(datafile, sep = ";", header = T, na.strings = "?")
#Debug statement
#head(data, 10)
#Join Date and Time column and store it as new column(Datetime)
data$Datetime <- strptime(paste(data$Date,... | /plot1.R | no_license | BalaCattavarayane/ExData_Plotting1 | R | false | false | 781 | r | #Read the data file with data for 2 days
datafile <- "./data/1_2_feb2007data.txt"
#Store the data in memory
data <- read.table(datafile, sep = ";", header = T, na.strings = "?")
#Debug statement
#head(data, 10)
#Join Date and Time column and store it as new column(Datetime)
data$Datetime <- strptime(paste(data$Date,... |
##file is saved in working directory.
##reading the file in the wd. set na.stringss to "?"
power <- read.csv("household_power_consumption.txt", sep=";", na.strings="?",stringsAsFactors =FALSE)
##getting subset of dtaa with dates 1/2/2007-2/2007
subpower <-subset(power, power$Date=="1/2/2007" | power$Date=="2/2/2007")
... | /plot2.R | no_license | garlicyeah/ExData_Plotting1 | R | false | false | 828 | r | ##file is saved in working directory.
##reading the file in the wd. set na.stringss to "?"
power <- read.csv("household_power_consumption.txt", sep=";", na.strings="?",stringsAsFactors =FALSE)
##getting subset of dtaa with dates 1/2/2007-2/2007
subpower <-subset(power, power$Date=="1/2/2007" | power$Date=="2/2/2007")
... |
testlist <- list(G = numeric(0), Rn = numeric(0), atmp = 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, 0, 0, 0, 0, 0, 0, 0, 0), ra = numeric(0), relh = -1.72131968218895e+83, rs = numeric(0), temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, ... | /meteor/inst/testfiles/ET0_PenmanMonteith/AFL_ET0_PenmanMonteith/ET0_PenmanMonteith_valgrind_files/1615838644-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 826 | r | testlist <- list(G = numeric(0), Rn = numeric(0), atmp = 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, 0, 0, 0, 0, 0, 0, 0, 0), ra = numeric(0), relh = -1.72131968218895e+83, rs = numeric(0), temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/convenience-plots.R
\name{gg_smooth}
\alias{gg_smooth}
\alias{gg_smooth.default}
\title{Plot smooth 1d terms of gam objects}
\usage{
gg_smooth(x, ...)
\method{gg_smooth}{default}(x, fit, ...)
}
\arguments{
\item{x}{A data frame or object of ... | /man/gg_smooth.Rd | permissive | adibender/pammtools | R | false | true | 845 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/convenience-plots.R
\name{gg_smooth}
\alias{gg_smooth}
\alias{gg_smooth.default}
\title{Plot smooth 1d terms of gam objects}
\usage{
gg_smooth(x, ...)
\method{gg_smooth}{default}(x, fit, ...)
}
\arguments{
\item{x}{A data frame or object of ... |
#' Get the peak list with blank samples' peaks removed
#' @param xset the xcmsset object with blank and certain group samples' data
#' @param method parameter for groupval function
#' @param intensity parameter for groupval function
#' @param file file name for further annotation, default NULL
#' @param rsdcf rsd cutof... | /R/deprecated.R | no_license | AspirinCode/enviGCMS | R | false | false | 18,509 | r | #' Get the peak list with blank samples' peaks removed
#' @param xset the xcmsset object with blank and certain group samples' data
#' @param method parameter for groupval function
#' @param intensity parameter for groupval function
#' @param file file name for further annotation, default NULL
#' @param rsdcf rsd cutof... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/export_dataframe.R
\name{export_dataframe}
\alias{export_dataframe}
\title{Make a dataframe from measures in IOTs}
\usage{
export_dataframe(measures, iots, years = NULL, long = FALSE)
}
\arguments{
\item{measures:}{vector with the names of th... | /man/export_dataframe.Rd | no_license | sybrendeuzeman/WIOD_package | R | false | true | 1,006 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/export_dataframe.R
\name{export_dataframe}
\alias{export_dataframe}
\title{Make a dataframe from measures in IOTs}
\usage{
export_dataframe(measures, iots, years = NULL, long = FALSE)
}
\arguments{
\item{measures:}{vector with the names of th... |
#' @title findAxes
#' @description Places vertices into axes
#' @details Places vertices into axes based on a clustering algorithm
#' @aliases findAxes
#' @export findAxes
#' @author Jared P. Lander
#' @importFrom igraph walktrap.community "V<-" V
#' @param graph An igraph object
#' @param func A function that returns ... | /R/findAxes.r | permissive | jaredlander/HivePlot | R | false | false | 988 | r | #' @title findAxes
#' @description Places vertices into axes
#' @details Places vertices into axes based on a clustering algorithm
#' @aliases findAxes
#' @export findAxes
#' @author Jared P. Lander
#' @importFrom igraph walktrap.community "V<-" V
#' @param graph An igraph object
#' @param func A function that returns ... |
setwd("~/Desktop/git-space/ranalysis/corpus")
library(XML)
library(tidytext)
library(dplyr)
library(stringr)
library(glue)
library(tidyverse)
# stick together the path to the file & 1st file name
hmMarked <- glue("278-words.txt", sep = " ")
words <- data_frame(file = paste0("~/Desktop/git-space/ranalysis/corpus/",
... | /278-sentiment-analysis.R | no_license | melvillesmarks/ranalysis | R | false | false | 1,917 | r |
setwd("~/Desktop/git-space/ranalysis/corpus")
library(XML)
library(tidytext)
library(dplyr)
library(stringr)
library(glue)
library(tidyverse)
# stick together the path to the file & 1st file name
hmMarked <- glue("278-words.txt", sep = " ")
words <- data_frame(file = paste0("~/Desktop/git-space/ranalysis/corpus/",
... |
#' @title Plot a suitable habitat model on a map
#' @description Plot method for \code{\link[=model.fit]{SHfit}} objects.
#' @param x \code{SHfit} object from the \code{\link{model.fit}} function.
#' @param limits Map limits. See \code{\link{basemap}}. The option "auto" (default) limits the map using coordinate range o... | /R/plot.SHfit.R | permissive | MikkoVihtakari/SuitableHabitat | R | false | false | 9,809 | r | #' @title Plot a suitable habitat model on a map
#' @description Plot method for \code{\link[=model.fit]{SHfit}} objects.
#' @param x \code{SHfit} object from the \code{\link{model.fit}} function.
#' @param limits Map limits. See \code{\link{basemap}}. The option "auto" (default) limits the map using coordinate range o... |
####################################################################################################################
#
##Name**
#
# wp_temp_yrmean_ghcn_func
#
##Description**
# Functions for calculation of annual (yr) station means and their standard deviation of entire GHCN dataset
# or clino (climatological normals)... | /src/utils/wp_temp_yrmean_ghcn_func.r | no_license | Cajusbaktus/wipro14 | R | false | false | 2,843 | r | ####################################################################################################################
#
##Name**
#
# wp_temp_yrmean_ghcn_func
#
##Description**
# Functions for calculation of annual (yr) station means and their standard deviation of entire GHCN dataset
# or clino (climatological normals)... |
installed.packages('lmtest','car')
library(lmtest)
library(tseries)
library(gmm)
#import dataset
mydata<-read.csv('stock_return.csv')
rf<-read.csv('tbill.csv')
```
#calculate excess returns
market.index=mydata$X.GSPTSE
excess.market.return=mydata$X.GSPTSE-rf
names(excess.market.return)<-c('EMR')
riskfree<-rf$tb
... | /Rscript.r | no_license | Alexjrch/Empirical-Test-on-CAPM-Fama-Macbeth- | R | false | false | 7,281 | r |
installed.packages('lmtest','car')
library(lmtest)
library(tseries)
library(gmm)
#import dataset
mydata<-read.csv('stock_return.csv')
rf<-read.csv('tbill.csv')
```
#calculate excess returns
market.index=mydata$X.GSPTSE
excess.market.return=mydata$X.GSPTSE-rf
names(excess.market.return)<-c('EMR')
riskfree<-rf$tb
... |
#' @title Prints the Mindmap.
#'
#' @description Uses the information passed down by rmd_parser to generate the Mindmap. Uses many smaller functions along the way to achieve this.
#'
#' @param rmd_info The list of information generated by rmd_parser. Contains title, filename, and the codeblocks of the Mawrkdown file.
#... | /R/PrintMap.R | no_license | Zhu-Daniel/MarTMi | R | false | false | 2,062 | r | #' @title Prints the Mindmap.
#'
#' @description Uses the information passed down by rmd_parser to generate the Mindmap. Uses many smaller functions along the way to achieve this.
#'
#' @param rmd_info The list of information generated by rmd_parser. Contains title, filename, and the codeblocks of the Mawrkdown file.
#... |
url = "https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2Factivity.zip"
download.file(url,destfile="./Data/Dataset.zip",sep="/")
unzip(zipfile="./data/Dataset.zip",exdir="./data")
?hist
hist(steps)
#hist
data <-read.csv("./data/activity.csv")
str(data)
summary(data)
daily_steps <- tapply(data$steps, data$date, ... | /Course5_ReproducibleResearch/Data/Week2 project.R | no_license | niamhdevitt/datasciencecoursera | R | false | false | 1,280 | r |
url = "https://d396qusza40orc.cloudfront.net/repdata%2Fdata%2Factivity.zip"
download.file(url,destfile="./Data/Dataset.zip",sep="/")
unzip(zipfile="./data/Dataset.zip",exdir="./data")
?hist
hist(steps)
#hist
data <-read.csv("./data/activity.csv")
str(data)
summary(data)
daily_steps <- tapply(data$steps, data$date, ... |
# Make a subset of the original dataset and preprocess the next 9 column of the dataset
second_nine <- imdb[,11:19]
# Convert plot keywords to characters
second_nine$plot_keywords <- as.character(second_nine$plot_keywords)
words <- second_nine$plot_keywords
words <- na.omit(words)
# Finding max number of string cou... | /Part_1/kevin_part.R | no_license | jaitheking/data_mining_assgment | R | false | false | 1,469 | r | # Make a subset of the original dataset and preprocess the next 9 column of the dataset
second_nine <- imdb[,11:19]
# Convert plot keywords to characters
second_nine$plot_keywords <- as.character(second_nine$plot_keywords)
words <- second_nine$plot_keywords
words <- na.omit(words)
# Finding max number of string cou... |
\name{apply.t1}
\alias{apply.t1}
\docType{data}
\title{
Apply a one sample t-test where possible
}
\description{
%% ~~ A concise (1-5 lines) description of the dataset. ~~
}
\usage{
apply.t1(v, log)
}
\format{
}
\arguments{
\item{v}{
numerical vector
}
\item{log}{
logic value, representing if take logrism of ... | /man/apply.t1.Rd | no_license | APAFbioinformatics/TMTPrePro | R | false | false | 704 | rd | \name{apply.t1}
\alias{apply.t1}
\docType{data}
\title{
Apply a one sample t-test where possible
}
\description{
%% ~~ A concise (1-5 lines) description of the dataset. ~~
}
\usage{
apply.t1(v, log)
}
\format{
}
\arguments{
\item{v}{
numerical vector
}
\item{log}{
logic value, representing if take logrism of ... |
#' Detect Application Dependencies
#'
#' Recursively detect all package dependencies for an application. This function
#' parses all .R files in the applicaition directory to determine what packages
#' the application depends on; and for each of those packages what other
#' packages they depend on.
#' @param appDir ... | /R/dependencies.R | no_license | dipanjanS/shinyapps | R | false | false | 6,406 | r | #' Detect Application Dependencies
#'
#' Recursively detect all package dependencies for an application. This function
#' parses all .R files in the applicaition directory to determine what packages
#' the application depends on; and for each of those packages what other
#' packages they depend on.
#' @param appDir ... |
## willow model application
## Jenny Rogers & Katie Irving
## packages
library(tidyverse)
library(tidyr)
library(sm)
library(lubridate) # work with dates
library(dplyr) # data manipulation (filter, summarize, mutate)
library(ggplot2) # graphics
library(gridExtra) # tile several plots next to each other
library(... | /code/Old_code/seedling/W1_LA2_willow_seedling_inundation_shear.R | no_license | ksirving/willow_model_application | R | false | false | 56,296 | r | ## willow model application
## Jenny Rogers & Katie Irving
## packages
library(tidyverse)
library(tidyr)
library(sm)
library(lubridate) # work with dates
library(dplyr) # data manipulation (filter, summarize, mutate)
library(ggplot2) # graphics
library(gridExtra) # tile several plots next to each other
library(... |
#!/usr/bin/env Rscript
# An R script to build the markdown files for my notes on the "Statistical
# Rethinking" textbook. Each notes file is a R Markdown file and will be
# presented on the website as a "post".
library(glue)
library(rmarkdown)
library(tidyverse)
library(conflicted)
conflict_prefer("filter", "dplyr")... | /build_statistical_rethinking_notes.R | permissive | jhrcook/statistical-rethinking-website | R | false | false | 6,727 | r | #!/usr/bin/env Rscript
# An R script to build the markdown files for my notes on the "Statistical
# Rethinking" textbook. Each notes file is a R Markdown file and will be
# presented on the website as a "post".
library(glue)
library(rmarkdown)
library(tidyverse)
library(conflicted)
conflict_prefer("filter", "dplyr")... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/api-utils.R
\name{get_cwl_class}
\alias{get_cwl_class}
\alias{is_commandlinetool}
\alias{is_workflow}
\title{Get class from CWL JSON file}
\usage{
get_cwl_class(input)
}
\arguments{
\item{input}{cwl json file path}
}
\value{
character for cwl... | /man/cwl-utils.Rd | permissive | lelkaklel/sevenbridges-r | R | false | true | 733 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/api-utils.R
\name{get_cwl_class}
\alias{get_cwl_class}
\alias{is_commandlinetool}
\alias{is_workflow}
\title{Get class from CWL JSON file}
\usage{
get_cwl_class(input)
}
\arguments{
\item{input}{cwl json file path}
}
\value{
character for cwl... |
#' Default XY blueprint
#'
#' This pages holds the details for the XY preprocessing blueprint. This
#' is the blueprint used by default from `mold()` if `x` and `y` are provided
#' separately (i.e. the XY interface is used).
#'
#' @inheritParams new-blueprint
#'
#' @param x A data frame or matrix containing the predict... | /R/blueprint-xy-default.R | permissive | DavisVaughan/hardhat | R | false | false | 10,168 | r | #' Default XY blueprint
#'
#' This pages holds the details for the XY preprocessing blueprint. This
#' is the blueprint used by default from `mold()` if `x` and `y` are provided
#' separately (i.e. the XY interface is used).
#'
#' @inheritParams new-blueprint
#'
#' @param x A data frame or matrix containing the predict... |
library(class)
library(dplyr)
#Load data
setwd("~/Kaggle/MNIST/MNIST-Digit-Recognition/")
mnist_train <- read.csv("./Data/train.csv")
mnist_train$label <- factor(mnist_train$label)
#PCA
mn_pix <- mnist_train[, -1]
mn_label <- mnist_train$label
mn_pca <- prcomp(mn_pix)
mnist_train <- as.data.frame(mn_pca$x)
mnist_train... | /predict_knn.R | no_license | mwakakelvin/MNIST-Digit-Recognition | R | false | false | 788 | r | library(class)
library(dplyr)
#Load data
setwd("~/Kaggle/MNIST/MNIST-Digit-Recognition/")
mnist_train <- read.csv("./Data/train.csv")
mnist_train$label <- factor(mnist_train$label)
#PCA
mn_pix <- mnist_train[, -1]
mn_label <- mnist_train$label
mn_pca <- prcomp(mn_pix)
mnist_train <- as.data.frame(mn_pca$x)
mnist_train... |
## dependent is the column name of the dependent variable
#' @name pl.2ts
#' @aliases pl.2ts
#' @title Time series plot for two variables
#' @description Plotting two time series in one plot, with title.
#' @usage pl.2ts(ts1,ts2,title)
#' @param ts1 :time series variable one
#' @param ts2 :time series variab... | /R/pl.2ts.R | no_license | cran/YRmisc | R | false | false | 637 | r |
## dependent is the column name of the dependent variable
#' @name pl.2ts
#' @aliases pl.2ts
#' @title Time series plot for two variables
#' @description Plotting two time series in one plot, with title.
#' @usage pl.2ts(ts1,ts2,title)
#' @param ts1 :time series variable one
#' @param ts2 :time series variab... |
n1 <- 2
n2 <- 3
n1
n1 + n2
n1 * n2
nSum <- n1 + n2
nProd <- n1 * n2
nSum
# we performed some basic operations on the numbers
sum(2, 3)
sum(2, 3, 4)
s1 <- sum(2, 3)
s2 <- sum(2, 3, 4)
print(s1)
funProd <- function(n1, n2)
{
n <- n1 * n2
return(n) }
funProdPrint <- function(n1, n2){
n <- n1 * n2
print(n1)
prin... | /R basics from book.R | no_license | vermakanksha/practice | R | false | false | 3,105 | r | n1 <- 2
n2 <- 3
n1
n1 + n2
n1 * n2
nSum <- n1 + n2
nProd <- n1 * n2
nSum
# we performed some basic operations on the numbers
sum(2, 3)
sum(2, 3, 4)
s1 <- sum(2, 3)
s2 <- sum(2, 3, 4)
print(s1)
funProd <- function(n1, n2)
{
n <- n1 * n2
return(n) }
funProdPrint <- function(n1, n2){
n <- n1 * n2
print(n1)
prin... |
library(bayess)
### Name: logitnoinflpost
### Title: Log of the posterior distribution for the probit model under a
### noninformative prior
### Aliases: logitnoinflpost
### Keywords: logit model generalised linear model noninformative prior
### ** Examples
data(bank)
y=bank[,5]
X=as.matrix(bank[,-5])
logitnoinfl... | /data/genthat_extracted_code/bayess/examples/logitnoinflpost.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 342 | r | library(bayess)
### Name: logitnoinflpost
### Title: Log of the posterior distribution for the probit model under a
### noninformative prior
### Aliases: logitnoinflpost
### Keywords: logit model generalised linear model noninformative prior
### ** Examples
data(bank)
y=bank[,5]
X=as.matrix(bank[,-5])
logitnoinfl... |
\name{survSNP-package}
\alias{survSNP-package}
\alias{survSNP}
\docType{package}
\title{
Power Calculations for SNP Studies with Censored Outcomes
}
\description{
This package can be used to conduct asymptotic and
empirical power and sample size calculations for Single-nucleotide
Polymorphism (SNP) association studies ... | /fuzzedpackages/survSNP/man/survSNP-package.Rd | no_license | akhikolla/testpackages | R | false | false | 2,617 | rd | \name{survSNP-package}
\alias{survSNP-package}
\alias{survSNP}
\docType{package}
\title{
Power Calculations for SNP Studies with Censored Outcomes
}
\description{
This package can be used to conduct asymptotic and
empirical power and sample size calculations for Single-nucleotide
Polymorphism (SNP) association studies ... |
#' Example Single Cell RNA-Seq data in SCESet Object
#'
#' A subset of 30 samples from a single cell RNA-Seq experiment from Zeisel, et
#' al. Science 2015. The data was produced from cells from the mouse
#' somatosensory cortex (S1) and hippocampus (CA1). 15 of the cells were
#' identified as oligodendrocytes and 15 o... | /R/data.R | permissive | lloydliu717/singleCellTK | R | false | false | 1,474 | r | #' Example Single Cell RNA-Seq data in SCESet Object
#'
#' A subset of 30 samples from a single cell RNA-Seq experiment from Zeisel, et
#' al. Science 2015. The data was produced from cells from the mouse
#' somatosensory cortex (S1) and hippocampus (CA1). 15 of the cells were
#' identified as oligodendrocytes and 15 o... |
# Description
# Author: David
# Version: 2020-01-29
# Libraries
library(tidyverse)
library(ussf)
library(sf)
names(df)
# Parameters
#Data Directory
link <- "https://eviction-lab-data-downloads.s3.amazonaws.com/SC/cities.geojson"
infile <- here::here("data-raw/cities.geojson")
outfile <- here::here("data/cities.geojs... | /scripts/cities.geojson.R | no_license | davidnathanlang/sc_eviction | R | false | false | 787 | r | # Description
# Author: David
# Version: 2020-01-29
# Libraries
library(tidyverse)
library(ussf)
library(sf)
names(df)
# Parameters
#Data Directory
link <- "https://eviction-lab-data-downloads.s3.amazonaws.com/SC/cities.geojson"
infile <- here::here("data-raw/cities.geojson")
outfile <- here::here("data/cities.geojs... |
# regular expression.tt
# extract text.tt
# remove text.tt
# used to extract text (dosage) from free text field combining dose and units
# derive_dose: 1: replace non-numbers with "-"
# 2: replace lagging dash with a blank
# 3: trim any lagging white space (just in case)
mutate(... | /RegularExpressions/ExtractText.R | no_license | yangboyubyron/DS_Recipes | R | false | false | 1,632 | r |
# regular expression.tt
# extract text.tt
# remove text.tt
# used to extract text (dosage) from free text field combining dose and units
# derive_dose: 1: replace non-numbers with "-"
# 2: replace lagging dash with a blank
# 3: trim any lagging white space (just in case)
mutate(... |
library(shiny)
library("ggplot2")
options(shiny.maxRequestSize=60*1024^2) # increase upload size limit of 5MB to 60MB.
addMonths= function(date,n) seq(date, by = paste (n, "months"), length = 2)[2] # function to add months.
shinyServer(function(input, output,session) {
dattab1 <- reactive ({ # prepare the table.
... | /server.R | permissive | joel-lzb/TimeDetective | R | false | false | 10,845 | r | library(shiny)
library("ggplot2")
options(shiny.maxRequestSize=60*1024^2) # increase upload size limit of 5MB to 60MB.
addMonths= function(date,n) seq(date, by = paste (n, "months"), length = 2)[2] # function to add months.
shinyServer(function(input, output,session) {
dattab1 <- reactive ({ # prepare the table.
... |
#********************************************************************************
# Date: 08/19/2020
# Comment(s): R code example for fitting/forecasting a seasonality to ts data.
# Data File(s): beer.csv, and housing.dat
#********************************************************************************
# Variable Defin... | /ts_seasonality.R | no_license | jsn-jin/economic-forecasting | R | false | false | 6,235 | r | #********************************************************************************
# Date: 08/19/2020
# Comment(s): R code example for fitting/forecasting a seasonality to ts data.
# Data File(s): beer.csv, and housing.dat
#********************************************************************************
# Variable Defin... |
# Exercise 4: complex Shiny UI layouts
# Load libraries so they are available
library("shiny")
# Use source() to execute the `app_ui.R` and `app_server.R` files. These will
# define the UI value and server function respectively.
source("app_ui.R")
source("app_server.R")
# You will need to fill in the `app_ui.R` fil... | /chapter-19-exercises/exercise-4/app.R | permissive | samuel-lindsay/book-exercises | R | false | false | 483 | r | # Exercise 4: complex Shiny UI layouts
# Load libraries so they are available
library("shiny")
# Use source() to execute the `app_ui.R` and `app_server.R` files. These will
# define the UI value and server function respectively.
source("app_ui.R")
source("app_server.R")
# You will need to fill in the `app_ui.R` fil... |
args = commandArgs(trailingOnly=T)
args = paste(args, collapse = "")
args = unlist(strsplit(args, ";"))
args = gsub(pattern = '@@', replacement = ' ', x = args)
arguments.list = "
seurat.addr.arg = args[1]
set.ident.arg = args[2]
cell.types.arg = args[3]
root_cell_type.arg = args[4]
type.to.colours.arg... | /Pipelines/10_pseudotime_webportal/pseudotime_webportal.R | no_license | greynolds81/HCA_skin | R | false | false | 9,600 | r | args = commandArgs(trailingOnly=T)
args = paste(args, collapse = "")
args = unlist(strsplit(args, ";"))
args = gsub(pattern = '@@', replacement = ' ', x = args)
arguments.list = "
seurat.addr.arg = args[1]
set.ident.arg = args[2]
cell.types.arg = args[3]
root_cell_type.arg = args[4]
type.to.colours.arg... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{congress}
\alias{congress}
\title{US Congress}
\format{
A tibble with 20,598 rows and 32 columns.
\describe{
\item{\code{congress}}{Congressional session.}
\item{\code{pid}}{Unique Person ID.}
\item{\code{last}}{L... | /man/congress.Rd | permissive | kjhealy/congress | R | false | true | 1,977 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{congress}
\alias{congress}
\title{US Congress}
\format{
A tibble with 20,598 rows and 32 columns.
\describe{
\item{\code{congress}}{Congressional session.}
\item{\code{pid}}{Unique Person ID.}
\item{\code{last}}{L... |
# Running SPADE: Philippines data
# File created on 12/3/20 by Simone Passarelli
# All nutrients: b12, iron, vita, zinc, calcium, red meat, processed meat, omega 3
# Load packages
library(SPADE.RIVMNwCore)
library(here)
# DO NOT load tidyverse because it makes spade mad!
load(here("data", "processed", "Philippines"))... | /scripts/Phil_run_spade_all_nutrients.R | no_license | cg0lden/subnational_distributions_BFA | R | false | false | 6,459 | r | # Running SPADE: Philippines data
# File created on 12/3/20 by Simone Passarelli
# All nutrients: b12, iron, vita, zinc, calcium, red meat, processed meat, omega 3
# Load packages
library(SPADE.RIVMNwCore)
library(here)
# DO NOT load tidyverse because it makes spade mad!
load(here("data", "processed", "Philippines"))... |
# install.packages("quanteda")
# install.packages("readr")
# install.packages("RWeka")
# install.packages("arules")
#Importation des librairies
library("quanteda")
library("readr")
library("RWeka")
library("arules")
library("arulesSequences")
# Fonction creation de dictionnaire -------------------------------------... | /Scripts/Task3TrainTest.R | no_license | limsamh/Project-Text-Mining | R | false | false | 9,946 | r | # install.packages("quanteda")
# install.packages("readr")
# install.packages("RWeka")
# install.packages("arules")
#Importation des librairies
library("quanteda")
library("readr")
library("RWeka")
library("arules")
library("arulesSequences")
# Fonction creation de dictionnaire -------------------------------------... |
library("lattice")
x <- seq(1, 2*pi, length.out=20)
y <- seq(1, 2*pi, length.out=20)
r1 <- as.vector(sqrt(outer(x^2, y^2, "+")))
r2 <- as.vector(sqrt(outer((x-3)^2, (y-3)^2, "+")))
grid <- expand.grid(x=x, y=y)
grid$z <- sin(r1) + sin(r2)
levelplot(z ~ x*y,
data=grid,
xlab="X",
main=""... | /09-lattice/15_levelplot_basic.R | no_license | xmorgan/r-examples | R | false | false | 322 | r | library("lattice")
x <- seq(1, 2*pi, length.out=20)
y <- seq(1, 2*pi, length.out=20)
r1 <- as.vector(sqrt(outer(x^2, y^2, "+")))
r2 <- as.vector(sqrt(outer((x-3)^2, (y-3)^2, "+")))
grid <- expand.grid(x=x, y=y)
grid$z <- sin(r1) + sin(r2)
levelplot(z ~ x*y,
data=grid,
xlab="X",
main=""... |
#RoS housing data to index for three censuses.
#PIP to 2011 IZs
#We only have back to 1990, so can only cover 3 censuses
geolibs <- c("dplyr", "tidyr","assertthat","ggmap","rgdal","rgeos","maptools","dplyr","tidyr","tmap","raster")
lapply(geolibs, require, character.only = TRUE)
#Get housing data
hse <- readRDS("C:/D... | /aggregateHousingData.R | no_license | DanOlner/dataStitching | R | false | false | 8,072 | r | #RoS housing data to index for three censuses.
#PIP to 2011 IZs
#We only have back to 1990, so can only cover 3 censuses
geolibs <- c("dplyr", "tidyr","assertthat","ggmap","rgdal","rgeos","maptools","dplyr","tidyr","tmap","raster")
lapply(geolibs, require, character.only = TRUE)
#Get housing data
hse <- readRDS("C:/D... |
library(dplyr)
#change data types
df_weight_total$avg_weight <- as.numeric(as.character(df_weight_total$avg_weight))
#subset on Model
df_weight_model <- merge(x=df_noncluster_total[df_noncluster_total$model == "Model 2"
& df_noncluster_total$occur != 0,],
... | /Visualization/Edges/Weight/Weight_NonCluster.R | no_license | jan-vanroozendaal/MaStat-Thesis-InteractionNetworks | R | false | false | 2,780 | r | library(dplyr)
#change data types
df_weight_total$avg_weight <- as.numeric(as.character(df_weight_total$avg_weight))
#subset on Model
df_weight_model <- merge(x=df_noncluster_total[df_noncluster_total$model == "Model 2"
& df_noncluster_total$occur != 0,],
... |
###############################################################
######Querying Twitter for shares, like Trump tweets###########
###############################################################
#install the necessary packages
#install.packages("twitteR")
#install.packages("tm")
library("twitteR")
library("tm")
... | /Twitter API.R | no_license | Shazam-ai/My_R_Files | R | false | false | 1,150 | r | ###############################################################
######Querying Twitter for shares, like Trump tweets###########
###############################################################
#install the necessary packages
#install.packages("twitteR")
#install.packages("tm")
library("twitteR")
library("tm")
... |
summarySCC_PM25 <- readRDS("D:/Anuja RAIT desktop/datasciencecoursera/coursera_exploratorydata_week4/summarySCC_PM25.rds")
Source_Classification_Code <- readRDS("D:/Anuja RAIT desktop/datasciencecoursera/coursera_exploratorydata_week4/Source_Classification_Code.rds")
aggregatetotal<-aggregate(Emissions~year,summarySCC... | /plot1.R | no_license | anu-gulhane/coursera_exploratorydata_week4 | R | false | false | 552 | r | summarySCC_PM25 <- readRDS("D:/Anuja RAIT desktop/datasciencecoursera/coursera_exploratorydata_week4/summarySCC_PM25.rds")
Source_Classification_Code <- readRDS("D:/Anuja RAIT desktop/datasciencecoursera/coursera_exploratorydata_week4/Source_Classification_Code.rds")
aggregatetotal<-aggregate(Emissions~year,summarySCC... |
library(haven)
library(descr)
library(Matching)
library(rgenoud)
library(psych)
library(sandwich)
library(lmtest)
library(multiwayvcov)
library(survey)
library(margins)
library(ggeffects)
library(sjmisc)
library(ggplot2)
library(effects)
library(MASS)
library(ggeffects)
setwd("d:/dustin/Desktop/Desktop/ceu stats folde... | /State employees and government assessments.R | no_license | crrcgeorgia/state_empl | R | false | false | 7,224 | r | library(haven)
library(descr)
library(Matching)
library(rgenoud)
library(psych)
library(sandwich)
library(lmtest)
library(multiwayvcov)
library(survey)
library(margins)
library(ggeffects)
library(sjmisc)
library(ggplot2)
library(effects)
library(MASS)
library(ggeffects)
setwd("d:/dustin/Desktop/Desktop/ceu stats folde... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fbind.R
\name{fbind}
\alias{fbind}
\title{Bind two factors}
\usage{
fbind(a, b)
}
\arguments{
\item{a}{factor}
\item{b}{factor}
}
\value{
factor
}
\description{
Create a new factor from two existing factors, where
the new factor's levels are... | /man/fbind.Rd | no_license | ustchby/zoofactors | R | false | true | 446 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fbind.R
\name{fbind}
\alias{fbind}
\title{Bind two factors}
\usage{
fbind(a, b)
}
\arguments{
\item{a}{factor}
\item{b}{factor}
}
\value{
factor
}
\description{
Create a new factor from two existing factors, where
the new factor's levels are... |
# ui.R
library(shiny)
shinyUI(fluidPage(
titlePanel("censusVis"),
sidebarLayout(
sidebarPanel(
helpText("Create demographic maps with
information from the 2010 US Census."),
selectInput("var",
label = "Choose a variable to display",
... | /census-app/UI.R | no_license | 2waybene/rShiny | R | false | false | 686 | r | # ui.R
library(shiny)
shinyUI(fluidPage(
titlePanel("censusVis"),
sidebarLayout(
sidebarPanel(
helpText("Create demographic maps with
information from the 2010 US Census."),
selectInput("var",
label = "Choose a variable to display",
... |
### Kit de supervivencia en R: Habilidades básicas
## IMPORTAR
# Directorio de trabajo
getwd()
# Objetos en wd
dir()
# Lectura de csv
dat <- read.csv("data_tetris.csv")
# Ver los datos
View(dat)
## Lectura de spss
# Librería necesaria
library(foreign)
# Leer SPSS: .sav
dat2 <- read.spss("data_tetris.sav", to.da... | /scripts/kit_supervivencia.R | no_license | Sivlemx/Intersemestral-ANOVA | R | false | false | 1,892 | r | ### Kit de supervivencia en R: Habilidades básicas
## IMPORTAR
# Directorio de trabajo
getwd()
# Objetos en wd
dir()
# Lectura de csv
dat <- read.csv("data_tetris.csv")
# Ver los datos
View(dat)
## Lectura de spss
# Librería necesaria
library(foreign)
# Leer SPSS: .sav
dat2 <- read.spss("data_tetris.sav", to.da... |
## File Name: tam2mirt.R
## File Version: 0.292
# convert a fitted tam object into a mirt object
tam2mirt <- function( tamobj )
{
est.mirt <- FALSE
# extract intercept
AXsi <- tamobj$AXsi
# extract loadings
B <- tamobj$B
# number of dimensions
D <- dim(B)[3]
# extract tra... | /R/tam2mirt.R | no_license | cran/sirt | R | false | false | 1,727 | r | ## File Name: tam2mirt.R
## File Version: 0.292
# convert a fitted tam object into a mirt object
tam2mirt <- function( tamobj )
{
est.mirt <- FALSE
# extract intercept
AXsi <- tamobj$AXsi
# extract loadings
B <- tamobj$B
# number of dimensions
D <- dim(B)[3]
# extract tra... |
testlist <- list(x = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22807868598466e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(multivariance::fastdist,testlist)
str(result) | /multivariance/inst/testfiles/fastdist/AFL_fastdist/fastdist_valgrind_files/1613098439-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 303 | r | testlist <- list(x = structure(c(2.31584307392677e+77, 9.53818252170339e+295, 1.22807868598466e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(multivariance::fastdist,testlist)
str(result) |
transDVImage <- function(srcImage, examType) {
if (examType == "M") {
DVImage <- log10(1/srcImage[,,1])
} else if (examType == "E") {
DVImage <- 10*(log10(1/srcImage[,,2])-1.44*log10(1/srcImage[,,1]))
}
DVImage <- as.Image(DVImage)
return(DVImage)
}
applyFilter <- function(srcImage, redM... | /usedFunctions.r | no_license | Chillangri/ImageAnalysis | R | false | false | 6,767 | r | transDVImage <- function(srcImage, examType) {
if (examType == "M") {
DVImage <- log10(1/srcImage[,,1])
} else if (examType == "E") {
DVImage <- 10*(log10(1/srcImage[,,2])-1.44*log10(1/srcImage[,,1]))
}
DVImage <- as.Image(DVImage)
return(DVImage)
}
applyFilter <- function(srcImage, redM... |
#' Draw nonzero negative binomial random numbers
#'
#' @param basemeans vector of means, one per draw
#' @param size vector of size parameters (controlling the mean/variance relationship); one per draw
#' @param seed optional seed to set before drawing
#' @examples \dontrun{
#' randomNBs = NB(c(100, 4, 29), size=c(5... | /R/NB.R | no_license | Libardo1/polyester | R | false | false | 581 | r | #' Draw nonzero negative binomial random numbers
#'
#' @param basemeans vector of means, one per draw
#' @param size vector of size parameters (controlling the mean/variance relationship); one per draw
#' @param seed optional seed to set before drawing
#' @examples \dontrun{
#' randomNBs = NB(c(100, 4, 29), size=c(5... |
#' Generate random winner-loser dataframe
#'
#' @param ints number of interactions
#' @param actors number of individuals
#' @param intprob vector of interaction probabilities of same length as `actors`
#' @return a dataframe with two variables, winner and loser
#' @examples
#' df<-data.frame(winner=c(1,2,3,1,2,... | /R/wldf.R | no_license | cran/hierformR | R | false | false | 723 | r | #' Generate random winner-loser dataframe
#'
#' @param ints number of interactions
#' @param actors number of individuals
#' @param intprob vector of interaction probabilities of same length as `actors`
#' @return a dataframe with two variables, winner and loser
#' @examples
#' df<-data.frame(winner=c(1,2,3,1,2,... |
#
# This is the user-interface definition 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(colourpicker)
# Define UI for application that draws a histogram
sh... | /src/ui.R | permissive | peter0083/crime_data_shiny_app | R | false | false | 4,798 | r | #
# This is the user-interface definition 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(colourpicker)
# Define UI for application that draws a histogram
sh... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/convertToNumeric.R
\name{convertToNumeric}
\alias{convertToNumeric}
\title{Conveniently convert vectors to numeric}
\usage{
convertToNumeric(vector, byFactorLabel = FALSE)
}
\arguments{
\item{vector}{The vector to convert.}
\item{... | /man/convertToNumeric.Rd | no_license | cran/rock | R | false | true | 638 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/convertToNumeric.R
\name{convertToNumeric}
\alias{convertToNumeric}
\title{Conveniently convert vectors to numeric}
\usage{
convertToNumeric(vector, byFactorLabel = FALSE)
}
\arguments{
\item{vector}{The vector to convert.}
\item{... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/statGraph.R
\name{graph.acf}
\alias{graph.acf}
\title{Auto Correlation Function Estimation for Graphs}
\usage{
graph.acf(G, plot = TRUE)
}
\arguments{
\item{G}{a list of undirected graphs (igraph type) or their adjacency
matrices. The adjacen... | /man/graph.acf.Rd | no_license | cran/statGraph | R | false | true | 1,213 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/statGraph.R
\name{graph.acf}
\alias{graph.acf}
\title{Auto Correlation Function Estimation for Graphs}
\usage{
graph.acf(G, plot = TRUE)
}
\arguments{
\item{G}{a list of undirected graphs (igraph type) or their adjacency
matrices. The adjacen... |
##----------------------------------------------------------------------------##
## dt_format
##----------------------------------------------------------------------------##
output[["dt_format_simple"]] <- renderDataTable(
# --- required ---
iris,
# --- options ---
rownames = TRUE, # 列番号
options = list(
... | /shiny/dt/server_format.R | no_license | milktea-muffin/r-shiny-electron | R | false | false | 4,155 | r | ##----------------------------------------------------------------------------##
## dt_format
##----------------------------------------------------------------------------##
output[["dt_format_simple"]] <- renderDataTable(
# --- required ---
iris,
# --- options ---
rownames = TRUE, # 列番号
options = list(
... |
#quick read to see what the file looks like
data <- read.table(file = "household_power_consumption.txt", nrow = 10, head=TRUE)
#load sql package
library("sqldf")
require("sqldf")
#sql statement to get desired rows
SQL <- "SELECT * FROM file WHERE Date = '1/2/2007' OR Date = '2/2/2007'"
file <- "household_power_consum... | /plot2.R | no_license | kedrake/ExData_Plotting1 | R | false | false | 897 | r | #quick read to see what the file looks like
data <- read.table(file = "household_power_consumption.txt", nrow = 10, head=TRUE)
#load sql package
library("sqldf")
require("sqldf")
#sql statement to get desired rows
SQL <- "SELECT * FROM file WHERE Date = '1/2/2007' OR Date = '2/2/2007'"
file <- "household_power_consum... |
computeSimilarity <- function(x){
if(dim(img)[3]==1)
{
return(dist(rbind(
img[seq(x['node_p'],length.out=dim(img)[3],by=length(img)/dim(img)[3])]
,img[seq(x['node_q'],length.out=dim(img)[3],by=length(img)/dim(img)[3])]
), upper=TRUE)^2)
}
if(dim(img)[3]==3)
{
return(dist(rbind... | /R/Graphcut/computeSimilarity.R | no_license | bebeet/ONH_segmentation | R | false | false | 510 | r |
computeSimilarity <- function(x){
if(dim(img)[3]==1)
{
return(dist(rbind(
img[seq(x['node_p'],length.out=dim(img)[3],by=length(img)/dim(img)[3])]
,img[seq(x['node_q'],length.out=dim(img)[3],by=length(img)/dim(img)[3])]
), upper=TRUE)^2)
}
if(dim(img)[3]==3)
{
return(dist(rbind... |
# +-------------------------------------------------------------+
# | Package: ternaryplot |
# | Language: R + roxygen2 inline documentation |
# | Author(s): Julien Moeys <Julien.Moeys@@slu.se> |
# | License: AGPL3, Affero General Public License ve... | /pkg/ternaryplot/R/ternaryArrows.R | no_license | julienmoeys/ternaryplot | R | false | false | 3,203 | r |
# +-------------------------------------------------------------+
# | Package: ternaryplot |
# | Language: R + roxygen2 inline documentation |
# | Author(s): Julien Moeys <Julien.Moeys@@slu.se> |
# | License: AGPL3, Affero General Public License ve... |
library(sptemExp)
### Name: exeCluster
### Title: Efficient Clustering Using Union-Find to Obtain the Clusters for
### Each Sample
### Aliases: exeCluster
### Keywords: ~cluster ~union-find
### ** Examples
samplePnt=data.frame(x=runif(100,1,100),y=runif(100,1,100))
clusterId=exeCluster(samplePnt,10)
| /data/genthat_extracted_code/sptemExp/examples/exeCluster.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 310 | r | library(sptemExp)
### Name: exeCluster
### Title: Efficient Clustering Using Union-Find to Obtain the Clusters for
### Each Sample
### Aliases: exeCluster
### Keywords: ~cluster ~union-find
### ** Examples
samplePnt=data.frame(x=runif(100,1,100),y=runif(100,1,100))
clusterId=exeCluster(samplePnt,10)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/snpRdata.R
\docType{class}
\name{snpRdata-class}
\alias{snpRdata-class}
\alias{snpRdata}
\title{Storage class for snpR data and calculated statistics.}
\description{
\code{\link{import.snpR.data}} creates and defines the snpRdata class to sto... | /man/snpRdata-class.Rd | no_license | michellepepping/snpR | R | false | true | 1,174 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/snpRdata.R
\docType{class}
\name{snpRdata-class}
\alias{snpRdata-class}
\alias{snpRdata}
\title{Storage class for snpR data and calculated statistics.}
\description{
\code{\link{import.snpR.data}} creates and defines the snpRdata class to sto... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nabat_gql_queries.R
\name{get_sa_event_metadata}
\alias{get_sa_event_metadata}
\title{Get Stationary Acoustic event metadata}
\usage{
get_sa_event_metadata(
token,
survey_df,
year = NULL,
branch = "prod",
url = NULL,
aws_gql = NUL... | /man/get_sa_event_metadata.Rd | permissive | MLBartley/nabatr | R | false | true | 1,374 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nabat_gql_queries.R
\name{get_sa_event_metadata}
\alias{get_sa_event_metadata}
\title{Get Stationary Acoustic event metadata}
\usage{
get_sa_event_metadata(
token,
survey_df,
year = NULL,
branch = "prod",
url = NULL,
aws_gql = NUL... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.