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 |
|---|---|---|---|---|---|---|---|---|---|
rm(list=ls())
airData <- read.csv("data/airquality.csv")
summary(airData)
dim(airData)
city <- read.csv("data/city.csv")
district <- read.csv("data/district.csv")
bdist <- district[district$city_id == 1,]
write.csv(file="beijing_district.csv", bdist, row.names = F)
station <- read.csv("data/station.csv")
bstation... | /independent-study/IoT/datafilter.R | no_license | ncdingari/datamining | R | false | false | 4,477 | r | rm(list=ls())
airData <- read.csv("data/airquality.csv")
summary(airData)
dim(airData)
city <- read.csv("data/city.csv")
district <- read.csv("data/district.csv")
bdist <- district[district$city_id == 1,]
write.csv(file="beijing_district.csv", bdist, row.names = F)
station <- read.csv("data/station.csv")
bstation... |
# Librerías
options(dplyr.summarise.inform = FALSE)
library(ggplot2)
library(stringr)
# Carga datos de campañas
load(file = "./data/datos.RData")
# Tab 1 - Funciones de análisis general ----
## Jugador más valioso
tMVP <- cbg %>%
filter(fecha == max(lst_campos)) %>%
mutate(total = 2 * negociaciones + batal... | /funciones.R | no_license | epicuro47/FoE | R | false | false | 6,387 | r | # Librerías
options(dplyr.summarise.inform = FALSE)
library(ggplot2)
library(stringr)
# Carga datos de campañas
load(file = "./data/datos.RData")
# Tab 1 - Funciones de análisis general ----
## Jugador más valioso
tMVP <- cbg %>%
filter(fecha == max(lst_campos)) %>%
mutate(total = 2 * negociaciones + batal... |
"
Name : c8_12_considerDirection.R
Book : Hands-on Data Science with Anaconda )
Publisher: Packt Publishing Ltd.
Author : Yuxing Yan and James Yan
Date : 3/25/2018
email : yany@canisius.edu
paulyxy@hotmail.com
"
angles<-seq(0,380,30)
y<-cos(angles)
y2<-round(y,2)
z<-cbind(ang... | /Chapter08/c8_12_considerDirection.R | permissive | andrewjcoxon/Hands-On-Data-Science-with-Anaconda | R | false | false | 375 | r | "
Name : c8_12_considerDirection.R
Book : Hands-on Data Science with Anaconda )
Publisher: Packt Publishing Ltd.
Author : Yuxing Yan and James Yan
Date : 3/25/2018
email : yany@canisius.edu
paulyxy@hotmail.com
"
angles<-seq(0,380,30)
y<-cos(angles)
y2<-round(y,2)
z<-cbind(ang... |
\name{Pixelmatrix}
\alias{Pixelmatrix}
\alias{PlotPixMatrix}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Plot of a Pixel Matrix }
\description{
Plots Data matrix as a pixel coulour image.
}
\usage{
Pixelmatrix(Data, XNames, LowLim, HiLim,
YNames, main,FillNotFiniteWithHighestValue=FALSE)
... | /man/Pixelmatrix.Rd | no_license | Mthrun/DataVisualizations | R | false | false | 1,281 | rd | \name{Pixelmatrix}
\alias{Pixelmatrix}
\alias{PlotPixMatrix}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{Plot of a Pixel Matrix }
\description{
Plots Data matrix as a pixel coulour image.
}
\usage{
Pixelmatrix(Data, XNames, LowLim, HiLim,
YNames, main,FillNotFiniteWithHighestValue=FALSE)
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spread.R
\name{SwitchMargrabe}
\alias{SwitchMargrabe}
\title{Margrabe's formula for exhange option price}
\usage{
SwitchMargrabe(
spot1,
spot2,
texp = 1,
sigma1,
sigma2,
corr,
intr = 0,
divr1 = 0,
divr2 = 0,
... | /man/SwitchMargrabe.Rd | no_license | cran/FER | R | false | true | 1,625 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/spread.R
\name{SwitchMargrabe}
\alias{SwitchMargrabe}
\title{Margrabe's formula for exhange option price}
\usage{
SwitchMargrabe(
spot1,
spot2,
texp = 1,
sigma1,
sigma2,
corr,
intr = 0,
divr1 = 0,
divr2 = 0,
... |
trump <- read.csv("~/Desktop/Regression/project/data/full_trump2_weekly.csv")
obama <- read.csv("~/Desktop/Regression/project/data/full_obama2_weekly.csv")
pres <- obama
# getting squared terms
x <- pres[-1]
y <- pres[1]
x2 <- x^2
f <- function(name) paste(name,"2",sep="")
colnames(x2) <- lapply(colnames(x), f)
data_s... | /main.R | no_license | philiptkd/presidential_regression | R | false | false | 4,764 | r | trump <- read.csv("~/Desktop/Regression/project/data/full_trump2_weekly.csv")
obama <- read.csv("~/Desktop/Regression/project/data/full_obama2_weekly.csv")
pres <- obama
# getting squared terms
x <- pres[-1]
y <- pres[1]
x2 <- x^2
f <- function(name) paste(name,"2",sep="")
colnames(x2) <- lapply(colnames(x), f)
data_s... |
#include "AEConfig.h"
#include "AE_EffectVers.h"
#ifndef AE_OS_WIN
#include <AE_General.r>
#endif
resource 'PiPL' (16000) {
{ /* array properties: 12 elements */
/* [1] */
Kind {
AEEffect
},
/* [2] */
Name {
"Stroke Maskter(BETA)"
},
/* [3] */
Category {
"Generate"
},
#ifdef AE_OS_WIN
#... | /XJ_CharterRenderBarPiPL.r | permissive | benzngf/XJ_Charter | R | false | false | 1,191 | r | #include "AEConfig.h"
#include "AE_EffectVers.h"
#ifndef AE_OS_WIN
#include <AE_General.r>
#endif
resource 'PiPL' (16000) {
{ /* array properties: 12 elements */
/* [1] */
Kind {
AEEffect
},
/* [2] */
Name {
"Stroke Maskter(BETA)"
},
/* [3] */
Category {
"Generate"
},
#ifdef AE_OS_WIN
#... |
testlist <- list(doy = c(4.62595082430429e-312, 3.64097969159734e-277, -0.427429395729092, 2.09887675795476e-104, 1.55322770574539e-47, 1.45474215376015e+135, 3.56441595774554e+114, -2.64525441665141e+303, -9.52682579807939e+139, -3.98397314603138e+183, -1.77863325536183e+126, 6.42851301544252e-310, 1.6601383076532... | /meteor/inst/testfiles/Photoperiod/AFL_Photoperiod/Photoperiod_valgrind_files/1615769182-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 677 | r | testlist <- list(doy = c(4.62595082430429e-312, 3.64097969159734e-277, -0.427429395729092, 2.09887675795476e-104, 1.55322770574539e-47, 1.45474215376015e+135, 3.56441595774554e+114, -2.64525441665141e+303, -9.52682579807939e+139, -3.98397314603138e+183, -1.77863325536183e+126, 6.42851301544252e-310, 1.6601383076532... |
num <- as.integer(readline("Enter Number : "))
for (i in 1:12) {
print(paste(num, "x", i, "=", num * i))
} | /DataScience/3/mulTable.r | no_license | Chaitanya-Raj/Semester6 | R | false | false | 110 | r | num <- as.integer(readline("Enter Number : "))
for (i in 1:12) {
print(paste(num, "x", i, "=", num * i))
} |
test_that("Test missing_count", {
x <- missing_count(c(1,2,3))
expect_true(is.numeric(x))
expect_true(length(x)==1)
expect_equal(x, 0)
y <- missing_count(c(NA, 1, NA, "NULL", ""))
expect_true(is.numeric(y))
expect_true(length(y)==1)
expect_equal(y, 4)
})
| /tests/testthat/test_missing_count.R | no_license | lenamax2355/shinyr | R | false | false | 272 | r | test_that("Test missing_count", {
x <- missing_count(c(1,2,3))
expect_true(is.numeric(x))
expect_true(length(x)==1)
expect_equal(x, 0)
y <- missing_count(c(NA, 1, NA, "NULL", ""))
expect_true(is.numeric(y))
expect_true(length(y)==1)
expect_equal(y, 4)
})
|
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/Beta_ab.R
\name{Beta_ab}
\alias{Beta_ab}
\alias{dBeta_ab}
\alias{eBeta_ab}
\alias{lBeta_ab}
\alias{pBeta_ab}
\alias{qBeta_ab}
\alias{rBeta_ab}
\alias{sBeta_ab}
\title{The four-parameter beta distribution.}
\usage{
dBeta_a... | /man/Beta_ab.Rd | no_license | palash6347/ExtDist | R | false | false | 5,140 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/Beta_ab.R
\name{Beta_ab}
\alias{Beta_ab}
\alias{dBeta_ab}
\alias{eBeta_ab}
\alias{lBeta_ab}
\alias{pBeta_ab}
\alias{qBeta_ab}
\alias{rBeta_ab}
\alias{sBeta_ab}
\title{The four-parameter beta distribution.}
\usage{
dBeta_a... |
#Author: Farnaz Fouladi
#Date: 08-17-2020
#Description: Assal dataset:Compare the gut microbiome at each time point versus
# baseline using mixed linear models. Count tables is classified by
# Kraken2.
rm(list=ls())
#Libraries
library(nlme)
input<-"./input/RYGB_Assal2020/Kraken2/"
output<-".... | /Rcode/RYGB_IntegratedAnalysis/Assal_kraken2_16S.R | no_license | FarnazFouladi/RYGB_IntegratedAnalysis2020 | R | false | false | 2,695 | r | #Author: Farnaz Fouladi
#Date: 08-17-2020
#Description: Assal dataset:Compare the gut microbiome at each time point versus
# baseline using mixed linear models. Count tables is classified by
# Kraken2.
rm(list=ls())
#Libraries
library(nlme)
input<-"./input/RYGB_Assal2020/Kraken2/"
output<-".... |
DS_with_python <- list("python","ML","DL","NPL","AI")
DS_with_R <- list("R","ML","DL","NPL","AI")
DS <- list(DS_with_python,DS_with_R)
DS
DS[[2]][1]
names(DS) <- c("list1","list2")
DS
DS$list1[1]
DS$Students <- c("Ram","Renny","Robert")
DS$Students[[4]] <- "Raju"
DS
list1 <- list(LETTERS[1:5])
list1
data1 <- read.t... | /xyz.R | no_license | Vishalkaware/R_prog | R | false | false | 374 | r | DS_with_python <- list("python","ML","DL","NPL","AI")
DS_with_R <- list("R","ML","DL","NPL","AI")
DS <- list(DS_with_python,DS_with_R)
DS
DS[[2]][1]
names(DS) <- c("list1","list2")
DS
DS$list1[1]
DS$Students <- c("Ram","Renny","Robert")
DS$Students[[4]] <- "Raju"
DS
list1 <- list(LETTERS[1:5])
list1
data1 <- read.t... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Get.taxo.classif.R
\name{get_classif.ncbi}
\alias{get_classif.ncbi}
\title{Get the classification table and synonyms from NCBI taxonomy database}
\usage{
get_classif.ncbi(input = NULL, api_key = NULL)
}
\arguments{
\item{input}{a vector with ... | /man/get_classif.ncbi.Rd | no_license | dvdeme/regPhylo | R | false | true | 1,111 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Get.taxo.classif.R
\name{get_classif.ncbi}
\alias{get_classif.ncbi}
\title{Get the classification table and synonyms from NCBI taxonomy database}
\usage{
get_classif.ncbi(input = NULL, api_key = NULL)
}
\arguments{
\item{input}{a vector with ... |
library(unmarked)
library(MuMIn)
library(rgdal)
library(rgeos)
library(foreign)
library(foreach)
source("f.AIC_cut.occu.sig.used.15.10.23.R")
source("getDesign.R")
ObsCovarSet <- c("DAY", "TIME", "COUNT_TYPE", "EFFORT_HRS", "EFFORT_DISTANCE_KM", "NUMBER_OBSERVERS")
covar <- read.csv("./input/eBird_occu_covar_site_... | /occu_models/COPH_eBird.R | no_license | ricschuster/Tradeoffs-biodiversity-cost | R | false | false | 4,338 | r | library(unmarked)
library(MuMIn)
library(rgdal)
library(rgeos)
library(foreign)
library(foreach)
source("f.AIC_cut.occu.sig.used.15.10.23.R")
source("getDesign.R")
ObsCovarSet <- c("DAY", "TIME", "COUNT_TYPE", "EFFORT_HRS", "EFFORT_DISTANCE_KM", "NUMBER_OBSERVERS")
covar <- read.csv("./input/eBird_occu_covar_site_... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/ssi.R
\name{ssi}
\alias{ssi}
\title{Spectral Segregation Index for Social Networks}
\usage{
ssi(g, vattr)
}
\arguments{
\item{g}{object of class "igraph" representing a network}
\item{vattr}{character, name of the vertex attribute}
}... | /man/ssi.Rd | no_license | bartekch/isnar | R | false | false | 3,149 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/ssi.R
\name{ssi}
\alias{ssi}
\title{Spectral Segregation Index for Social Networks}
\usage{
ssi(g, vattr)
}
\arguments{
\item{g}{object of class "igraph" representing a network}
\item{vattr}{character, name of the vertex attribute}
}... |
## Shiny Text Example ui.R
library(shiny)
# Define UI for dataset viewer application
shinyUI(pageWithSidebar(
# Application title
headerPanel("Shiny Text"),
# Sidebar with controls to select a dataset and specify the number
# of observations to view
sidebarPanel(
selectInput("dataset", "Choose a da... | /All_Shiny_app_examples/Shiny Text/ui.R | no_license | narensahu13/Shiny-Materials | R | false | false | 646 | r | ## Shiny Text Example ui.R
library(shiny)
# Define UI for dataset viewer application
shinyUI(pageWithSidebar(
# Application title
headerPanel("Shiny Text"),
# Sidebar with controls to select a dataset and specify the number
# of observations to view
sidebarPanel(
selectInput("dataset", "Choose a da... |
## Caching the Inverse of a Matrix:
## Creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setInverse <- function(inverse) inv <<- inverse
getInverse... | /cachematrix.R | no_license | velthuisf/ProgrammingAssignment2 | R | false | false | 905 | r | ## Caching the Inverse of a Matrix:
## Creates a special "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setInverse <- function(inverse) inv <<- inverse
getInverse... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/buildTree.R
\name{print.spotTreeModel}
\alias{print.spotTreeModel}
\title{Print method for rpart tree models}
\usage{
\method{print}{spotTreeModel}(x, ...)
}
\arguments{
\item{...}{not used}
\item{object}{fit of the model, an object of class... | /man/print.spotTreeModel.Rd | no_license | cran/SPOT | R | false | true | 463 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/buildTree.R
\name{print.spotTreeModel}
\alias{print.spotTreeModel}
\title{Print method for rpart tree models}
\usage{
\method{print}{spotTreeModel}(x, ...)
}
\arguments{
\item{...}{not used}
\item{object}{fit of the model, an object of class... |
###McKinney Thesis 2019; Chapter 2 analysis
library(hier.part)
library(boot)
library(Hmisc)
library(MASS)
library(nlme)
#Data can be found at
#NDVI_mean is the mean NDVI for the Australia-wide analysis
#temp is temperature for the Australia-wide analysis
#hfp is human footprint for Australia-wide analysis
#na... | /McKinneyThesis_Ch2_Rscript.R | no_license | matthewryanmckinney/Matt-R-McKinney-2019-PhD-Thesis-data-and-scripts | R | false | false | 10,441 | r | ###McKinney Thesis 2019; Chapter 2 analysis
library(hier.part)
library(boot)
library(Hmisc)
library(MASS)
library(nlme)
#Data can be found at
#NDVI_mean is the mean NDVI for the Australia-wide analysis
#temp is temperature for the Australia-wide analysis
#hfp is human footprint for Australia-wide analysis
#na... |
library(galgo)
### Name: meanGeneration.BigBang
### Title: Computes the mean number of generations requiered to reach a
### given fitness value
### Aliases: meanGeneration.BigBang BigBang.meanGeneration
### meanGeneration.BigBang meanGeneration,BigBang-method meanGeneration
### Keywords: methods internal methods
... | /data/genthat_extracted_code/galgo/examples/meanGeneration.BigBang.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 435 | r | library(galgo)
### Name: meanGeneration.BigBang
### Title: Computes the mean number of generations requiered to reach a
### given fitness value
### Aliases: meanGeneration.BigBang BigBang.meanGeneration
### meanGeneration.BigBang meanGeneration,BigBang-method meanGeneration
### Keywords: methods internal methods
... |
url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip"
if (!file.exists("exdata-data-NEI_data.zip")) {
download.file(url, destfile = "exdata-data-NEI_data.zip", method = "curl")
unzip("exdata-data-NEI_data.zip")
}
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classifi... | /4. Exploratory Data Analysis/Course_Project_2/load_data.R | permissive | jackypan000/Data_Science_Specialization | R | false | false | 337 | r | url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip"
if (!file.exists("exdata-data-NEI_data.zip")) {
download.file(url, destfile = "exdata-data-NEI_data.zip", method = "curl")
unzip("exdata-data-NEI_data.zip")
}
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classifi... |
# loads scripts from "get_data.R" to download and clean the data
source("get_data.R")
data <- get_data()
curr <- dev.cur()
png("plot1.png",480,480)
hist(data$Global_active_power,
col="red",
main="Global Active Power",
xlab="Global Active Power (kilowatts)")
dev.off()
dev.set(curr)
| /plot1.R | no_license | jseaman/ExData_Plotting1 | R | false | false | 306 | r | # loads scripts from "get_data.R" to download and clean the data
source("get_data.R")
data <- get_data()
curr <- dev.cur()
png("plot1.png",480,480)
hist(data$Global_active_power,
col="red",
main="Global Active Power",
xlab="Global Active Power (kilowatts)")
dev.off()
dev.set(curr)
|
1 #
2 # Dirichlet Process Mixture Model example.
3 # Last modified on Apr 19, 2018 by Yuelin Li from an example given by
4 # Tamara Broderick, whose original source code is available at:
5 # https://raw.githubusercontent.com/tbroderick/bnp_tutorial
6 # /2016mlss/ex7_sampler.R
7 ###### Below are heade... | /2. Dirichlet Process/ex.r | no_license | seonghyun-code/Python | R | false | false | 6,382 | r | 1 #
2 # Dirichlet Process Mixture Model example.
3 # Last modified on Apr 19, 2018 by Yuelin Li from an example given by
4 # Tamara Broderick, whose original source code is available at:
5 # https://raw.githubusercontent.com/tbroderick/bnp_tutorial
6 # /2016mlss/ex7_sampler.R
7 ###### Below are heade... |
## This R script defines a pair of functions that cache the inverse of a matrix.
## The below function creates a special "matrix" object that can cache
## its inverse.
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function()... | /cachematrix.R | no_license | hgianini/ProgrammingAssignment2 | R | false | false | 1,004 | r | ## This R script defines a pair of functions that cache the inverse of a matrix.
## The below function creates a special "matrix" object that can cache
## its inverse.
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function()... |
#' Move forward one generation in the branching process
#'
#' @author Joel Hellewell
#'
#' @param case_data data.table of cases in outbreak so far; initially generated by outbreak_setup
#' @param disp.iso numeric dispersion parameter for isolated cases (must be >0)
#' @param disp.com numeric dispersion parameter for no... | /R/outbreak_step.R | permissive | covidwatchorg/impact-sim | R | false | false | 8,110 | r | #' Move forward one generation in the branching process
#'
#' @author Joel Hellewell
#'
#' @param case_data data.table of cases in outbreak so far; initially generated by outbreak_setup
#' @param disp.iso numeric dispersion parameter for isolated cases (must be >0)
#' @param disp.com numeric dispersion parameter for no... |
#!/usr/bin/env littler
snps=read.csv('outside.csv')
sdat=snps[,c(2,3,3,1,4,5,6,7)]
# rsID Chr Pos A C G T sum
#1 rs10500915 chr11 21753388 0.2891 0.4467 0.2643 0.0000 1.0001
out.file <- "nCircos.pdf";
pdf(file=out.file, height=8, width=8);
library(RCircos)
data(UCSC.HG19.Huma... | /R/nCircos.r | no_license | galaxysd/GalaxyCodeBases | R | false | false | 950 | r | #!/usr/bin/env littler
snps=read.csv('outside.csv')
sdat=snps[,c(2,3,3,1,4,5,6,7)]
# rsID Chr Pos A C G T sum
#1 rs10500915 chr11 21753388 0.2891 0.4467 0.2643 0.0000 1.0001
out.file <- "nCircos.pdf";
pdf(file=out.file, height=8, width=8);
library(RCircos)
data(UCSC.HG19.Huma... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
Inverse <- NULL
set <- function(y) {
x <<- y
Inverse <<- NULL
}
get <- function() x
setInverse <- function(solve) Inverse <... | /cachematrix.R | no_license | shyang20/ProgrammingAssignment2 | R | false | false | 907 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
Inverse <- NULL
set <- function(y) {
x <<- y
Inverse <<- NULL
}
get <- function() x
setInverse <- function(solve) Inverse <... |
x<-read.table('household_power_consumption.txt',sep=";",header=TRUE, stringsAsFactors=FALSE)
#pulls the table and converts the ?'s the NA's
suppressWarnings(x$Global_active_power<-as.numeric(x$Global_active_power))
suppressWarnings(x$Global_reactive_power<-as.numeric(x$Global_reactive_power))
#looks at the 2 appropriat... | /plot1.R | no_license | wfw00d/ExData_Plotting1 | R | false | false | 522 | r | x<-read.table('household_power_consumption.txt',sep=";",header=TRUE, stringsAsFactors=FALSE)
#pulls the table and converts the ?'s the NA's
suppressWarnings(x$Global_active_power<-as.numeric(x$Global_active_power))
suppressWarnings(x$Global_reactive_power<-as.numeric(x$Global_reactive_power))
#looks at the 2 appropriat... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dataone.R
\name{is_token_expired}
\alias{is_token_expired}
\title{Determine whether the set token is expired.}
\usage{
is_token_expired(node)
}
\description{
Determine whether the set token is expired.
}
| /man/is_token_expired.Rd | permissive | eodean/arcticdatautils | R | false | true | 282 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dataone.R
\name{is_token_expired}
\alias{is_token_expired}
\title{Determine whether the set token is expired.}
\usage{
is_token_expired(node)
}
\description{
Determine whether the set token is expired.
}
|
library(swirl)
swirl()
head(pollution)
dim(pollution)
summary(pollution$pm25)
quantile(ppm)
boxplot(ppm, col = "blue")
abline(h =12) # drew a horizontal line at 12
2
hist(ppm, col = "green")
rug(ppm)
low
high
hist(ppm, col = "green", breaks = 100)
rug(ppm)
hist(ppm, col = "green")
abline(v = 12, lwd = 2)
a... | /swirl.R | no_license | pablovmurcia3/Exploratory-Data-Analysis | R | false | false | 3,806 | r | library(swirl)
swirl()
head(pollution)
dim(pollution)
summary(pollution$pm25)
quantile(ppm)
boxplot(ppm, col = "blue")
abline(h =12) # drew a horizontal line at 12
2
hist(ppm, col = "green")
rug(ppm)
low
high
hist(ppm, col = "green", breaks = 100)
rug(ppm)
hist(ppm, col = "green")
abline(v = 12, lwd = 2)
a... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{new_prs}
\alias{new_prs}
\title{Construct several polygenic risk scores from a matrix of weights.}
\usage{
new_prs(input)
}
\arguments{
\item{name}{Path to .ped file (or binary file, working on this now).}
\item{weights}{... | /man/new_prs.Rd | permissive | olladapunaresh/pRs | R | false | true | 530 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RcppExports.R
\name{new_prs}
\alias{new_prs}
\title{Construct several polygenic risk scores from a matrix of weights.}
\usage{
new_prs(input)
}
\arguments{
\item{name}{Path to .ped file (or binary file, working on this now).}
\item{weights}{... |
#' Build news section
#'
#' @description
#' A `NEWS.md` will be broken up into versions using level one (`#`) or
#' level two headings (`##`) that (partially) match one of the following forms
#' (ignoring case):
#'
#' * `{package name} 1.3.0`
#' * `{package name} v1.3.0`
#' * `Version 1.3.0`
#' * `Changes in 1.3.0`
#' ... | /R/build-news.R | permissive | r-lib/pkgdown | R | false | false | 9,342 | r | #' Build news section
#'
#' @description
#' A `NEWS.md` will be broken up into versions using level one (`#`) or
#' level two headings (`##`) that (partially) match one of the following forms
#' (ignoring case):
#'
#' * `{package name} 1.3.0`
#' * `{package name} v1.3.0`
#' * `Version 1.3.0`
#' * `Changes in 1.3.0`
#' ... |
library(car)
library(boot)
library(magrittr)
library(tibble)
#install.packages('xlsx')
#install.packages('forcats')
library(xlsx)
library(forcats)
#install.packages('QuantPsyc')
library(MASS)
#install.packages('norm')
library(QuantPsyc)
#install.packages('haven')
library(haven)
data <- read.xlsx('D:/estudo-machine-... | /atividade_06.R | no_license | itimes-digital/Regressao-Linear-Usando-R | R | false | false | 1,262 | r | library(car)
library(boot)
library(magrittr)
library(tibble)
#install.packages('xlsx')
#install.packages('forcats')
library(xlsx)
library(forcats)
#install.packages('QuantPsyc')
library(MASS)
#install.packages('norm')
library(QuantPsyc)
#install.packages('haven')
library(haven)
data <- read.xlsx('D:/estudo-machine-... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RCy3-notebook.R
\name{getJupyterBridgeURL}
\alias{getJupyterBridgeURL}
\title{getJupyterBridgeURL}
\usage{
getJupyterBridgeURL()
}
\value{
jupyter bridge server url
}
\description{
Get the jupyter bridge server url
}
\examples{
\donttest{
get... | /man/getJupyterBridgeURL.Rd | permissive | cytoscape/RCy3 | R | false | true | 343 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RCy3-notebook.R
\name{getJupyterBridgeURL}
\alias{getJupyterBridgeURL}
\title{getJupyterBridgeURL}
\usage{
getJupyterBridgeURL()
}
\value{
jupyter bridge server url
}
\description{
Get the jupyter bridge server url
}
\examples{
\donttest{
get... |
Pcoef <- function (x)
{
if (!(class(x) == "varest")) {
stop("\nPlease provide an object of class 'varest', generated by 'var()'.\n")
}
K <- x$K
p <- x$p
A <- Signcoef(x)[, 1:(K * p)]
As <- list()
start <- seq(1, p * K, K)
end <- seq(K, p * K, K)
for (i in 1:p) {
As[[i]] <- matri... | /R/Pcoef.R | no_license | SpyBal/psychNET | R | false | false | 473 | r |
Pcoef <- function (x)
{
if (!(class(x) == "varest")) {
stop("\nPlease provide an object of class 'varest', generated by 'var()'.\n")
}
K <- x$K
p <- x$p
A <- Signcoef(x)[, 1:(K * p)]
As <- list()
start <- seq(1, p * K, K)
end <- seq(K, p * K, K)
for (i in 1:p) {
As[[i]] <- matri... |
#' @importFrom dplyr inner_join relocate select filter
#' @importFrom rlang list2
prepare_pairwise_probs <- function(marginals, ...) {
dots <- rlang::list2(...)
result <- list()
for (pr_df in dots) {
cov1 <- names(pr_df)[1]
cov2 <- names(pr_df)[2]
pr_df[[cov1]] <- as.character(pr_df[... | /R/prepare_pairwise_probs.R | permissive | ddimmery/cdsampler | R | false | false | 1,149 | r | #' @importFrom dplyr inner_join relocate select filter
#' @importFrom rlang list2
prepare_pairwise_probs <- function(marginals, ...) {
dots <- rlang::list2(...)
result <- list()
for (pr_df in dots) {
cov1 <- names(pr_df)[1]
cov2 <- names(pr_df)[2]
pr_df[[cov1]] <- as.character(pr_df[... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/showLty.r
\name{showLty}
\alias{showLty}
\title{Show the line types}
\usage{
showLty()
}
\description{
Show the line types
}
| /man/showLty.Rd | no_license | mkomod/rmktools | R | false | true | 203 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/showLty.r
\name{showLty}
\alias{showLty}
\title{Show the line types}
\usage{
showLty()
}
\description{
Show the line types
}
|
# ################################################################# #
#### LOAD LIBRARY AND DEFINE CORE SETTINGS ####
# ################################################################# #
### Clear memory
rm(list = ls())
### Load Apollo library
library(apollo)
### Initialise code
apollo_initial... | /R Modelos Eleccion Discreta/Ejemplos Apollo/models_and_data/Apollo_example_7.r | no_license | williz519/ModelosED | R | false | false | 7,395 | r | # ################################################################# #
#### LOAD LIBRARY AND DEFINE CORE SETTINGS ####
# ################################################################# #
### Clear memory
rm(list = ls())
### Load Apollo library
library(apollo)
### Initialise code
apollo_initial... |
student.df = data.frame( name = c("Sue", "Eva", "Henry", "Jan"),
sex = c("f", "f", "m", "m"),
years = c(21,31,29,19)); student.df
student.df$male.teenNew <- ifelse(student.df$sex=="m" & student.df$years<20,"T","F")
student.df
1:10
for (v in 1:length(1:3))
{
f... | /R-1.R | no_license | tush99m/R-Code | R | false | false | 1,007 | r | student.df = data.frame( name = c("Sue", "Eva", "Henry", "Jan"),
sex = c("f", "f", "m", "m"),
years = c(21,31,29,19)); student.df
student.df$male.teenNew <- ifelse(student.df$sex=="m" & student.df$years<20,"T","F")
student.df
1:10
for (v in 1:length(1:3))
{
f... |
library(zip)
library(dplyr)
fileUrl<-("https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip")
download.file(fileUrl, destfile = "./data/project.zip")
##unzip data file to projectfiles folder in working directory
unzip("./data/project.zip", exdir="./data/projectfiles")
##rea... | /run_analysis.r | no_license | pattyc882/getting-and-cleaning-data-project | R | false | false | 3,849 | r | library(zip)
library(dplyr)
fileUrl<-("https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip")
download.file(fileUrl, destfile = "./data/project.zip")
##unzip data file to projectfiles folder in working directory
unzip("./data/project.zip", exdir="./data/projectfiles")
##rea... |
## Exploratory Data Analysis
## Coursera
## John Hopkins - Bloomberg School
## Assignment 1
Sys.timezone(location = TRUE)
#import required packages
library(dplyr)
# 1. Search for 1/2 and 2/2 of 2007 to create a shorter file
# Keep headers as needed
write("Date;Time;Global_active_power;Global_reactive_power... | /plot4.R | no_license | rafamunozg/ExData_Plotting1 | R | false | false | 3,429 | r | ## Exploratory Data Analysis
## Coursera
## John Hopkins - Bloomberg School
## Assignment 1
Sys.timezone(location = TRUE)
#import required packages
library(dplyr)
# 1. Search for 1/2 and 2/2 of 2007 to create a shorter file
# Keep headers as needed
write("Date;Time;Global_active_power;Global_reactive_power... |
library(ggplot2)
## library(reshape2)
args <- commandArgs(TRUE)
d <- read.table(gzfile(args[1]), header=T)
colnames(d) <- c("gene","snp","beta","tstat","pvalue")
mind <- aggregate(pvalue ~ gene, d, function(x) min(x))
mind <- subset(mind, pvalue<=0.05)
write.table(merge(mind, d), file=args[2], sep="\t", row.names=F... | /bestEqtl.R | no_license | arushiv/toolScripts | R | false | false | 340 | r | library(ggplot2)
## library(reshape2)
args <- commandArgs(TRUE)
d <- read.table(gzfile(args[1]), header=T)
colnames(d) <- c("gene","snp","beta","tstat","pvalue")
mind <- aggregate(pvalue ~ gene, d, function(x) min(x))
mind <- subset(mind, pvalue<=0.05)
write.table(merge(mind, d), file=args[2], sep="\t", row.names=F... |
rgb2col <- function(x, alpha = FALSE) {
if (alpha) {
rgb(x[1, ], x[2, ], x[3, ], alpha = x[4, ], maxColorValue = 255)
} else {
rgb(x[1, ], x[2, ], x[3, ], maxColorValue = 255)
}
}
rgb_norn <- function(x) {
x[x > 255] <- 255
x[x < 0] <- 0
x
}
pro_transform <- function(data, value, ratio) {
value ... | /R/aaa.R | permissive | kant/prismatic | R | false | false | 351 | r | rgb2col <- function(x, alpha = FALSE) {
if (alpha) {
rgb(x[1, ], x[2, ], x[3, ], alpha = x[4, ], maxColorValue = 255)
} else {
rgb(x[1, ], x[2, ], x[3, ], maxColorValue = 255)
}
}
rgb_norn <- function(x) {
x[x > 255] <- 255
x[x < 0] <- 0
x
}
pro_transform <- function(data, value, ratio) {
value ... |
library(SimInf)
### Name: run_outer
### Title: Run 'SimInf_model' on scaled parameters
### Aliases: run_outer
### ** Examples
## Not run:
##D ## Create an SIR-model with 500 nodes of 99 susceptible individuals
##D ## and one infected individuals.
##D u0 <- data.frame(S = rep(99, 500), I = rep(1, 500), R = rep(0, 5... | /data/genthat_extracted_code/SimInf/examples/run_outer.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,938 | r | library(SimInf)
### Name: run_outer
### Title: Run 'SimInf_model' on scaled parameters
### Aliases: run_outer
### ** Examples
## Not run:
##D ## Create an SIR-model with 500 nodes of 99 susceptible individuals
##D ## and one infected individuals.
##D u0 <- data.frame(S = rep(99, 500), I = rep(1, 500), R = rep(0, 5... |
#' Airline names.
#'
#' Look up airline names from their carrier codes.
#'
#' @source https://www.transtats.bts.gov/DL_SelectFields.asp?Table_ID=236
#' @format Data frame with columns
#' \describe{
#' \item{carrier}{Two letter abbreviation}
#' \item{name}{Full name}
#' }
#' @examples
#' airlines
"airlines"
| /nycflights13/R/airlines.R | no_license | qiwsir/DataSet | R | false | false | 310 | r | #' Airline names.
#'
#' Look up airline names from their carrier codes.
#'
#' @source https://www.transtats.bts.gov/DL_SelectFields.asp?Table_ID=236
#' @format Data frame with columns
#' \describe{
#' \item{carrier}{Two letter abbreviation}
#' \item{name}{Full name}
#' }
#' @examples
#' airlines
"airlines"
|
# ---- PROPHET BOOST ----
context("TEST prophet_boost: prophet_xgboost")
# SETUP ----
# Data
m750 <- m4_monthly %>% filter(id == "M750")
# Split Data 80/20
splits <- initial_time_split(m750, prop = 0.8)
# Model Spec
model_spec <- prophet_boost(
growth = 'linear',
changepoint_num ... | /tests/testthat/test-algo-prophet_boost.R | permissive | ggardiakos/modeltime | R | false | false | 11,631 | r | # ---- PROPHET BOOST ----
context("TEST prophet_boost: prophet_xgboost")
# SETUP ----
# Data
m750 <- m4_monthly %>% filter(id == "M750")
# Split Data 80/20
splits <- initial_time_split(m750, prop = 0.8)
# Model Spec
model_spec <- prophet_boost(
growth = 'linear',
changepoint_num ... |
## Compute inverse of matrix and cache it rather than looping.
## Assume matrix supplied is invertible.
## Create matrix object that can cache its inverse m
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
... | /cachematrix.R | no_license | armistead/ProgrammingAssignment2 | R | false | false | 898 | r | ## Compute inverse of matrix and cache it rather than looping.
## Assume matrix supplied is invertible.
## Create matrix object that can cache its inverse m
makeCacheMatrix <- function(x = matrix()) {
m <- NULL
set <- function(y) {
x <<- y
m <<- NULL
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getCoxInfo.R
\name{SurvResponseVar}
\alias{SurvResponseVar}
\title{Extract the time and event variable from a Cox model}
\usage{
SurvResponseVar(formula)
}
\arguments{
\item{formula}{a formula}
}
\description{
Extract the time and event varia... | /man/SurvResponseVar.Rd | no_license | bozenne/riskRegressionLight | R | false | true | 383 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getCoxInfo.R
\name{SurvResponseVar}
\alias{SurvResponseVar}
\title{Extract the time and event variable from a Cox model}
\usage{
SurvResponseVar(formula)
}
\arguments{
\item{formula}{a formula}
}
\description{
Extract the time and event varia... |
# Load Libraries-------------------------------
library(TSA) #fourier
library(tidyverse) #because generally useful
library(lattice) #arguably better histograms, etc.
library(psych) #contains various descriptive stats like im used to
library(lubridate) #handling dates
library(sjstats) #eta squared and ANOVA stats, nice... | /meeting/20190618_InfoNet_daily_calls_example/Daily Calls Script Rewrite.R | no_license | ICJIA/r-user-group | R | false | false | 15,927 | r | # Load Libraries-------------------------------
library(TSA) #fourier
library(tidyverse) #because generally useful
library(lattice) #arguably better histograms, etc.
library(psych) #contains various descriptive stats like im used to
library(lubridate) #handling dates
library(sjstats) #eta squared and ANOVA stats, nice... |
## How do we read data files into R?
## Most of the data we will use will come from a collection of excel files zipped
## together and made available on D2L
# Read in the data from DDT
# header is true because of variable names on the top of each column
ddt=read.table(file.choose(),sep=",",header=TRUE)
# Fi... | /University of Oklahoma/Fundamentals of Engineering Statistical Analysis/Labs/01 Lab 1/lab1.R | no_license | saeid-h/homeworks-repo | R | false | false | 5,042 | r | ## How do we read data files into R?
## Most of the data we will use will come from a collection of excel files zipped
## together and made available on D2L
# Read in the data from DDT
# header is true because of variable names on the top of each column
ddt=read.table(file.choose(),sep=",",header=TRUE)
# Fi... |
\name{AddAlleleLinkages}
\alias{AddAlleleLinkages}
\alias{AddAlleleLinkages.RADdata}
\alias{AddGenotypePriorProb_LD}
\alias{AddGenotypePriorProb_LD.RADdata}
\title{
Identify and Utilize Linked Alleles for Estimating Genotype Priors
}
\description{
\code{AddAlleleLinkages} finds alleles, if any, in linkage disequilibriu... | /man/AddAlleleLinkages.Rd | no_license | quanrd/polyRAD | R | false | false | 5,185 | rd | \name{AddAlleleLinkages}
\alias{AddAlleleLinkages}
\alias{AddAlleleLinkages.RADdata}
\alias{AddGenotypePriorProb_LD}
\alias{AddGenotypePriorProb_LD.RADdata}
\title{
Identify and Utilize Linked Alleles for Estimating Genotype Priors
}
\description{
\code{AddAlleleLinkages} finds alleles, if any, in linkage disequilibriu... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ncaugex.R
\name{ncaugex_fun}
\alias{ncaugex_fun}
\title{Netcapex functions: iii Augex}
\usage{
ncaugex_fun(fcnetavg, augexratio, growth.df, noassets, assetcode)
}
\arguments{
\item{fcnetavg}{empty dataframe with first 5 years from DNSP and an... | /man/ncaugex_fun.Rd | no_license | estalenberg/ptrm | R | false | true | 818 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ncaugex.R
\name{ncaugex_fun}
\alias{ncaugex_fun}
\title{Netcapex functions: iii Augex}
\usage{
ncaugex_fun(fcnetavg, augexratio, growth.df, noassets, assetcode)
}
\arguments{
\item{fcnetavg}{empty dataframe with first 5 years from DNSP and an... |
inv.fft.2d <- function(DT, xx='kx', yy='ky', pitch=pi){
frequencies <- unique(DT$freq)
FT2D <- function(f){
z <- DT[freq==f, .(get(xx),get(yy),ft)]
z <- reshape2::acast(z, V1~V2)
kz <- stats::fft(z, inverse=T)
kz <- reshape2::melt(kz)
ft <- data.table(freq=f,
kx=pitch*kz$V... | /R/inv.fft.2d.r | no_license | benjamtre/fieldscanr | R | false | false | 737 | r | inv.fft.2d <- function(DT, xx='kx', yy='ky', pitch=pi){
frequencies <- unique(DT$freq)
FT2D <- function(f){
z <- DT[freq==f, .(get(xx),get(yy),ft)]
z <- reshape2::acast(z, V1~V2)
kz <- stats::fft(z, inverse=T)
kz <- reshape2::melt(kz)
ft <- data.table(freq=f,
kx=pitch*kz$V... |
#### Import lobster data from various databases
require(bio.lobster)
p = bio.lobster::load.environment()
#
##### lumped function lobster.db
#be sure to update current.assessment.year.r
p$yrs = 1947:p$current.assessment.year
# run in windows environment
if(redo.all) lobster.db(DS="complete.... | /inst/1.ImportData.R | no_license | gomezcatalina/bio.lobster | R | false | false | 4,720 | r |
#### Import lobster data from various databases
require(bio.lobster)
p = bio.lobster::load.environment()
#
##### lumped function lobster.db
#be sure to update current.assessment.year.r
p$yrs = 1947:p$current.assessment.year
# run in windows environment
if(redo.all) lobster.db(DS="complete.... |
# Remarque: si vous rencontrez des problèmes d'accentuation, consultez ce lien:
# https://support.rstudio.com/hc/en-us/articles/200532197-Character-Encoding
getwd()
#En R, un facteur (ou factor) est un vecteur contenant uniquement
# certaines valeurs predefinies.Les valeurs pre-definies sont
# appelees des le... | /12)facteur.R | no_license | annefrancine/coursR | R | false | false | 1,794 | r | # Remarque: si vous rencontrez des problèmes d'accentuation, consultez ce lien:
# https://support.rstudio.com/hc/en-us/articles/200532197-Character-Encoding
getwd()
#En R, un facteur (ou factor) est un vecteur contenant uniquement
# certaines valeurs predefinies.Les valeurs pre-definies sont
# appelees des le... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggMap.R
\name{ggLegMap}
\alias{ggLegMap}
\title{Internal to add legends to maps}
\usage{
ggLegMap(
legend = list(breaks = NULL, density = F, title = NULL),
p,
color,
limits
)
}
\arguments{
\item{p}{Map in a ggplot format}
\item{color... | /man/ggLegMap.Rd | no_license | echatignoux/CalibInc | R | false | true | 610 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggMap.R
\name{ggLegMap}
\alias{ggLegMap}
\title{Internal to add legends to maps}
\usage{
ggLegMap(
legend = list(breaks = NULL, density = F, title = NULL),
p,
color,
limits
)
}
\arguments{
\item{p}{Map in a ggplot format}
\item{color... |
#iButtons
# Load Libraries ####
library('openair')
library('ggplot2')
library('reshape2')
# Load the data ####
# HUV118
HUV118 <- read.csv("~/data/CONA/BRANZ/HUV118.csv")
HUV118$date <- as.POSIXct(HUV118$Timestamp,format = '%d/%m/%Y %H:%M',tz = 'NZST')
HUV118$Timestamp <- NULL
names(HUV118) <- c('CH1.118','Temp.118','d... | /branz.R | permissive | guolivar/cona | R | false | false | 2,271 | r | #iButtons
# Load Libraries ####
library('openair')
library('ggplot2')
library('reshape2')
# Load the data ####
# HUV118
HUV118 <- read.csv("~/data/CONA/BRANZ/HUV118.csv")
HUV118$date <- as.POSIXct(HUV118$Timestamp,format = '%d/%m/%Y %H:%M',tz = 'NZST')
HUV118$Timestamp <- NULL
names(HUV118) <- c('CH1.118','Temp.118','d... |
rm(list=ls())
setwd("D:/Eggert/Documents/GitHub/StatisticsInR_Intro/ExampleRCode")
library(data.table)
dat <- fread("../ExampleData/2f_rcbd_cow.txt")
##----2way ANOVA----
# Randomized Complete Block Design
# 2 fixed factors: nutrition and familiy
# in three barns = blocks = repetition
# Two-Way ANOVA with two fixed f... | /ExampleRCode/2f_rcbd_cow.R | no_license | AnjaEggert/StatisticsInR_Intro | R | false | false | 3,842 | r | rm(list=ls())
setwd("D:/Eggert/Documents/GitHub/StatisticsInR_Intro/ExampleRCode")
library(data.table)
dat <- fread("../ExampleData/2f_rcbd_cow.txt")
##----2way ANOVA----
# Randomized Complete Block Design
# 2 fixed factors: nutrition and familiy
# in three barns = blocks = repetition
# Two-Way ANOVA with two fixed f... |
## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setinv <- function(inverse) inv <<... | /cachematrix.R | no_license | nidhipatni1/ProgrammingAssignment2 | R | false | false | 1,040 | r | ## Put comments here that give an overall description of what your
## functions do
## Write a short comment describing this function
makeCacheMatrix <- function(x = matrix()) {
inv <- NULL
set <- function(y) {
x <<- y
inv <<- NULL
}
get <- function() x
setinv <- function(inverse) inv <<... |
\name{list.stats}
\alias{list.stats}
\title{
Returning information on a dynamic landscape list
}
\description{
This function allows the computation of some statistics of the sequence of landscapes obtained from simulate.graph. Namely: mean area of the patches, standard deviation of the area, mean pairwise Euclidean dis... | /man/list.stats.Rd | no_license | cran/MetaLandSim | R | false | false | 2,491 | rd | \name{list.stats}
\alias{list.stats}
\title{
Returning information on a dynamic landscape list
}
\description{
This function allows the computation of some statistics of the sequence of landscapes obtained from simulate.graph. Namely: mean area of the patches, standard deviation of the area, mean pairwise Euclidean dis... |
# set env
# install.packages ("dplyr")
# install.packages ("tidyverse")
library ("tidyverse")
library("dplyr")
# Set files dirctory from where to read data (csv files).
filesDir <- "C:\\work\\dataScience\\springboard\\springboardIntro"
setwd(filesDir)
# Read *Match.csv which has summary of each match playe... | /dataWrangling_2018IPLDataForTestingProjectWork.R | no_license | asahay001/springboardIntro | R | false | false | 15,266 | r | # set env
# install.packages ("dplyr")
# install.packages ("tidyverse")
library ("tidyverse")
library("dplyr")
# Set files dirctory from where to read data (csv files).
filesDir <- "C:\\work\\dataScience\\springboard\\springboardIntro"
setwd(filesDir)
# Read *Match.csv which has summary of each match playe... |
vecl<-1:16
cat(vecl[1],vec1[16],"\n")
cat(vec1,"length=",length(vec1),"\n")
vec2<-vec1[3:10]
cat(vec2,"length=",length(vec2),"\n") | /vector.R | no_license | d42knight/chem160module14 | R | false | false | 130 | r | vecl<-1:16
cat(vecl[1],vec1[16],"\n")
cat(vec1,"length=",length(vec1),"\n")
vec2<-vec1[3:10]
cat(vec2,"length=",length(vec2),"\n") |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/docdata.R
\docType{data}
\name{beta.prob}
\alias{beta.prob}
\title{List with assembling probabilities of beta chain TCRs.}
\format{
\code{beta.prob} is a list of matrices and data frames.
}
\description{
\code{beta.prob} is a list with probab... | /fuzzedpackages/tcR/man/beta.prob.Rd | no_license | akhikolla/testpackages | R | false | true | 2,063 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/docdata.R
\docType{data}
\name{beta.prob}
\alias{beta.prob}
\title{List with assembling probabilities of beta chain TCRs.}
\format{
\code{beta.prob} is a list of matrices and data frames.
}
\description{
\code{beta.prob} is a list with probab... |
#! /usr/bin/env Rscript
library(ggplot2)
library(scales)
args <- commandArgs(trailingOnly = TRUE)
inp <- args[1]
out <- args[2]
lbl <- args[3]
dat <- read.csv(inp, header = TRUE, na.string = "", stringsAsFactors = TRUE)
times <- dat$tim
png(filename=paste(out, ".png", sep=""), bg="white", width=500, height=500)
gg... | /run_graphics.r | no_license | gangsterveggies/parallel-eco-sim | R | false | false | 1,095 | r | #! /usr/bin/env Rscript
library(ggplot2)
library(scales)
args <- commandArgs(trailingOnly = TRUE)
inp <- args[1]
out <- args[2]
lbl <- args[3]
dat <- read.csv(inp, header = TRUE, na.string = "", stringsAsFactors = TRUE)
times <- dat$tim
png(filename=paste(out, ".png", sep=""), bg="white", width=500, height=500)
gg... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/delete_ad.R
\name{deleteAd}
\alias{deleteAd}
\title{Delete an ad}
\usage{
deleteAd(ad.id)
}
\arguments{
\item{ad.id}{id of object to delete}
}
\description{
Delete an ad.
}
\examples{
\dontrun{
# authenticate
orionOAuth(client.id = 0000,
... | /man/deleteAd.Rd | no_license | JohnCoene/oRion | R | false | true | 918 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/delete_ad.R
\name{deleteAd}
\alias{deleteAd}
\title{Delete an ad}
\usage{
deleteAd(ad.id)
}
\arguments{
\item{ad.id}{id of object to delete}
}
\description{
Delete an ad.
}
\examples{
\dontrun{
# authenticate
orionOAuth(client.id = 0000,
... |
c <- 299792458
lightMinut <- c*60
lightHour <- lightMinut*60
lightDay <- lightHour*24
lightYear <- lightDay*365.2422
cat("lenghth of light year:", lightYear, "\n")
add <- function(x,y){
z <- x + y
cat("x=", x, "y=", y, "\n")
return(z)
}
lightyear <- function(ly){
c <- 299792458
lightMinut <- c*60
lightHou... | /w2-2.R | no_license | KarlieChen/INFO201w2 | R | false | false | 415 | r | c <- 299792458
lightMinut <- c*60
lightHour <- lightMinut*60
lightDay <- lightHour*24
lightYear <- lightDay*365.2422
cat("lenghth of light year:", lightYear, "\n")
add <- function(x,y){
z <- x + y
cat("x=", x, "y=", y, "\n")
return(z)
}
lightyear <- function(ly){
c <- 299792458
lightMinut <- c*60
lightHou... |
get.file.parts <- function(file.fullpath) {
# ===================================
# Function will take a file name with path and split the file name into
# path, fullname, name and ext
# ===================================
if (! is.character(file.fullpath)) {
stop('File name must be a string')
}
... | /makeHeatmapsGeneral.R | no_license | pgreddy97/ADMouse | R | false | false | 24,758 | r | get.file.parts <- function(file.fullpath) {
# ===================================
# Function will take a file name with path and split the file name into
# path, fullname, name and ext
# ===================================
if (! is.character(file.fullpath)) {
stop('File name must be a string')
}
... |
library(sensory)
### Name: The Brown Bread Data
### Title: The Brown Bread Data Set
### Aliases: bbread
### Keywords: datasets Brown Bread Data Sensory Informed Designs
### ** Examples
data(bbread) # Loads the brown bread data set
head(bbread) # Displays the first six rows of the brown bread data set
| /data/genthat_extracted_code/sensory/examples/bbread.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 309 | r | library(sensory)
### Name: The Brown Bread Data
### Title: The Brown Bread Data Set
### Aliases: bbread
### Keywords: datasets Brown Bread Data Sensory Informed Designs
### ** Examples
data(bbread) # Loads the brown bread data set
head(bbread) # Displays the first six rows of the brown bread data set
|
\name{c212.trial.interval.data2}
\docType{data}
\alias{c212.trial.interval.data2}
\title{Interim analysis trial data.}
\description{
This data set contains count of the adverse events over all intervals of a clinical trial.
}
\usage{c212.trial.interval.data2}
\format{A dataframe with columns \emph{interval}, \emph{I_... | /man/c212.trial.interval.data2.rd | no_license | alopezcasanel/c212 | R | false | false | 807 | rd | \name{c212.trial.interval.data2}
\docType{data}
\alias{c212.trial.interval.data2}
\title{Interim analysis trial data.}
\description{
This data set contains count of the adverse events over all intervals of a clinical trial.
}
\usage{c212.trial.interval.data2}
\format{A dataframe with columns \emph{interval}, \emph{I_... |
#'Função para subtrair
#'
#'Esta função serve para subtrair dois numeros
#'
#'@param a número(inteiro ou real)
#'@param b número(inteiro ou real)
#'
#'@exemples
#' subtrair(3,2)
#'--->1
#' @export
subtrair <- function(a,b){
a-b
}
| /R/subtrair.R | no_license | alicefms/R-calculadora | R | false | false | 238 | r | #'Função para subtrair
#'
#'Esta função serve para subtrair dois numeros
#'
#'@param a número(inteiro ou real)
#'@param b número(inteiro ou real)
#'
#'@exemples
#' subtrair(3,2)
#'--->1
#' @export
subtrair <- function(a,b){
a-b
}
|
testlist <- list(Rs = c(-1.95772717497489e+276, 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), atmp = numeric(0), relh = c(7.64681398433536e-304, -4.29227809743625e-307, 1.81037701089217e+87, -2.93112217825115e-158, 9.03412394302482e-46, 7.31195213563656e+256, -1.93925524... | /meteor/inst/testfiles/ET0_Makkink/AFL_ET0_Makkink/ET0_Makkink_valgrind_files/1615863563-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 474 | r | testlist <- list(Rs = c(-1.95772717497489e+276, 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), atmp = numeric(0), relh = c(7.64681398433536e-304, -4.29227809743625e-307, 1.81037701089217e+87, -2.93112217825115e-158, 9.03412394302482e-46, 7.31195213563656e+256, -1.93925524... |
\name{PoissonUMIFeatureSelectionDropouts}
\alias{PoissonUMIFeatureSelectionDropouts}
\title{Dropout-based Feature Selection}
\description{
Ranks genes by significance of increase in dropouts compared to expectation.
}
\usage{
PoissonUMIFeatureSelectionDropouts(fit)
}
\arguments{
\item{fit}{output from NBumiFitMod... | /man/PoissonUMIFeatureSelectionDropouts.Rd | no_license | tallulandrews/M3Drop | R | false | false | 1,013 | rd | \name{PoissonUMIFeatureSelectionDropouts}
\alias{PoissonUMIFeatureSelectionDropouts}
\title{Dropout-based Feature Selection}
\description{
Ranks genes by significance of increase in dropouts compared to expectation.
}
\usage{
PoissonUMIFeatureSelectionDropouts(fit)
}
\arguments{
\item{fit}{output from NBumiFitMod... |
#' diagonal_multiple UI Function
#'
#' @description A shiny Module.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd
#'
#' @importFrom shiny NS tagList
#' @importFrom utils write.csv
mod_diagonal_multiple_ui <- function(id) {
ns <- NS(id)
tagList(
h4("Unreplicated Multiple Dia... | /R/mod_diagonal_multiple.R | permissive | DidierMurilloF/FielDHub | R | false | false | 64,193 | r | #' diagonal_multiple UI Function
#'
#' @description A shiny Module.
#'
#' @param id,input,output,session Internal parameters for {shiny}.
#'
#' @noRd
#'
#' @importFrom shiny NS tagList
#' @importFrom utils write.csv
mod_diagonal_multiple_ui <- function(id) {
ns <- NS(id)
tagList(
h4("Unreplicated Multiple Dia... |
library(shiny)
basicPage(
h3("Explanation"),
h6("This collection of shiny apps is designed to assist researchers with soil sampling design. They are a companion to the paper available at https://arxiv.org/abs/2101.07398. The first two apps return sample and assay sizes that will minimize costs while achieving a c... | /shiny/explanation_page.R | no_license | izzysoil16/soil-carbon-statistics | R | false | false | 2,292 | r | library(shiny)
basicPage(
h3("Explanation"),
h6("This collection of shiny apps is designed to assist researchers with soil sampling design. They are a companion to the paper available at https://arxiv.org/abs/2101.07398. The first two apps return sample and assay sizes that will minimize costs while achieving a c... |
library(HARModel)
### Name: HARestimate
### Title: HAR estimation
### Aliases: HARestimate
### ** Examples
set.seed(123)
#Simulate a HAR process:
HARSim = HARsimulate(iLength = 10000,
vLags = c(1,5,22), vCoef = c(0.5, 0.36 , 0.28 , 0.28 ))
#Estimate the HAR process:
HARModel = HARestimate(vRealizedMeasure = HARSim... | /data/genthat_extracted_code/HARModel/examples/HARestimate.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 355 | r | library(HARModel)
### Name: HARestimate
### Title: HAR estimation
### Aliases: HARestimate
### ** Examples
set.seed(123)
#Simulate a HAR process:
HARSim = HARsimulate(iLength = 10000,
vLags = c(1,5,22), vCoef = c(0.5, 0.36 , 0.28 , 0.28 ))
#Estimate the HAR process:
HARModel = HARestimate(vRealizedMeasure = HARSim... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SlingShot.R
\name{plotLineangeGene}
\alias{plotLineangeGene}
\title{Plot heatmap of the pseudotime data}
\usage{
plotLineangeGene(
object,
features,
lineage = "lineage1",
col,
lo.col = "red",
hi.col = "green",
group.by = NULL
)
... | /man/plotLineangeGene.Rd | no_license | Morriseylab/scExtras | R | false | true | 642 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/SlingShot.R
\name{plotLineangeGene}
\alias{plotLineangeGene}
\title{Plot heatmap of the pseudotime data}
\usage{
plotLineangeGene(
object,
features,
lineage = "lineage1",
col,
lo.col = "red",
hi.col = "green",
group.by = NULL
)
... |
\name{organize.island.repeated}
\alias{organize.island.repeated}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
INTERNAL
}
\description{
Prepared a data set with multiple outcomes (methylation in multiple CpG sites in multiple rows per subject) to be such that it can be used by the GEE function... | /man/organize.island.repeated.Rd | no_license | miemiemiem/Aclust | R | false | false | 1,172 | rd | \name{organize.island.repeated}
\alias{organize.island.repeated}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
INTERNAL
}
\description{
Prepared a data set with multiple outcomes (methylation in multiple CpG sites in multiple rows per subject) to be such that it can be used by the GEE function... |
% Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/rotate.R
\name{click_rotate}
\alias{click_rotate}
\alias{click_rotate.default}
\alias{click_rotate.dendrogram}
\title{Interactively rotate a tree object}
\usage{
click_rotate(x, ...)
\method{click_rotate}{dendrogram}(x, plot = TRUE, ... | /man/click_rotate.Rd | no_license | timelyportfolio/dendextend | R | false | false | 1,430 | rd | % Generated by roxygen2 (4.1.1): do not edit by hand
% Please edit documentation in R/rotate.R
\name{click_rotate}
\alias{click_rotate}
\alias{click_rotate.default}
\alias{click_rotate.dendrogram}
\title{Interactively rotate a tree object}
\usage{
click_rotate(x, ...)
\method{click_rotate}{dendrogram}(x, plot = TRUE, ... |
#' My chisquare test
#' @param x a table
#' @importFrom stats chisq.test fisher.test
mychisq.test=function(x){
result=tryCatch(chisq.test(x),warning=function(w) return("warnings present"))
if(class(result)!="htest"){
result1=tryCatch(fisher.test(x),
error=function(e) return("err... | /R/x2Table.R | no_license | AdolfoRojas/webr_Adolfo | R | false | false | 7,156 | r | #' My chisquare test
#' @param x a table
#' @importFrom stats chisq.test fisher.test
mychisq.test=function(x){
result=tryCatch(chisq.test(x),warning=function(w) return("warnings present"))
if(class(result)!="htest"){
result1=tryCatch(fisher.test(x),
error=function(e) return("err... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/eth.R
\name{eth_getTransactionByBlockHashAndIndex}
\alias{eth_getTransactionByBlockHashAndIndex}
\title{Transaction information given a block hash and an index position.}
\usage{
eth_getTransactionByBlockHashAndIndex(block_hash, trans_i... | /man/eth_getTransactionByBlockHashAndIndex.Rd | no_license | cran/gethr | R | false | true | 2,678 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/eth.R
\name{eth_getTransactionByBlockHashAndIndex}
\alias{eth_getTransactionByBlockHashAndIndex}
\title{Transaction information given a block hash and an index position.}
\usage{
eth_getTransactionByBlockHashAndIndex(block_hash, trans_i... |
#' Spark ML -- Model Persistence
#'
#' Save/load Spark ML objects
#'
#' @param x A ML object, which could be a \code{ml_pipeline_stage} or a \code{ml_model}
#' @param path The path where the object is to be serialized/deserialized.
#' @param overwrite Whether to overwrite the existing path, defaults to \code{FALSE}.
#'... | /R/ml_persistence.R | permissive | rishabhbhardwaj/sparklyr | R | false | false | 3,232 | r | #' Spark ML -- Model Persistence
#'
#' Save/load Spark ML objects
#'
#' @param x A ML object, which could be a \code{ml_pipeline_stage} or a \code{ml_model}
#' @param path The path where the object is to be serialized/deserialized.
#' @param overwrite Whether to overwrite the existing path, defaults to \code{FALSE}.
#'... |
install.packages("rtweet")
library (rtweet)
library(syuzhet)
library(ggplot2)
library(xlsx)
library (jsonlite)
library(dplyr)
library(syuzhet)
library(tidyr)
library(lubridate)
library(ggplot2)
library(tidyr)
library(reshape2)
library(reshape)
library(radarchart)
library("data.table")
library("CASda... | /Sentiments Analysis.R | no_license | Purvesh24/Sentiment-Analysis-for-Twitter-and-Newspaper | R | false | false | 3,912 | r | install.packages("rtweet")
library (rtweet)
library(syuzhet)
library(ggplot2)
library(xlsx)
library (jsonlite)
library(dplyr)
library(syuzhet)
library(tidyr)
library(lubridate)
library(ggplot2)
library(tidyr)
library(reshape2)
library(reshape)
library(radarchart)
library("data.table")
library("CASda... |
#########
# 助推法
#########
gbmGrid <- expand.grid(interaction.depth = c(1, 3, 5, 7, 9),
n.trees = 1:5,
shrinkage = c(.01, .1),
n.minobsinnode = c(1:10))
set.seed(100)
gbmTune <- train(x = trainx,
y = trainy,
method = ... | /R/Ch11/11.6GradienBoosting.R | no_license | happyrabbit/DataScientistR | R | false | false | 2,153 | r | #########
# 助推法
#########
gbmGrid <- expand.grid(interaction.depth = c(1, 3, 5, 7, 9),
n.trees = 1:5,
shrinkage = c(.01, .1),
n.minobsinnode = c(1:10))
set.seed(100)
gbmTune <- train(x = trainx,
y = trainy,
method = ... |
#Created By: Aar Riana
##
library(tidyverse) # for data exploration and manipulation
library(skimr) # for useful and beautiful summary statistics
library(GGally) # for correlation testing
library(mice) #cek missing value
library(earth) #MARS
library(caret)
##read data
data1 <- read.csv("genotipo_sim2.csv")
data2 <- rea... | /code.R | no_license | rianaaar/association-mapping | R | false | false | 817 | r | #Created By: Aar Riana
##
library(tidyverse) # for data exploration and manipulation
library(skimr) # for useful and beautiful summary statistics
library(GGally) # for correlation testing
library(mice) #cek missing value
library(earth) #MARS
library(caret)
##read data
data1 <- read.csv("genotipo_sim2.csv")
data2 <- rea... |
observeEvent(input$tab_data_stat_confirm_remove_train_stat, {
my_log(
"DEBUG",
ra_config$debug_level,
"(tab_data_stat)",
"remove train stat table "
)
ra_project$tbl_stat_general_train <-
get_tbl_stat_general(df = NULL) # 不直接置空,由function确定统一的数据格式
ra_project$tbl_stat_special_train <-
get... | /tab_data_op_stat_remove.R | no_license | Allan-Mo/psbc_risk_shiny | R | false | false | 2,110 | r |
observeEvent(input$tab_data_stat_confirm_remove_train_stat, {
my_log(
"DEBUG",
ra_config$debug_level,
"(tab_data_stat)",
"remove train stat table "
)
ra_project$tbl_stat_general_train <-
get_tbl_stat_general(df = NULL) # 不直接置空,由function确定统一的数据格式
ra_project$tbl_stat_special_train <-
get... |
#' @title Cluster data with HMM-VB
#'
#' @description This function clusters dataset with HMM-VB. First, for each data point it finds an optimal state sequence
#' using Viterbi algorithm. Next, it uses Modal Baum-Welch algorithm (MBW) to find the modes
#' of distinct Viterbi state sequences. Data points associated the ... | /fuzzedpackages/HDclust/R/hmmvbClust.R | no_license | akhikolla/testpackages | R | false | false | 2,943 | r | #' @title Cluster data with HMM-VB
#'
#' @description This function clusters dataset with HMM-VB. First, for each data point it finds an optimal state sequence
#' using Viterbi algorithm. Next, it uses Modal Baum-Welch algorithm (MBW) to find the modes
#' of distinct Viterbi state sequences. Data points associated the ... |
#' @keywords internal
testSimCode <- function(){
library(CohortMethod)
setwd("c:/temp")
# If ff is complaining it can't find the temp folder, use options("fftempdir" = "c:/temp")
cohortData <- loadCohortData("mdcrCohortData")
cohortDataSimulationProfile <- createCohortDataSimulationProfile(cohortData... | /R/TestSimCode.R | permissive | zuoyizhang/CohortMethod | R | false | false | 4,493 | r | #' @keywords internal
testSimCode <- function(){
library(CohortMethod)
setwd("c:/temp")
# If ff is complaining it can't find the temp folder, use options("fftempdir" = "c:/temp")
cohortData <- loadCohortData("mdcrCohortData")
cohortDataSimulationProfile <- createCohortDataSimulationProfile(cohortData... |
#load libraries
library(devtools)
library(everypoliticianR)
library(twfyR)
library(jsonlite)
library(tidytext)
library(dplyr)
library(stringr)
library(ggplot2)
library(tidyr)
library(wordcloud)
library(knitr)
library(openxlsx)
library(tm)
library(wordcloud)
library(tokenizers)
library(SnowballC)
library(udpipe)
library... | /code/dataprepcode.R | no_license | clairemcdyre/thesis | R | false | false | 28,442 | r | #load libraries
library(devtools)
library(everypoliticianR)
library(twfyR)
library(jsonlite)
library(tidytext)
library(dplyr)
library(stringr)
library(ggplot2)
library(tidyr)
library(wordcloud)
library(knitr)
library(openxlsx)
library(tm)
library(wordcloud)
library(tokenizers)
library(SnowballC)
library(udpipe)
library... |
# Simon Filhol, 28 March 2013
# From raw point cloud to a surfaces in ".mat" format
# function inputs
# - Xlim <- Limit of the window of interest in the X-directioin in
# the same unit as the input data ex: Xlim=c(0,10). Has to bee multiple of dx
# - Ylim <- Limit of the window of interest in the ... | /Function/Practical/Ptcl2Surfmat.r | no_license | ArcticSnow/My-R-script | R | false | false | 4,180 | r | # Simon Filhol, 28 March 2013
# From raw point cloud to a surfaces in ".mat" format
# function inputs
# - Xlim <- Limit of the window of interest in the X-directioin in
# the same unit as the input data ex: Xlim=c(0,10). Has to bee multiple of dx
# - Ylim <- Limit of the window of interest in the ... |
R version 4.0.1 (2020-06-06) -- "See Things Now"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin17.0 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribut... | /Demo.R | no_license | zubair97431/autosRus | R | false | false | 47,507 | r |
R version 4.0.1 (2020-06-06) -- "See Things Now"
Copyright (C) 2020 The R Foundation for Statistical Computing
Platform: x86_64-apple-darwin17.0 (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribut... |
####################################################################################################################################
#This file shows our final method for adjusting a player's attack angle (plane of swing) to find their
#best wOBA. Please note this describes the last function as the others would cut of... | /Final Code/Adjusting_Attack_Angle.R | no_license | brooke-coneeny/CMSAcamp_baseball_project | R | false | false | 18,082 | r | ####################################################################################################################################
#This file shows our final method for adjusting a player's attack angle (plane of swing) to find their
#best wOBA. Please note this describes the last function as the others would cut of... |
# expressionMatrixToDElist.R -- convert one matrix of expression data into a list of DE tables
# Like that used for meta rankings, etc.
`expressionMatrixToDElist` <- function( x, groups=colnames(x), minimumValue=NULL, AVG.FUN=mean) {
deList <- vector( mode="list")
groupIDset <- sort( unique( groups))
if ( is.... | /R/expressionMatrixToDElist.R | no_license | robertdouglasmorrison/DuffyTools | R | false | false | 2,000 | r | # expressionMatrixToDElist.R -- convert one matrix of expression data into a list of DE tables
# Like that used for meta rankings, etc.
`expressionMatrixToDElist` <- function( x, groups=colnames(x), minimumValue=NULL, AVG.FUN=mean) {
deList <- vector( mode="list")
groupIDset <- sort( unique( groups))
if ( is.... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ruleSignal.R
\name{ruleSignal}
\alias{ruleSignal}
\title{default rule to generate a trade order on a signal}
\usage{
ruleSignal(mktdata = mktdata, timestamp, sigcol, sigval, orderqty = 0,
ordertype, orderside = NULL, orderset = NULL, thresh... | /man/ruleSignal.Rd | no_license | N0talent/quantstrat | R | false | true | 5,320 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ruleSignal.R
\name{ruleSignal}
\alias{ruleSignal}
\title{default rule to generate a trade order on a signal}
\usage{
ruleSignal(mktdata = mktdata, timestamp, sigcol, sigval, orderqty = 0,
ordertype, orderside = NULL, orderset = NULL, thresh... |
\name{hbeard}
\alias{hbeard}
\title{Beard hazard rate function}
\description{Computes the hazard rate function of the Beard distribution}
\usage{
hbeard(x, alpha = 1, beta = 1, rho = 1)
}
\arguments{
\item{x}{scale or vector of positive values at which the hazard rate function needs to be computed}
\item{a... | /man/hbeard.Rd | no_license | cran/ActuDistns | R | false | false | 944 | rd | \name{hbeard}
\alias{hbeard}
\title{Beard hazard rate function}
\description{Computes the hazard rate function of the Beard distribution}
\usage{
hbeard(x, alpha = 1, beta = 1, rho = 1)
}
\arguments{
\item{x}{scale or vector of positive values at which the hazard rate function needs to be computed}
\item{a... |
library(tidyverse)
library(schrute)
library(glue)
library(ggrepel)
she_said <- theoffice %>%
transmute(she_said = ifelse(
str_detect(text, 'what she said'), 1, 0),
season = parse_number(season),
episode = parse_number(episode),
text.ii = str_trim(text),
text.i = lead(text),
text.iii = l... | /scripts/The_Office.R | no_license | ElliotMeador84/misc_plots | R | false | false | 2,094 | r | library(tidyverse)
library(schrute)
library(glue)
library(ggrepel)
she_said <- theoffice %>%
transmute(she_said = ifelse(
str_detect(text, 'what she said'), 1, 0),
season = parse_number(season),
episode = parse_number(episode),
text.ii = str_trim(text),
text.i = lead(text),
text.iii = l... |
# clears workspace:
rm(list=ls())
library(rstan)
model <- "
// Retention With No Individual Differences
data {
int ns;
int nt;
int k[ns - 1,nt - 1];
int t[nt];
int n;
}
parameters {
real<lower=0,upper=1> alpha;
real<lower=0,upper=1> beta;
}
transformed parameters {
matrix<lower=0,upper=1>[ns,nt] t... | /part2/bayes/ch10/Retention_1_Stan.R | permissive | ssyoon/coco | R | false | false | 3,793 | r | # clears workspace:
rm(list=ls())
library(rstan)
model <- "
// Retention With No Individual Differences
data {
int ns;
int nt;
int k[ns - 1,nt - 1];
int t[nt];
int n;
}
parameters {
real<lower=0,upper=1> alpha;
real<lower=0,upper=1> beta;
}
transformed parameters {
matrix<lower=0,upper=1>[ns,nt] t... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mla.R
\name{print.mla}
\alias{print.mla}
\title{Print of the "mla" class}
\usage{
\method{print}{mla}(x, ...)
}
\arguments{
\item{x}{Object of class "mla".}
\item{...}{Not used.}
}
\description{
Print of the "mla" class
}
| /man/print.mla.Rd | permissive | FellipeMira/ForesToolboxRS | R | false | true | 301 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mla.R
\name{print.mla}
\alias{print.mla}
\title{Print of the "mla" class}
\usage{
\method{print}{mla}(x, ...)
}
\arguments{
\item{x}{Object of class "mla".}
\item{...}{Not used.}
}
\description{
Print of the "mla" class
}
|
require('tidyverse')
library("RColorBrewer")
library(extrafont)
font_import(pattern='calibri')
loadfonts(device = "win")
log_shift = 1.1
shift_pos = 6
# Read the ECMs as row vectors (R convention), and add column names for each metabolite
ecms <- read.csv('data/iJR_hideallexceptglco2biomass.csv', header=TRUE)
# Drop... | /old_clustering_scripts/clustering_iJR.R | no_license | dhdegroot/cluster_ECMs | R | false | false | 3,138 | r | require('tidyverse')
library("RColorBrewer")
library(extrafont)
font_import(pattern='calibri')
loadfonts(device = "win")
log_shift = 1.1
shift_pos = 6
# Read the ECMs as row vectors (R convention), and add column names for each metabolite
ecms <- read.csv('data/iJR_hideallexceptglco2biomass.csv', header=TRUE)
# Drop... |
a<-read.table("household_power_consumption.txt", nrows=700000, sep=";", na.strings=c("NA", "-", "?", ""))
b <- subset(a, V1=="1/2/2007" | V1=="2/2/2007")
time <- paste(b$V1, b$V2)
d <- strptime(time, "%d/%m/%Y %H:%M:%S")
plot(d, b$V7, ylab="Energy sub metering", xlab="", type="l", col = "black")
lines(d, b$V8, col ... | /plot3.R | no_license | faibhile/ExData_Plotting1 | R | false | false | 485 | r |
a<-read.table("household_power_consumption.txt", nrows=700000, sep=";", na.strings=c("NA", "-", "?", ""))
b <- subset(a, V1=="1/2/2007" | V1=="2/2/2007")
time <- paste(b$V1, b$V2)
d <- strptime(time, "%d/%m/%Y %H:%M:%S")
plot(d, b$V7, ylab="Energy sub metering", xlab="", type="l", col = "black")
lines(d, b$V8, col ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.