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 |
|---|---|---|---|---|---|---|---|---|---|
# Name: Testing the Perceptron Learning Algo.
# Author: Ranaji Krishna.
#
# Notes: The code tests the PL algo. by creating and
# random data pts. and tagging them as +1 and -1.
# It then calls the PLA fxn. "percepAlgo" to classify the
# points as +ve or -ve.
#
# The da... | /code_sample/code_R/test_percep.R | no_license | ranajikrishna/my_proj | R | false | false | 3,110 | r |
# Name: Testing the Perceptron Learning Algo.
# Author: Ranaji Krishna.
#
# Notes: The code tests the PL algo. by creating and
# random data pts. and tagging them as +1 and -1.
# It then calls the PLA fxn. "percepAlgo" to classify the
# points as +ve or -ve.
#
# The da... |
## PA Data Analysis ###
### Author : Chandrasen
### Date : 22-March-2018
# Installing required libraries to read the data
install.packages('readxl')
library(readxl)
#Extracting and reading the data into vector
Pa<-read.csv("C:/Users/chandrasen.wadikar/Desktop/PA data.csv")
View(Pa) #View the data and... | /PA_DATA_MODEL.R | no_license | chandrasenwadikar/Chandrasen | R | false | false | 2,848 | r | ## PA Data Analysis ###
### Author : Chandrasen
### Date : 22-March-2018
# Installing required libraries to read the data
install.packages('readxl')
library(readxl)
#Extracting and reading the data into vector
Pa<-read.csv("C:/Users/chandrasen.wadikar/Desktop/PA data.csv")
View(Pa) #View the data and... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/build_run_modify.r
\name{umxRAM2Ordinal}
\alias{umxRAM2Ordinal}
\title{umxRAM2Ordinal}
\usage{
umxRAM2Ordinal(model, verbose = T, thresholds = c("deviationBased",
"direct", "ignore", "left_censored"), name = NULL, showEstimates = TRUE,
re... | /man/umxRAM2Ordinal.Rd | no_license | arinbasu/umx | R | false | true | 1,619 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/build_run_modify.r
\name{umxRAM2Ordinal}
\alias{umxRAM2Ordinal}
\title{umxRAM2Ordinal}
\usage{
umxRAM2Ordinal(model, verbose = T, thresholds = c("deviationBased",
"direct", "ignore", "left_censored"), name = NULL, showEstimates = TRUE,
re... |
test_that("geojson_read works with file inputs", {
skip_on_cran()
file <- example_sys_file("california.geojson")
aa <- geojson_read(file)
expect_type(aa, "list")
expect_equal(aa$type, "FeatureCollection")
expect_type(aa$features, "list")
expect_equal(aa$features[[1]]$type, "Feature")
expect_setequal(
... | /tests/testthat/test-geojson_read.R | permissive | ropensci/geojsonio | R | false | false | 1,708 | r | test_that("geojson_read works with file inputs", {
skip_on_cran()
file <- example_sys_file("california.geojson")
aa <- geojson_read(file)
expect_type(aa, "list")
expect_equal(aa$type, "FeatureCollection")
expect_type(aa$features, "list")
expect_equal(aa$features[[1]]$type, "Feature")
expect_setequal(
... |
# Assignment: ASSIGNMENT 2
# Name: Shekhar, Manish
# Date: 2021-22-03
## Check your current working directory using `getwd()`
getwd()
# [1] "/Users/mshekhar/Desktop/R Programming/DSC520/stats_for_data_science/dsc520/dsc520"
## List the contents of the working directory with the `dir()` function
dir()
# [1] "assignmen... | /assignment_02_Shekhar_Manish.R | no_license | datatodecision/stats_for_data_science | R | false | false | 5,485 | r | # Assignment: ASSIGNMENT 2
# Name: Shekhar, Manish
# Date: 2021-22-03
## Check your current working directory using `getwd()`
getwd()
# [1] "/Users/mshekhar/Desktop/R Programming/DSC520/stats_for_data_science/dsc520/dsc520"
## List the contents of the working directory with the `dir()` function
dir()
# [1] "assignmen... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lyl_plot.R
\name{plot.lyl_aggregated}
\alias{plot.lyl_aggregated}
\title{Plot Life Years Lost at one specific age for two different populations obtained from
aggregated data}
\usage{
\method{plot}{lyl_aggregated}(
x,
color_alive = NA,
c... | /man/plot.lyl_aggregated.Rd | no_license | cran/lillies | R | false | true | 2,090 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lyl_plot.R
\name{plot.lyl_aggregated}
\alias{plot.lyl_aggregated}
\title{Plot Life Years Lost at one specific age for two different populations obtained from
aggregated data}
\usage{
\method{plot}{lyl_aggregated}(
x,
color_alive = NA,
c... |
# 벡터의 연산
d <- c(1, 10, 5, 3)
d
# 벡터의 산술연산
2*d #각 요소에다가 2를 곱해라
d-2
3*d+4
# 벡터와 벡터간의 연산 --> 벡터의 원소의 갯수가 같아야한다.
x <- c(2,4,6)
y <- c(1,3,5)
x+y # 대응하는 요소끼리 더하여 출력
x*y
x/y
x%%y
z <- x+y
z
# 벡터의 함수 이용
d <- c(1:10)
d
sum(d)
sum(3*d)
# 벡터 요소의 길이(개수)
length(d)
# 벡터 요소의 평균
mean(d[1:5])
max(... | /workspace2/RLab_Chap02(변수와벡터)/lab04.R | no_license | mjh1583/BigDataEducation | R | false | false | 639 | r | # 벡터의 연산
d <- c(1, 10, 5, 3)
d
# 벡터의 산술연산
2*d #각 요소에다가 2를 곱해라
d-2
3*d+4
# 벡터와 벡터간의 연산 --> 벡터의 원소의 갯수가 같아야한다.
x <- c(2,4,6)
y <- c(1,3,5)
x+y # 대응하는 요소끼리 더하여 출력
x*y
x/y
x%%y
z <- x+y
z
# 벡터의 함수 이용
d <- c(1:10)
d
sum(d)
sum(3*d)
# 벡터 요소의 길이(개수)
length(d)
# 벡터 요소의 평균
mean(d[1:5])
max(... |
setwd("C:/Users/Leonie/Desktop/Machine_learning")
#install.packages("httr")
#install.packages("jsonlite")
library("httr")
library("readxl")
library("jsonlite")
library(dplyr)
################# Import the basic company data #####################
## Read in all files (condense code later) - create a folder in your work... | /tender.R | no_license | traghuram/17.835_Group3 | R | false | false | 3,725 | r | setwd("C:/Users/Leonie/Desktop/Machine_learning")
#install.packages("httr")
#install.packages("jsonlite")
library("httr")
library("readxl")
library("jsonlite")
library(dplyr)
################# Import the basic company data #####################
## Read in all files (condense code later) - create a folder in your work... |
mk.dygraph <- function(data=cats, dive=NA, theMain='',
channels=c('Acceleration_X', 'Acceleration_Y', 'Acceleration_Z', 'Depth'),
filtered=F, subsample=c(10, 10, 10, 1)) {
require(dygraphs)
require(RColorBrewer)
require(fields)
require(xts)
require(htmltools)
... | /R/mk.dygraph.R | no_license | embiuw/rCATS | R | false | false | 6,554 | r | mk.dygraph <- function(data=cats, dive=NA, theMain='',
channels=c('Acceleration_X', 'Acceleration_Y', 'Acceleration_Z', 'Depth'),
filtered=F, subsample=c(10, 10, 10, 1)) {
require(dygraphs)
require(RColorBrewer)
require(fields)
require(xts)
require(htmltools)
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulate_data.R
\name{simulateBatchData}
\alias{simulateBatchData}
\title{Create simulated batch data for testing.}
\usage{
simulateBatchData(N = 2500, p, theta, sds, batch, zz)
}
\arguments{
\item{N}{number of observations}
\item{p}{a vecto... | /man/simulateBatchData.Rd | no_license | dmckean/CNPBayes | R | false | true | 1,206 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/simulate_data.R
\name{simulateBatchData}
\alias{simulateBatchData}
\title{Create simulated batch data for testing.}
\usage{
simulateBatchData(N = 2500, p, theta, sds, batch, zz)
}
\arguments{
\item{N}{number of observations}
\item{p}{a vecto... |
library(glmnet)
mydata = read.table("./TrainingSet/ReliefF/urinary_tract.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.35,family="gaussian",standardize=TRUE)
sink('./Model/EN/ReliefF/urinary_tract/urinary_trac... | /Model/EN/ReliefF/urinary_tract/urinary_tract_047.R | no_license | leon1003/QSMART | R | false | false | 373 | r | library(glmnet)
mydata = read.table("./TrainingSet/ReliefF/urinary_tract.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.35,family="gaussian",standardize=TRUE)
sink('./Model/EN/ReliefF/urinary_tract/urinary_trac... |
library(fredr)
### Name: fredr_category_related_tags
### Title: Get the related FRED tags within a category
### Aliases: fredr_category_related_tags
### ** Examples
## No test:
# First, get the tags for the "Production & Business Activity" category
fredr_category_tags(1L)
# Then, get the tags related to "business"... | /data/genthat_extracted_code/fredr/examples/fredr_category_related_tags.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 484 | r | library(fredr)
### Name: fredr_category_related_tags
### Title: Get the related FRED tags within a category
### Aliases: fredr_category_related_tags
### ** Examples
## No test:
# First, get the tags for the "Production & Business Activity" category
fredr_category_tags(1L)
# Then, get the tags related to "business"... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/odds.us2dec.R
\name{odds.us2dec}
\alias{odds.us2dec}
\title{Convert US odds to Decimal odds}
\usage{
odds.us2dec(x)
}
\arguments{
\item{x}{A vector of US odds}
}
\value{
A vector of Decimal odds
}
\description{
Convert US odds to Decimal odds... | /man/odds.us2dec.Rd | no_license | cran/odds.converter | R | false | true | 361 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/odds.us2dec.R
\name{odds.us2dec}
\alias{odds.us2dec}
\title{Convert US odds to Decimal odds}
\usage{
odds.us2dec(x)
}
\arguments{
\item{x}{A vector of US odds}
}
\value{
A vector of Decimal odds
}
\description{
Convert US odds to Decimal odds... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/reactable.R
\name{reactable}
\alias{reactable}
\title{Create an interactive data table}
\usage{
reactable(data, columns = NULL, columnGroups = NULL, rownames = NULL,
groupBy = NULL, sortable = TRUE, resizable = FALSE,
filterable = FALSE, ... | /man/reactable.Rd | permissive | jienagu/reactable | R | false | true | 7,184 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/reactable.R
\name{reactable}
\alias{reactable}
\title{Create an interactive data table}
\usage{
reactable(data, columns = NULL, columnGroups = NULL, rownames = NULL,
groupBy = NULL, sortable = TRUE, resizable = FALSE,
filterable = FALSE, ... |
library(TSdist)
### Name: DissimDistance
### Title: The Dissim distance is calculated.
### Aliases: DissimDistance
### ** Examples
#The objects example.series1 and example.series2 are two
#numeric series of length 100 contained in the TSdist package.
data(example.series1)
data(example.series2)
#For information ... | /data/genthat_extracted_code/TSdist/examples/DissimDistance.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 708 | r | library(TSdist)
### Name: DissimDistance
### Title: The Dissim distance is calculated.
### Aliases: DissimDistance
### ** Examples
#The objects example.series1 and example.series2 are two
#numeric series of length 100 contained in the TSdist package.
data(example.series1)
data(example.series2)
#For information ... |
####################################################
#
# This gives me the Rice center Data from the Pier
# ~ 8199 lines of stuff
#
####################################################
getRiceData <- function() {
suppressMessages( require(RCurl) )
suppressMessages( require(tidyverse) )
suppressMessages( requi... | /Content/Analyses/Ordination/getRiceData.R | no_license | anhnguyendepocen/ENVS543 | R | false | false | 1,683 | r | ####################################################
#
# This gives me the Rice center Data from the Pier
# ~ 8199 lines of stuff
#
####################################################
getRiceData <- function() {
suppressMessages( require(RCurl) )
suppressMessages( require(tidyverse) )
suppressMessages( requi... |
ReadData <- function() {
forNames <-read.table("household_power_consumption.txt", na.strings = "?", sep = ";", colClasses = c(rep("character", 2), rep("numeric", 7)), header = TRUE, comment.char = "", nrows = 10)
data <- read.table("household_power_consumption.txt", na.strings = "?", sep = ";", colClasses = c(rep("ch... | /plot1.R | no_license | chajadan/ExData_Plotting1 | R | false | false | 1,114 | r | ReadData <- function() {
forNames <-read.table("household_power_consumption.txt", na.strings = "?", sep = ";", colClasses = c(rep("character", 2), rep("numeric", 7)), header = TRUE, comment.char = "", nrows = 10)
data <- read.table("household_power_consumption.txt", na.strings = "?", sep = ";", colClasses = c(rep("ch... |
# library(tidyverse)
# library(naniar)
# library(forcats)
# data_rec <-
# read_csv("/Users/gabrielburcea/Rprojects/data/csvdata.csv")
# nrow(distinct(data_rec))
# data_rename <- data_rec %>%
# dplyr::rename(
# id = ID,
# age = Age,
# gender = Gender,
# location = Location,
# country = Country,
#... | /R/cleaning_scripts/Run_this_first_18.R | no_license | gabrielburcea/cvindia | R | false | false | 19,423 | r | # library(tidyverse)
# library(naniar)
# library(forcats)
# data_rec <-
# read_csv("/Users/gabrielburcea/Rprojects/data/csvdata.csv")
# nrow(distinct(data_rec))
# data_rename <- data_rec %>%
# dplyr::rename(
# id = ID,
# age = Age,
# gender = Gender,
# location = Location,
# country = Country,
#... |
testlist <- list(x = structure(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(9L, 9L)))
result <- do.call(mu... | /multivariance/inst/testfiles/doubleCenterBiasCorrected/libFuzzer_doubleCenterBiasCorrected/doubleCenterBiasCorrected_valgrind_files/1612734888-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 381 | r | testlist <- list(x = structure(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(9L, 9L)))
result <- do.call(mu... |
library(VGAM)
### Name: identitylink
### Title: Identity Link Function
### Aliases: identitylink negidentity
### Keywords: math models regression
### ** Examples
identitylink((-5):5)
identitylink((-5):5, deriv = 1)
identitylink((-5):5, deriv = 2)
negidentity((-5):5)
negidentity((-5):5, deriv = 1)
negidentity((-5):5... | /data/genthat_extracted_code/VGAM/examples/identitylink.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 336 | r | library(VGAM)
### Name: identitylink
### Title: Identity Link Function
### Aliases: identitylink negidentity
### Keywords: math models regression
### ** Examples
identitylink((-5):5)
identitylink((-5):5, deriv = 1)
identitylink((-5):5, deriv = 2)
negidentity((-5):5)
negidentity((-5):5, deriv = 1)
negidentity((-5):5... |
#' ---
#' title: "LGCP Notebook template"
#' author: "Brian Capaldo"
#' date: "4/12/2019"
#' output:
#' github_document:
#' toc: true
#' ---
#' Document preamble
#'
#' This is a spin document, full details are available [here](https://rmarkdown.rstudio.com/articles_report_from_r_script.html). This is the templa... | /notes/notebook-template-github_document.R | no_license | CBIIT/lgcp | R | false | false | 973 | r | #' ---
#' title: "LGCP Notebook template"
#' author: "Brian Capaldo"
#' date: "4/12/2019"
#' output:
#' github_document:
#' toc: true
#' ---
#' Document preamble
#'
#' This is a spin document, full details are available [here](https://rmarkdown.rstudio.com/articles_report_from_r_script.html). This is the templa... |
# read in data and see if it merges well adn rename columns then we can start plotting everyhting accordingly
# we will have 4 circle plots for each catagory and three species to see the overlap of each catagory
rm(list = ls())
setwd("~/Desktop/Dist_matrix_TE_div/merged.tables/")
Bovine <- read.table("Human_Bovin... | /region_compare.R | no_license | ReubenBuck/Dist_matrix_method | R | false | false | 14,169 | r |
# read in data and see if it merges well adn rename columns then we can start plotting everyhting accordingly
# we will have 4 circle plots for each catagory and three species to see the overlap of each catagory
rm(list = ls())
setwd("~/Desktop/Dist_matrix_TE_div/merged.tables/")
Bovine <- read.table("Human_Bovin... |
#' @name RDASC
#' @title Reproducible Data Analysis of Scientific Cooperations
#' @docType package
#' @description \code{RDASC} is a Reproducible Data Analysis
#' Package. This is an R package to keep, in a reproducible and free
#' accessible way, cientific colaborations that I
#' participated. Datasets of ... | /R/wzCoop.R | no_license | walmes/RDASC | R | false | false | 430 | r | #' @name RDASC
#' @title Reproducible Data Analysis of Scientific Cooperations
#' @docType package
#' @description \code{RDASC} is a Reproducible Data Analysis
#' Package. This is an R package to keep, in a reproducible and free
#' accessible way, cientific colaborations that I
#' participated. Datasets of ... |
\name{clean.formula}
\alias{clean.formula}
\title{
Makes a shorter version of a formula for display
}
\description{
Used in stepAICc and others. If you want to use formulas from a big AIC analysis in a table, they need to be shorter and prettier. This sorts the terms, replaces the top model form with '...', etc.
... | /HelpfulFunctionsMME/man/clean.formula.Rd | no_license | mmellis/HelpfulFunctionsMME | R | false | false | 1,478 | rd | \name{clean.formula}
\alias{clean.formula}
\title{
Makes a shorter version of a formula for display
}
\description{
Used in stepAICc and others. If you want to use formulas from a big AIC analysis in a table, they need to be shorter and prettier. This sorts the terms, replaces the top model form with '...', etc.
... |
context("Testing permci")
test_that("permci_glm parallel works as it should", {
ds <- gendata_crt(nclus = c(5, 5), size = c(10, 10), theta = 0, sigma = 1,
mu = 0, sd = 1)
tmp1 <- permci_glm(y ~ trt, trtname = 'trt', runit = 'clusid', data = ds,
nperm = 10, ncores = 1, quiet... | /tests/testthat/test_permci.R | no_license | djrabideau/permuter | R | false | false | 3,438 | r | context("Testing permci")
test_that("permci_glm parallel works as it should", {
ds <- gendata_crt(nclus = c(5, 5), size = c(10, 10), theta = 0, sigma = 1,
mu = 0, sd = 1)
tmp1 <- permci_glm(y ~ trt, trtname = 'trt', runit = 'clusid', data = ds,
nperm = 10, ncores = 1, quiet... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/curve_pair_align.R
\name{curve_pair_align}
\alias{curve_pair_align}
\title{Pairwise align two curves}
\usage{
curve_pair_align(beta1, beta2)
}
\arguments{
\item{beta1}{array describing curve 1 (n,T)}
\item{beta2}{array describing curve 2 (n,... | /fuzzedpackages/fdasrvf/man/curve_pair_align.Rd | no_license | akhikolla/testpackages | R | false | true | 872 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/curve_pair_align.R
\name{curve_pair_align}
\alias{curve_pair_align}
\title{Pairwise align two curves}
\usage{
curve_pair_align(beta1, beta2)
}
\arguments{
\item{beta1}{array describing curve 1 (n,T)}
\item{beta2}{array describing curve 2 (n,... |
require(testthat)
test_check("hbbr") | /tests/testthat.R | no_license | cran/hbbr | R | false | false | 36 | r | require(testthat)
test_check("hbbr") |
library(ggplot2)
windowsFonts(malgun = "맑은 고딕")
theme_update(text = element_text(family = "malgun"))
# No.1
irse <- iris[iris$Species == "virginica",]
plot(jitter(irse$Sepal.Width)~jitter(irse$Sepal.Length))
# No.2
line<-lm(irse$Sepal.Width~irse$Sepal.Length)
abline(line, col="red", lwd=2)
summary(line)
# No.3
libra... | /test2.R | no_license | ckiekim/BigDataWithR-Lecture | R | false | false | 4,665 | r | library(ggplot2)
windowsFonts(malgun = "맑은 고딕")
theme_update(text = element_text(family = "malgun"))
# No.1
irse <- iris[iris$Species == "virginica",]
plot(jitter(irse$Sepal.Width)~jitter(irse$Sepal.Length))
# No.2
line<-lm(irse$Sepal.Width~irse$Sepal.Length)
abline(line, col="red", lwd=2)
summary(line)
# No.3
libra... |
#Program to count inspection violations data by block group and year (reshape needed)
#Output to CSV for joining with 'MetroBostonBG.shp' shapefile and inputing into PostgreSQL
# Libraries
library(RPostgreSQL)
library(gdata)
#Path
setwd('/home/tom/dataswap_tax/analysis')
# Connect to database
drv <- dbDriver("Postg... | /analysis/aggregated_inspections.R | permissive | mjrouser/dataswapping | R | false | false | 1,399 | r | #Program to count inspection violations data by block group and year (reshape needed)
#Output to CSV for joining with 'MetroBostonBG.shp' shapefile and inputing into PostgreSQL
# Libraries
library(RPostgreSQL)
library(gdata)
#Path
setwd('/home/tom/dataswap_tax/analysis')
# Connect to database
drv <- dbDriver("Postg... |
shinyUI(navbarPage("Random Forest",
tabPanel("About",
h4("Introduction"),
hr(),
p("This application use random forest as machine learning algorithm
to study the highly linear data set Longley. In this shiny app,
firstly, the data set is discussed. Secondly, random forest parameter... | /app/ui.R | no_license | courseracheng/DataProductProject | R | false | false | 4,690 | r |
shinyUI(navbarPage("Random Forest",
tabPanel("About",
h4("Introduction"),
hr(),
p("This application use random forest as machine learning algorithm
to study the highly linear data set Longley. In this shiny app,
firstly, the data set is discussed. Secondly, random forest parameter... |
# nocov start
make_gen_additive_reg <- function() {
parsnip::set_new_model("gen_additive_reg")
}
make_gen_additive_reg_stan <- function() {
#### REGRESION
model = "gen_additive_reg"
mode = "regression"
engine = "stan"
parsnip::set_model_engine(model = model, mode = mo... | /R/parsnip-gen_additive_mod_data.R | no_license | cran/bayesmodels | R | false | false | 2,479 | r | # nocov start
make_gen_additive_reg <- function() {
parsnip::set_new_model("gen_additive_reg")
}
make_gen_additive_reg_stan <- function() {
#### REGRESION
model = "gen_additive_reg"
mode = "regression"
engine = "stan"
parsnip::set_model_engine(model = model, mode = mo... |
install.packages("Rfacebook")
//install.packages("contrib.url")
library(devtools)
install_github("Rfacebook", "pablobarbera", subdir = "Rfacebook")
library(Rfacebook)
token <- "XXXXXXXXXXXXXX"
me <- getUsers("pablobarbera", token, private_info = TRUE)
me$name
getPage <- function(page, token, n=25, since=NULL, until=N... | /FacebookRetrieval.R | no_license | RohanGupta24/Hello-World | R | false | false | 4,256 | r | install.packages("Rfacebook")
//install.packages("contrib.url")
library(devtools)
install_github("Rfacebook", "pablobarbera", subdir = "Rfacebook")
library(Rfacebook)
token <- "XXXXXXXXXXXXXX"
me <- getUsers("pablobarbera", token, private_info = TRUE)
me$name
getPage <- function(page, token, n=25, since=NULL, until=N... |
compt_pays=pays %>%
group_by(country) %>%
summarise(nb_team=n())
map_countries@data=map_countries@data %>%
mutate(COUNTRY=trimws(sapply(strsplit(as.character(COUNTRY), "\\("), function(x) x[1]))) %>%
mutate(COUNTRY=ifelse(COUNTRY=='United States','USA',COUNTRY)) %>%
left_join(compt_pays %>% rename(COUNTRY... | /_SERVER/SHAPES_TEAM/SHAPES_TEAM.R | no_license | pazzini10/Shiny_Cyclisme | R | false | false | 2,381 | r |
compt_pays=pays %>%
group_by(country) %>%
summarise(nb_team=n())
map_countries@data=map_countries@data %>%
mutate(COUNTRY=trimws(sapply(strsplit(as.character(COUNTRY), "\\("), function(x) x[1]))) %>%
mutate(COUNTRY=ifelse(COUNTRY=='United States','USA',COUNTRY)) %>%
left_join(compt_pays %>% rename(COUNTRY... |
#San Francisco Crime Classifcation
#Initialize libraries
library(MASS)
library(readr)
#library (rpart)
library(caret)
library(lubridate)
#Function to setup the reading of data
treatment = function(fname){
df = read.csv(paste0('Data/',fname))
Dates1 = strptime(as.character(df$Dates),"%Y-%m-%d %H:%M:%S")
... | /San Francisco Crime Classification/crime_classifier.R | no_license | Anithaponnuru/Kaggle | R | false | false | 1,695 | r | #San Francisco Crime Classifcation
#Initialize libraries
library(MASS)
library(readr)
#library (rpart)
library(caret)
library(lubridate)
#Function to setup the reading of data
treatment = function(fname){
df = read.csv(paste0('Data/',fname))
Dates1 = strptime(as.character(df$Dates),"%Y-%m-%d %H:%M:%S")
... |
if(.Platform$OS.type != "unix"){
load("hatepolitics.rda")
load("gossiping.rda")
} else{
load("articles_big5.rds")
}
library(jiebaR)
mixseg = worker()
## clean NULL ##
for (i in c(1:length(hatepolitics))){
print(hatepolitics[[i]]$postData$Title)
if( is.null(hatepolitics[[i]]$postData$Title) ) hatepolitics... | /MachineLearning.R | no_license | vickynaiyi/Sinopac_RCourse | R | false | false | 1,109 | r |
if(.Platform$OS.type != "unix"){
load("hatepolitics.rda")
load("gossiping.rda")
} else{
load("articles_big5.rds")
}
library(jiebaR)
mixseg = worker()
## clean NULL ##
for (i in c(1:length(hatepolitics))){
print(hatepolitics[[i]]$postData$Title)
if( is.null(hatepolitics[[i]]$postData$Title) ) hatepolitics... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getAvailableGenes.R
\name{getAvailableGenes}
\alias{getAvailableGenes}
\title{Get Available Genes (helper function)}
\usage{
getAvailableGenes(pool = NULL)
}
\arguments{
\item{pool}{an object created by pool::dbPool to accessing SQL database.... | /man/getAvailableGenes.Rd | no_license | ViolaYing/correlationAnalyzeR | R | false | true | 547 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/getAvailableGenes.R
\name{getAvailableGenes}
\alias{getAvailableGenes}
\title{Get Available Genes (helper function)}
\usage{
getAvailableGenes(pool = NULL)
}
\arguments{
\item{pool}{an object created by pool::dbPool to accessing SQL database.... |
library(yaml)
config = yaml.load_file("/Volumes/SSD2go_tw/conafor/reporting/config/database.yml")
setClass(Class="ResultSet",
representation(
result="data.frame",
module="character",
variable="character",
status="logical"
)
)
getAllVariables <- function(b... | /old/cliente_delta_carbon/tools.R | no_license | twehrmann/reporting | R | false | false | 506 | r | library(yaml)
config = yaml.load_file("/Volumes/SSD2go_tw/conafor/reporting/config/database.yml")
setClass(Class="ResultSet",
representation(
result="data.frame",
module="character",
variable="character",
status="logical"
)
)
getAllVariables <- function(b... |
# 3/4/2019
#****************************************************************************************************
# Includes ####
#****************************************************************************************************
source("./r/includes/libraries.r")
source("./r/includes/globals.r")
#... | /r/PIT_analysis(2).r | no_license | donboyd5/PewAging | R | false | false | 54,251 | r |
# 3/4/2019
#****************************************************************************************************
# Includes ####
#****************************************************************************************************
source("./r/includes/libraries.r")
source("./r/includes/globals.r")
#... |
library(dplyr)
library(rayshader)
library(png)
library(raster)
library(sf)
library(viridis)
library(tuneR)
library(signal)
library(rgl)
library(cartography)
#shp file with geometries
neufTroisSHP <- st_read("~/art_withR/boucingMap/neuftrois.shp")
neufTroisSHP <- st_simplify(neufTroisSHP, preserveTopology = T,dToler... | /boucingMap/bouncingMap.R | no_license | chapinux/art_withR | R | false | false | 6,048 | r | library(dplyr)
library(rayshader)
library(png)
library(raster)
library(sf)
library(viridis)
library(tuneR)
library(signal)
library(rgl)
library(cartography)
#shp file with geometries
neufTroisSHP <- st_read("~/art_withR/boucingMap/neuftrois.shp")
neufTroisSHP <- st_simplify(neufTroisSHP, preserveTopology = T,dToler... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggplot-internals.R
\name{.gg_resize_legend}
\alias{.gg_resize_legend}
\title{Make the legend smaller}
\usage{
.gg_resize_legend(pointSize = 0.75, textSize = 6, spaceLegend = 0.75)
}
\arguments{
\item{pointSize}{- the ggplot size of lines or p... | /man/dot-gg_resize_legend.Rd | permissive | terminological/ggrrr | R | false | true | 526 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggplot-internals.R
\name{.gg_resize_legend}
\alias{.gg_resize_legend}
\title{Make the legend smaller}
\usage{
.gg_resize_legend(pointSize = 0.75, textSize = 6, spaceLegend = 0.75)
}
\arguments{
\item{pointSize}{- the ggplot size of lines or p... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{getXCIstate}
\alias{getXCIstate}
\title{Classify X-genes}
\usage{
getXCIstate(xciObj)
}
\arguments{
\item{xciObj}{A \code{data.table}. The table returned by \code{betaBinomXI}}
}
\value{
A \code{data.table} with genes and their ... | /man/getXCIstate.Rd | no_license | HaiminLi0/XCIR | R | false | true | 431 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{getXCIstate}
\alias{getXCIstate}
\title{Classify X-genes}
\usage{
getXCIstate(xciObj)
}
\arguments{
\item{xciObj}{A \code{data.table}. The table returned by \code{betaBinomXI}}
}
\value{
A \code{data.table} with genes and their ... |
## Caching the Inverse of a Matrix:
## The function makeCacheMatrix() create a matrix and cache(store)its inverse
## The function cacheSolve() checks whether inverse already exists
## if not calculate it's inverse
## This function Function makeCacheMatrix gets a matrix as an input,set the value of the matrix,
## get ... | /cachematrix.R | no_license | Nidhichaubey/ProgrammingAssignment2 | R | false | false | 1,627 | r | ## Caching the Inverse of a Matrix:
## The function makeCacheMatrix() create a matrix and cache(store)its inverse
## The function cacheSolve() checks whether inverse already exists
## if not calculate it's inverse
## This function Function makeCacheMatrix gets a matrix as an input,set the value of the matrix,
## get ... |
# Library
suppressPackageStartupMessages(library(caret))
suppressPackageStartupMessages(library(tidyverse))
# Import train set
dat <- readRDS("data/pred_data.RDS")
train <- dat %>% filter(train==1)
test <- dat %>% filter(train==0)
# Create eval data.frame
eval.train <- data.frame("threshold" = 1:100, "nn"=NA, "bt"=NA... | /scripts/train_test_eval.R | no_license | chrisarm/fraud_pro_2 | R | false | false | 1,978 | r | # Library
suppressPackageStartupMessages(library(caret))
suppressPackageStartupMessages(library(tidyverse))
# Import train set
dat <- readRDS("data/pred_data.RDS")
train <- dat %>% filter(train==1)
test <- dat %>% filter(train==0)
# Create eval data.frame
eval.train <- data.frame("threshold" = 1:100, "nn"=NA, "bt"=NA... |
\name{GIMLET-package}
\alias{GIMLET-package}
\alias{GIMLET}
\docType{package}
\title{
A short title line describing what the package does
}
\description{
A more detailed description of what the package does. A length
of about one to five lines is recommended.
}
\details{
This section should provide a more detai... | /man/GIMLET-package.Rd | no_license | tshimam/GIMLET | R | false | false | 818 | rd | \name{GIMLET-package}
\alias{GIMLET-package}
\alias{GIMLET}
\docType{package}
\title{
A short title line describing what the package does
}
\description{
A more detailed description of what the package does. A length
of about one to five lines is recommended.
}
\details{
This section should provide a more detai... |
# Read in the electric power consumption dataset
rawdata <- read.table("household_power_consumption.txt", sep=";", header=TRUE)
# Keep only observations from the dates 1 Feb and 2 Feb 2007
rawdata$Date <- as.Date(rawdata$Date, "%d/%m/%Y")
powerdata <- subset(rawdata, as.Date(Date)=='2007-02-01' | as.Date(Date)=='2007-... | /04 - Exploratory Data Analysis/Assignment 1/plot4.R | no_license | twgoh/Practical-Machine-Learning | R | false | false | 2,557 | r | # Read in the electric power consumption dataset
rawdata <- read.table("household_power_consumption.txt", sep=";", header=TRUE)
# Keep only observations from the dates 1 Feb and 2 Feb 2007
rawdata$Date <- as.Date(rawdata$Date, "%d/%m/%Y")
powerdata <- subset(rawdata, as.Date(Date)=='2007-02-01' | as.Date(Date)=='2007-... |
## the following must match the'unique' method is ULI as explained there
calcUniqueGeo <- function(data) {
redondGeo <- apply(data,1,paste,collapse=" ") ## creates character string
dfforunique <- cbind(data,redondGeo) ## associates rownames of data to redondGeo
uniqueGeo <- unique(dfforunique[,ncol(dfforuniqu... | /spaMM/R/HLCor.R | no_license | ingted/R-Examples | R | false | false | 21,910 | r | ## the following must match the'unique' method is ULI as explained there
calcUniqueGeo <- function(data) {
redondGeo <- apply(data,1,paste,collapse=" ") ## creates character string
dfforunique <- cbind(data,redondGeo) ## associates rownames of data to redondGeo
uniqueGeo <- unique(dfforunique[,ncol(dfforuniqu... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/interaction_graph.R
\name{BuildPriorInteraction}
\alias{BuildPriorInteraction}
\title{Build unweighted summarized interaction graph}
\usage{
BuildPriorInteraction(
object,
assay = "SCT",
slot = "data",
species = "human",
database = ... | /man/BuildPriorInteraction.Rd | permissive | BlishLab/scriabin | R | false | true | 2,289 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/interaction_graph.R
\name{BuildPriorInteraction}
\alias{BuildPriorInteraction}
\title{Build unweighted summarized interaction graph}
\usage{
BuildPriorInteraction(
object,
assay = "SCT",
slot = "data",
species = "human",
database = ... |
# appMetadata -------------------------------------------------------------
test_that("clear error if no files", {
dir <- local_temp_app()
expect_snapshot(appMetadata(dir), error = TRUE)
})
test_that("quarto affects mode inference", {
dir <- local_temp_app(list("foo.Rmd" = ""))
metadata <- appMetadata(dir)
... | /tests/testthat/test-appMetadata.R | no_license | cran/rsconnect | R | false | false | 8,154 | r | # appMetadata -------------------------------------------------------------
test_that("clear error if no files", {
dir <- local_temp_app()
expect_snapshot(appMetadata(dir), error = TRUE)
})
test_that("quarto affects mode inference", {
dir <- local_temp_app(list("foo.Rmd" = ""))
metadata <- appMetadata(dir)
... |
#' Calculate significance of EOFs compared to a null model (prcomp version)
#'
#' The \code{prcompNull} function uses a randomization approach to
#' calculate a null model for use in Empirical Orthogonal Function analysis (EOF)
#' with the \code{\link[stats]{prcomp}} function. EOF mode significance is assessed again... | /R/prcompNull.R | no_license | ValentinLouis/sinkr | R | false | false | 2,742 | r | #' Calculate significance of EOFs compared to a null model (prcomp version)
#'
#' The \code{prcompNull} function uses a randomization approach to
#' calculate a null model for use in Empirical Orthogonal Function analysis (EOF)
#' with the \code{\link[stats]{prcomp}} function. EOF mode significance is assessed again... |
.filler <- function(x, y, maxv=12, circular=FALSE) {
# should rewrite this using apply (or C)
fill <- function(x, y) {
r <- matrix(NA, nrow=length(x), ncol=maxv)
if (circular) {
for (i in 1:nrow(r)) {
if (!is.na(y[i])) {
if (x[i] < y[i]) {
r[i, x[i]:y[i]] <- 1
} else {
... | /R/filler.R | no_license | cran/raster | R | false | false | 584 | r |
.filler <- function(x, y, maxv=12, circular=FALSE) {
# should rewrite this using apply (or C)
fill <- function(x, y) {
r <- matrix(NA, nrow=length(x), ncol=maxv)
if (circular) {
for (i in 1:nrow(r)) {
if (!is.na(y[i])) {
if (x[i] < y[i]) {
r[i, x[i]:y[i]] <- 1
} else {
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/organizations_operations.R
\name{organizations_list_aws_service_access_for_organization}
\alias{organizations_list_aws_service_access_for_organization}
\title{Returns a list of the AWS services that you enabled to integrate with
your organiza... | /paws/man/organizations_list_aws_service_access_for_organization.Rd | permissive | johnnytommy/paws | R | false | true | 2,249 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/organizations_operations.R
\name{organizations_list_aws_service_access_for_organization}
\alias{organizations_list_aws_service_access_for_organization}
\title{Returns a list of the AWS services that you enabled to integrate with
your organiza... |
modelInfo <- list(label = "Naive Bayes",
library = "klaR",
loop = NULL,
type = c('Classification'),
parameters = data.frame(parameter = c('fL', 'usekernel', "adjust"),
class = c('numeric', 'logical', "numer... | /models/files/nb.R | no_license | paulhendricks/caret | R | false | false | 1,520 | r | modelInfo <- list(label = "Naive Bayes",
library = "klaR",
loop = NULL,
type = c('Classification'),
parameters = data.frame(parameter = c('fL', 'usekernel', "adjust"),
class = c('numeric', 'logical', "numer... |
\name{xmp11.01}
\alias{xmp11.01}
\docType{data}
\title{R Data set: xmp11.01}
\description{
The \code{xmp11.01} data frame has 12 rows and 3 columns.
}
\usage{data(xmp11.01)}
\format{
A data frame with 12 observations on the following 3 variables.
\describe{
\item{\code{strength}}{a numeric vector}
\item{\co... | /man/xmp11.01.Rd | no_license | cran/Devore7 | R | false | false | 842 | rd | \name{xmp11.01}
\alias{xmp11.01}
\docType{data}
\title{R Data set: xmp11.01}
\description{
The \code{xmp11.01} data frame has 12 rows and 3 columns.
}
\usage{data(xmp11.01)}
\format{
A data frame with 12 observations on the following 3 variables.
\describe{
\item{\code{strength}}{a numeric vector}
\item{\co... |
out_degree <- function(frame){
colnames(frame) <- c("From", "to", "value")
colnames(frame) <- toupper(colnames(frame))
my_data_subset <- subset(frame, frame[,3] != 0, select = c(1:3))
my_data_subset<- my_data_subset[
with(my_data_subset, order(my_data_subset$FROM,my_data_subset$VALUE)),
]
CD_... | /R/out_degree.R | no_license | Saraghanadian/SNAinSCM | R | false | false | 449 | r |
out_degree <- function(frame){
colnames(frame) <- c("From", "to", "value")
colnames(frame) <- toupper(colnames(frame))
my_data_subset <- subset(frame, frame[,3] != 0, select = c(1:3))
my_data_subset<- my_data_subset[
with(my_data_subset, order(my_data_subset$FROM,my_data_subset$VALUE)),
]
CD_... |
\name{to_time}
\alias{to_time}
\title{To time}
\author{Hadley Wickham <h.wickham@gmail.com>}
\description{
Turn numeric vector into POSIXct vector
}
\usage{to_time(x)}
\arguments{
\item{x}{}
}
\keyword{internal}
| /man/to-time-1x.rd | no_license | genome-vendor/r-cran-ggplot2 | R | false | false | 217 | rd | \name{to_time}
\alias{to_time}
\title{To time}
\author{Hadley Wickham <h.wickham@gmail.com>}
\description{
Turn numeric vector into POSIXct vector
}
\usage{to_time(x)}
\arguments{
\item{x}{}
}
\keyword{internal}
|
\name{stableMerge}
\alias{stableMerge}
\title{Execute a Stable Left Join}
\description{
Merge Two Data Sets Without Altering Material from the Left Argument.
}
\usage{
stableMerge(x, y)
}
\arguments{
\item{x}{the main data.frame}
\item{y}{a second data.frame containing related information}
}
\details{
\code{merg... | /man/stableMerge.Rd | no_license | metrumresearchgroup/metrumrg | R | false | false | 1,279 | rd | \name{stableMerge}
\alias{stableMerge}
\title{Execute a Stable Left Join}
\description{
Merge Two Data Sets Without Altering Material from the Left Argument.
}
\usage{
stableMerge(x, y)
}
\arguments{
\item{x}{the main data.frame}
\item{y}{a second data.frame containing related information}
}
\details{
\code{merg... |
library(data.table)
library(tidyverse)
library(text2vec)
library(caTools)
library(glmnet)
nlpdata
nlpdata %>% class()
nlpdata$...1 <- nlpdata$...1 %>% as.character()
set.seed(123)
split <- nlpdata$Liked %>% sample.split(SplitRatio = 0.8)
train <- nlpdata %>% subset(split == T)
test <- nlpdata %>% subset(split == F)
... | /week12_day2_part2_case.R | no_license | orkhanjamalov1991/Restaurant-Review-Analysis | R | false | false | 3,548 | r | library(data.table)
library(tidyverse)
library(text2vec)
library(caTools)
library(glmnet)
nlpdata
nlpdata %>% class()
nlpdata$...1 <- nlpdata$...1 %>% as.character()
set.seed(123)
split <- nlpdata$Liked %>% sample.split(SplitRatio = 0.8)
train <- nlpdata %>% subset(split == T)
test <- nlpdata %>% subset(split == F)
... |
\name{PLS_lm_wvc}
\alias{PLS_lm_wvc}
\title{Light version of PLS\_lm for cross validation purposes}
\description{
Light version of \code{PLS_lm} for cross validation purposes either on complete or incomplete datasets.
}
\usage{
PLS_lm_wvc(dataY, dataX, nt = 2, dataPredictY = dataX, modele = "pls",
scaleX = TRUE, scale... | /man/PLS_lm_wvc.Rd | no_license | kongdd/plsRglm | R | false | false | 4,004 | rd | \name{PLS_lm_wvc}
\alias{PLS_lm_wvc}
\title{Light version of PLS\_lm for cross validation purposes}
\description{
Light version of \code{PLS_lm} for cross validation purposes either on complete or incomplete datasets.
}
\usage{
PLS_lm_wvc(dataY, dataX, nt = 2, dataPredictY = dataX, modele = "pls",
scaleX = TRUE, scale... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nwos_tables_raw.R
\name{nwos_tables_raw}
\alias{nwos_tables_raw}
\title{nwos_tables_raw}
\usage{
nwos_tables_raw(
area_data = NA,
coop_data = NA,
quest_data = QUEST_EST,
quest_tab_meta_data = REF_TABLE
)
}
\description{
Create the bod... | /man/nwos_tables_raw.Rd | no_license | jfontestad/nwos | R | false | true | 448 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/nwos_tables_raw.R
\name{nwos_tables_raw}
\alias{nwos_tables_raw}
\title{nwos_tables_raw}
\usage{
nwos_tables_raw(
area_data = NA,
coop_data = NA,
quest_data = QUEST_EST,
quest_tab_meta_data = REF_TABLE
)
}
\description{
Create the bod... |
#' raster.standardize, standardizes all values in a raster file
#'
#' This function is used by a lot of the metrics calculated by ENMTools, in order to
#' standardize suitability scores so they sum to 1 over a geographic space.
#'
#'
#' @param x A raster object or path to a raster.
#' @param verbose Controls printing o... | /R/raster.standardize.R | no_license | danlwarren/sim-code-Warren-et-al-2019 | R | false | false | 738 | r | #' raster.standardize, standardizes all values in a raster file
#'
#' This function is used by a lot of the metrics calculated by ENMTools, in order to
#' standardize suitability scores so they sum to 1 over a geographic space.
#'
#'
#' @param x A raster object or path to a raster.
#' @param verbose Controls printing o... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stackingutilities.R
\name{ProcessAndStackDataForRegression}
\alias{ProcessAndStackDataForRegression}
\title{Helper function to stack data for a regression model.}
\usage{
ProcessAndStackDataForRegression(
unstacked.data,
formula,
intera... | /man/ProcessAndStackDataForRegression.Rd | no_license | Displayr/flipTransformations | R | false | true | 1,271 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stackingutilities.R
\name{ProcessAndStackDataForRegression}
\alias{ProcessAndStackDataForRegression}
\title{Helper function to stack data for a regression model.}
\usage{
ProcessAndStackDataForRegression(
unstacked.data,
formula,
intera... |
#
# SMart Install Packages (SMIP)
#
# User friendly interface into install.packages(...) and biocLite(...)
#
# All functions check existence of packages before installation and skip installation
# if the package already exists. For group of packages, each one is checked
# individually and only missing ones are installe... | /smip.R | permissive | winni2k/r-parallel-install-packages | R | false | false | 8,596 | r | #
# SMart Install Packages (SMIP)
#
# User friendly interface into install.packages(...) and biocLite(...)
#
# All functions check existence of packages before installation and skip installation
# if the package already exists. For group of packages, each one is checked
# individually and only missing ones are installe... |
## makeCacheMatrix uses a superassignment operator ( <<- ) to create a "cached" matrix
## and its inverse (m) which can be
## The first function, makeCacheMatrix creates a special "matrix", which is
## really a list containing a function to
##
## set the value of the matrix
## get the value of the matrix
## set th... | /cachematrix.R | no_license | bbneo/ProgrammingAssignment2 | R | false | false | 2,074 | r | ## makeCacheMatrix uses a superassignment operator ( <<- ) to create a "cached" matrix
## and its inverse (m) which can be
## The first function, makeCacheMatrix creates a special "matrix", which is
## really a list containing a function to
##
## set the value of the matrix
## get the value of the matrix
## set th... |
# http://www.capitalspectator.com/
# A Momentum-Based Trading Signal With Strategic Value
# load packages
library("TTR")
library("xts")
library("quantmod")
# download daily S&P 500 prices from Dec 31, 1990 forward
gspc <- getSymbols("^gspc", from = "1990-12-31", auto.assign = FALSE)
# error adjusted momen... | /TODO-eam-momentum.R | no_license | PsaksuMeRap/r-misc | R | false | false | 3,383 | r | # http://www.capitalspectator.com/
# A Momentum-Based Trading Signal With Strategic Value
# load packages
library("TTR")
library("xts")
library("quantmod")
# download daily S&P 500 prices from Dec 31, 1990 forward
gspc <- getSymbols("^gspc", from = "1990-12-31", auto.assign = FALSE)
# error adjusted momen... |
#' Recombine.
#'
#' Carry out crossover of parent chromosomes in a mating pool.
#'
#' @param pop_mating Matrix of population of chromosomes that form the mating pool.
#' @param pop_size Integer; Number of chromosomes in a generation.
#' @param method String; "onepoint", "twopoint", "uniform" (default);
#' Type of cr... | /R/recombine.R | no_license | jrnew/genetic-algo | R | false | false | 3,620 | r | #' Recombine.
#'
#' Carry out crossover of parent chromosomes in a mating pool.
#'
#' @param pop_mating Matrix of population of chromosomes that form the mating pool.
#' @param pop_size Integer; Number of chromosomes in a generation.
#' @param method String; "onepoint", "twopoint", "uniform" (default);
#' Type of cr... |
#Install packages
install.packages ("data.table")
install.packages ("stringr")
###PART ONE
#This is the labels for each activity
labels<-read.table("./UCI HAR Dataset/UCI HAR Dataset/activity_labels.txt", col.names=c("labelcode", "label"))
#getting the features
features<-read.table("./UCI HAR Dataset/UCI HAR Dataset... | /run_analysis.R | no_license | aho-git/Getting | R | false | false | 2,348 | r | #Install packages
install.packages ("data.table")
install.packages ("stringr")
###PART ONE
#This is the labels for each activity
labels<-read.table("./UCI HAR Dataset/UCI HAR Dataset/activity_labels.txt", col.names=c("labelcode", "label"))
#getting the features
features<-read.table("./UCI HAR Dataset/UCI HAR Dataset... |
i = 31
library(isoform, lib.loc="/nas02/home/w/e/weisun/R/Rlibs/")
bedFile = "/nas02/home/w/e/weisun/research/data/human/Homo_sapiens.GRCh37.66.nonoverlap.exon.bed"
setwd("/lustre/scr/w/e/weisun/TCGA/bam/")
cmd = "ls *_asCounts_hetSNP_EA_hap1.bam"
ffs = system(cmd, intern=TRUE)
length(ffs)
head(ffs)
sams = gsub("... | /data_preparation/R_batch3/_step3/step3_countReads_EA.30.R | no_license | jasa-acs/Mapping-Tumor-Specific-Expression-QTLs-in-Impure-Tumor-Samples | R | false | false | 650 | r | i = 31
library(isoform, lib.loc="/nas02/home/w/e/weisun/R/Rlibs/")
bedFile = "/nas02/home/w/e/weisun/research/data/human/Homo_sapiens.GRCh37.66.nonoverlap.exon.bed"
setwd("/lustre/scr/w/e/weisun/TCGA/bam/")
cmd = "ls *_asCounts_hetSNP_EA_hap1.bam"
ffs = system(cmd, intern=TRUE)
length(ffs)
head(ffs)
sams = gsub("... |
#Load the required packages
library(tm)
library(wordcloud)
library(RColorBrewer)
#Load the required Data
setwd('~/Coding/R/RahulArnab/')
rawData = read.csv('RahulGandhiArnab.csv')
write.csv(rawData,'InterviewData.csv')
#Initializing the variable to store their respective conversation
RahulData = ''
ArnabData = ''
f... | /RahulGandhi.R | no_license | samzer/rahularnabWorldCloud | R | false | false | 1,760 | r | #Load the required packages
library(tm)
library(wordcloud)
library(RColorBrewer)
#Load the required Data
setwd('~/Coding/R/RahulArnab/')
rawData = read.csv('RahulGandhiArnab.csv')
write.csv(rawData,'InterviewData.csv')
#Initializing the variable to store their respective conversation
RahulData = ''
ArnabData = ''
f... |
# Script for analyzing DDE game data.
# Adam Morris
# 8/16/2014
# Get data
data = read.csv("Parsed.csv");
data_crits = data[data$Crits==1,];
data_crits_incog = data[data$Crits_incog==1,];
# Create tosslist
DDEModel_noncrits <- glmer(Choice~MB_X+MB_Y+MF_X+MF_Y+(1+MB_X+MB_Y+MF_X+MF_Y|Subj),family=binomial,data=data);
D... | /Game/Data/Old/Round 5/Analyze.R | no_license | adammmorris/DDE | R | false | false | 2,823 | r | # Script for analyzing DDE game data.
# Adam Morris
# 8/16/2014
# Get data
data = read.csv("Parsed.csv");
data_crits = data[data$Crits==1,];
data_crits_incog = data[data$Crits_incog==1,];
# Create tosslist
DDEModel_noncrits <- glmer(Choice~MB_X+MB_Y+MF_X+MF_Y+(1+MB_X+MB_Y+MF_X+MF_Y|Subj),family=binomial,data=data);
D... |
library(pacman)
### Name: p_install
### Title: Installs & Loads Packages
### Aliases: p_install p_get
### Keywords: install package
### ** Examples
## Not run: p_install(pacman)
| /data/genthat_extracted_code/pacman/examples/p_install.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 185 | r | library(pacman)
### Name: p_install
### Title: Installs & Loads Packages
### Aliases: p_install p_get
### Keywords: install package
### ** Examples
## Not run: p_install(pacman)
|
press <- function(lm){
X <- model.matrix(lm)
H <- X%*%(solve((t(X)) %*% (X))) %*% t(X)
e.i <- resid(lm)
sum((e.i/(1-diag(H)))^2)
}
| /asbio/R/press.R | no_license | ingted/R-Examples | R | false | false | 139 | r | press <- function(lm){
X <- model.matrix(lm)
H <- X%*%(solve((t(X)) %*% (X))) %*% t(X)
e.i <- resid(lm)
sum((e.i/(1-diag(H)))^2)
}
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BipartiteGroupIPW_function.R
\name{BipartiteGroupIPW}
\alias{BipartiteGroupIPW}
\title{Function that estimates the cluster average potential outcome in settings of
bipartite interference.}
\usage{
BipartiteGroupIPW(
int_dta,
out_dta,
co... | /man/BipartiteGroupIPW.Rd | no_license | gpapadog/Interference | R | false | true | 1,686 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/BipartiteGroupIPW_function.R
\name{BipartiteGroupIPW}
\alias{BipartiteGroupIPW}
\title{Function that estimates the cluster average potential outcome in settings of
bipartite interference.}
\usage{
BipartiteGroupIPW(
int_dta,
out_dta,
co... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MDataUpdater.GoogleFinance.News.R
\docType{data}
\name{MDataUpdater.GoogleFinance.News}
\alias{MDataUpdater.GoogleFinance.News}
\title{MDataUpdater.GoogleFinance.News}
\format{An object of class \code{R6ClassGenerator} of length 24.}
\usage{
... | /MUpdaters/man/MDataUpdater.GoogleFinance.News.Rd | no_license | pashkovds/mdlibs | R | false | true | 422 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/MDataUpdater.GoogleFinance.News.R
\docType{data}
\name{MDataUpdater.GoogleFinance.News}
\alias{MDataUpdater.GoogleFinance.News}
\title{MDataUpdater.GoogleFinance.News}
\format{An object of class \code{R6ClassGenerator} of length 24.}
\usage{
... |
############################# LSTM DNN Model ##################################################
## Function ANN.test.training
## Parameters:
## list: data input
## epochs: number of epochs
## units: Number of neuros within the hidden layer
library(keras)
library(yardstick)
library(dplyr)
ANN.test.training<-functi... | /ANN Model.R | no_license | oordenesg/deep_learning_research_project | R | false | false | 6,853 | r |
############################# LSTM DNN Model ##################################################
## Function ANN.test.training
## Parameters:
## list: data input
## epochs: number of epochs
## units: Number of neuros within the hidden layer
library(keras)
library(yardstick)
library(dplyr)
ANN.test.training<-functi... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggb_global_nopsd.R
\name{pathprox}
\alias{pathprox}
\title{R Wrapper to C Function}
\usage{
pathprox(y, lam, assign, w = NULL)
}
\arguments{
\item{y}{array of p elements}
\item{lam}{positive tuning parameter}
\item{assign}{array indexing ea... | /man/pathprox.Rd | no_license | jacobbien/ggb | R | false | true | 569 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ggb_global_nopsd.R
\name{pathprox}
\alias{pathprox}
\title{R Wrapper to C Function}
\usage{
pathprox(y, lam, assign, w = NULL)
}
\arguments{
\item{y}{array of p elements}
\item{lam}{positive tuning parameter}
\item{assign}{array indexing ea... |
library(tidyverse)
library(here)
beaches <- read_csv(here::here("data","sydneybeaches3.csv"))
# STILL NEED TO WRITE THIS
# d <- ggplot(
# data = beaches,
# mapping = aes(
# x = reorder(month_name, month),
# y = temperature)
# ) +
# xlab("Month")
#
#
# # add the means to the plot: [they're not ready for... | /exercises/exercise_06_stats.R | permissive | djnavarro/satrdayjoburg | R | false | false | 395 | r |
library(tidyverse)
library(here)
beaches <- read_csv(here::here("data","sydneybeaches3.csv"))
# STILL NEED TO WRITE THIS
# d <- ggplot(
# data = beaches,
# mapping = aes(
# x = reorder(month_name, month),
# y = temperature)
# ) +
# xlab("Month")
#
#
# # add the means to the plot: [they're not ready for... |
# $$\
# \__|
# $$$$$$\ $$$$$$\ $$$$$$\ $$\ $$$$$$\ $$$$$$$\ $$$$$$$\
# $$ __$$\ $$ __$$\ $$ __$$\ $$ |$$ __$$\ $$ __$$\ $$ _____|
# $$ | \__|$$$$$$$$ |$$ / $$ |$$ |$$ / $$ |$$ | $$ |\$$$$$$\
# $$ | $$ ____|$$ | $$ |$$ |$$ | $$ |$$ ... | /R/regions.R | permissive | davidmasp/helperMut | R | false | false | 10,124 | r | # $$\
# \__|
# $$$$$$\ $$$$$$\ $$$$$$\ $$\ $$$$$$\ $$$$$$$\ $$$$$$$\
# $$ __$$\ $$ __$$\ $$ __$$\ $$ |$$ __$$\ $$ __$$\ $$ _____|
# $$ | \__|$$$$$$$$ |$$ / $$ |$$ |$$ / $$ |$$ | $$ |\$$$$$$\
# $$ | $$ ____|$$ | $$ |$$ |$$ | $$ |$$ ... |
% Auto-generated: do not edit by hand
\name{htmlCaption}
\alias{htmlCaption}
\title{Caption component}
\description{
Caption is a wrapper for the <caption> HTML5 element. For detailed attribute info see: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption
}
\usage{
htmlCaption(children=NULL, id=NULL, ... | /man/htmlCaption.Rd | permissive | noisycomputation/dash-html-components | R | false | false | 4,338 | rd | % Auto-generated: do not edit by hand
\name{htmlCaption}
\alias{htmlCaption}
\title{Caption component}
\description{
Caption is a wrapper for the <caption> HTML5 element. For detailed attribute info see: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/caption
}
\usage{
htmlCaption(children=NULL, id=NULL, ... |
\name{smooth.sparse.mean}
\alias{smooth.sparse.mean}
\title{
Smooth the mean function of sparse data
}
\description{
Do a smoothing of the mean function for sparse data that is either given
as a list or as a matrix with NAs. The smooth is done by basis expansion
with the functional basis "type"; if !(lambda... | /fda/man/smooth.sparse.mean.Rd | no_license | sbgraves237/fda | R | false | false | 1,982 | rd | \name{smooth.sparse.mean}
\alias{smooth.sparse.mean}
\title{
Smooth the mean function of sparse data
}
\description{
Do a smoothing of the mean function for sparse data that is either given
as a list or as a matrix with NAs. The smooth is done by basis expansion
with the functional basis "type"; if !(lambda... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/image_analysis.R
\name{wbt_create_colour_composite}
\alias{wbt_create_colour_composite}
\title{Create colour composite}
\usage{
wbt_create_colour_composite(red, green, blue, output, opacity = NULL,
enhance = TRUE, zeros = FALSE, verbose_mod... | /man/wbt_create_colour_composite.Rd | permissive | Remote-Sensing-Forks/whiteboxR | R | false | true | 979 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/image_analysis.R
\name{wbt_create_colour_composite}
\alias{wbt_create_colour_composite}
\title{Create colour composite}
\usage{
wbt_create_colour_composite(red, green, blue, output, opacity = NULL,
enhance = TRUE, zeros = FALSE, verbose_mod... |
#Author:Alicia Carabali
#Date:08/05/2019
library(lubridate)
fullname<-"./Datasets/PowerConsumption/household_power_consumption.txt"
data<-read.table(fullname,header = TRUE,sep = ";")
data1<-subset(data,dmy(data$Date)=="2007-02-02"|dmy(data$Date)=="2007-02-01")
png(filename = "Plot1.png", width = 480 , height = 480)
... | /Plot1.R | no_license | aliciacarabali/ExData_Plotting1 | R | false | false | 493 | r | #Author:Alicia Carabali
#Date:08/05/2019
library(lubridate)
fullname<-"./Datasets/PowerConsumption/household_power_consumption.txt"
data<-read.table(fullname,header = TRUE,sep = ";")
data1<-subset(data,dmy(data$Date)=="2007-02-02"|dmy(data$Date)=="2007-02-01")
png(filename = "Plot1.png", width = 480 , height = 480)
... |
library(stringr)
final_url<-c()
final_tit<-c()
final_date<-c()
mydate <- c(rep(20200101:20200131, 1), rep(20200201:20200229, 1), rep(20200301:20200331, 1))
# rep(20200701:20200731, 1), rep(20200801:20200831, 1), rep(20200901:20200930, 1)
j <- NULL; mydate <- as.numeric(mydate)
length(mydate)*20*3 #5460개
for(j in ... | /Source Code/news_13.R | no_license | JuheePak/R-miniproject | R | false | false | 8,272 | r | library(stringr)
final_url<-c()
final_tit<-c()
final_date<-c()
mydate <- c(rep(20200101:20200131, 1), rep(20200201:20200229, 1), rep(20200301:20200331, 1))
# rep(20200701:20200731, 1), rep(20200801:20200831, 1), rep(20200901:20200930, 1)
j <- NULL; mydate <- as.numeric(mydate)
length(mydate)*20*3 #5460개
for(j in ... |
#' Update plot
#' @param ctl controller
#' @param pname parameter name
#' @param defaults_ defaults of the parameters
#' @param ... other arguments
#' @noRd
update_container_plots <- function(ctr, pname, defaults_, ...){
stopifnot(is_pmxclass(ctr))
if (!pname %in% (ctr %>% plot_names())) {return(NULL)}
pmx_updat... | /R/pmxClass.R | no_license | ggPMXdevelopment/ggPMX | R | false | false | 40,224 | r | #' Update plot
#' @param ctl controller
#' @param pname parameter name
#' @param defaults_ defaults of the parameters
#' @param ... other arguments
#' @noRd
update_container_plots <- function(ctr, pname, defaults_, ...){
stopifnot(is_pmxclass(ctr))
if (!pname %in% (ctr %>% plot_names())) {return(NULL)}
pmx_updat... |
require(shinydashboard)
require(shiny)
shinyServer(function(input, output, clientData, session) {
output$risk1 <- renderInfoBox({
infoBox(
'Fire',
'£30000',
icon = icon("fire","fa-2x"),
color='red',
width=NULL,fill=TRUE
)
})
# Same as above, but with fill=TRUE
outp... | /test folder/server.R | no_license | AMChierici/safer | R | false | false | 6,135 | r | require(shinydashboard)
require(shiny)
shinyServer(function(input, output, clientData, session) {
output$risk1 <- renderInfoBox({
infoBox(
'Fire',
'£30000',
icon = icon("fire","fa-2x"),
color='red',
width=NULL,fill=TRUE
)
})
# Same as above, but with fill=TRUE
outp... |
library(shiny)
df <- read.csv("/home/john/stats_corner/2016/shiny_apps/snake_draft/v2_5/faa_projection_data.csv",
#df <- read.csv("/srv/shiny-server/stats-corner/2016/snake-assistant/faa_projection_data.csv",
stringsAsFactors = FALSE,
header = TRUE)
fluidPage(
headerPanel('Snake Draft ... | /analysis/2016/shiny_apps/snake_draft/v2_5/ui.R | no_license | johnckane/fantasy-football | R | false | false | 3,792 | r | library(shiny)
df <- read.csv("/home/john/stats_corner/2016/shiny_apps/snake_draft/v2_5/faa_projection_data.csv",
#df <- read.csv("/srv/shiny-server/stats-corner/2016/snake-assistant/faa_projection_data.csv",
stringsAsFactors = FALSE,
header = TRUE)
fluidPage(
headerPanel('Snake Draft ... |
library(chemspiderapi)
context("check_record_id")
test_that("check_record_id() fails if no record_id is provided.", {
expect_error(
.check_record_id()
)
})
test_that("check_record_id() fails if a NULL record_id is provided.", {
expect_error(
.check_record_id(record_id = NULL)
)
})
test_that("check_r... | /tests/testthat/test-check_record_id.R | permissive | RaoulWolf/chemspiderapi | R | false | false | 910 | r | library(chemspiderapi)
context("check_record_id")
test_that("check_record_id() fails if no record_id is provided.", {
expect_error(
.check_record_id()
)
})
test_that("check_record_id() fails if a NULL record_id is provided.", {
expect_error(
.check_record_id(record_id = NULL)
)
})
test_that("check_r... |
# La vida media de un instrumento electrónico es de 6 años con una desviación estándar de 2
# años. Si la vida de un instrumento tal puede tratarse como una variable normal y si el
# instrumento está garantizado, ¿durante cuánto tiempo debiera ser válida la garantía para que no
# más del 15% de los instrumentos fallen ... | /tp4_p7.r | no_license | MarianoSaez/TP4-ESTAD_2020 | R | false | false | 718 | r | # La vida media de un instrumento electrónico es de 6 años con una desviación estándar de 2
# años. Si la vida de un instrumento tal puede tratarse como una variable normal y si el
# instrumento está garantizado, ¿durante cuánto tiempo debiera ser válida la garantía para que no
# más del 15% de los instrumentos fallen ... |
convertSRparms <- function(R0, h, phi, sigmaR, mean2med){
BC <- ifelse(mean2med == TRUE, exp(-0.5 * sigmaR^2), exp(0.5 * sigmaR^2))
S0BC <- (BC * 0.8 * R0 * h * phi - 0.2 * phi * R0 * (1 - h)) / (h - 0.2)
R0BC <- S0BC / phi
Rnew <- BC * 0.8 * R0 * h * 0.2 * S0BC / (0.2 * phi * R0 * (1 - h) + (h - 0.2) * 0.2 * ... | /code/figures/difference in h.R | no_license | Bai-Li-NOAA/Model_Comparison_Paper | R | false | false | 4,029 | r | convertSRparms <- function(R0, h, phi, sigmaR, mean2med){
BC <- ifelse(mean2med == TRUE, exp(-0.5 * sigmaR^2), exp(0.5 * sigmaR^2))
S0BC <- (BC * 0.8 * R0 * h * phi - 0.2 * phi * R0 * (1 - h)) / (h - 0.2)
R0BC <- S0BC / phi
Rnew <- BC * 0.8 * R0 * h * 0.2 * S0BC / (0.2 * phi * R0 * (1 - h) + (h - 0.2) * 0.2 * ... |
#set the working directory
setwd("/home/benjamin/Documents/credits_recherche/data/leroux_2014")
#libraries
library(readxl)
library(taxize)
sum(is.na(interaction_df$`Focal species`))
sum(is.na(interaction_df$`Food item`))
#load the data
interaction_df <- read_excel("NL_FullDB_scinames.xlsx")
interaction_df$`Focal spec... | /R/Formatting_scripts_and_functions/leroux2014_formatting.R | no_license | BenMerSci/credits-recherche | R | false | false | 3,799 | r | #set the working directory
setwd("/home/benjamin/Documents/credits_recherche/data/leroux_2014")
#libraries
library(readxl)
library(taxize)
sum(is.na(interaction_df$`Focal species`))
sum(is.na(interaction_df$`Food item`))
#load the data
interaction_df <- read_excel("NL_FullDB_scinames.xlsx")
interaction_df$`Focal spec... |
.onLoad <- function(libname = find.package("inspectdf"), pkgname = "inspectdf"){
# CRAN Note avoidance
if(getRversion() >= "2.15.1")
utils::globalVariables(c(".", "prop.x", "prop.y", "col_1", "col_2",
"correlation", "prop", "X1", "X2",
"pair", "low... | /inspectdf/R/zzz.R | no_license | akhikolla/TestedPackages-NoIssues | R | false | false | 1,351 | r | .onLoad <- function(libname = find.package("inspectdf"), pkgname = "inspectdf"){
# CRAN Note avoidance
if(getRversion() >= "2.15.1")
utils::globalVariables(c(".", "prop.x", "prop.y", "col_1", "col_2",
"correlation", "prop", "X1", "X2",
"pair", "low... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Viz3_plot.R
\name{Viz3_plot}
\alias{Viz3_plot}
\title{Plots a treemap with size = to average number of connexions & color = connexion duration with respect to a given analysis axis}
\usage{
Viz3_plot(a_set, analysis_axis = "None", hierarchy_v... | /man/Viz3_plot.Rd | no_license | SachaIZADI/wifiparis | R | false | true | 1,183 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Viz3_plot.R
\name{Viz3_plot}
\alias{Viz3_plot}
\title{Plots a treemap with size = to average number of connexions & color = connexion duration with respect to a given analysis axis}
\usage{
Viz3_plot(a_set, analysis_axis = "None", hierarchy_v... |
# Script Notes from MEAP Book on ML
# Support Vector Machines
# February 23, 2020
#
# Support Vector Machines Algorithms are good for classification prediction problems.
# They use several tricks/features to help identify/describe a hyperplane (a line in 2 dim problem)
# that separates classes of observations... | /Script Notes on SVM Algorithms from ML Book 20200223.R | no_license | boxcarrovers/M2A2-R-Scripts | R | false | false | 3,188 | r | # Script Notes from MEAP Book on ML
# Support Vector Machines
# February 23, 2020
#
# Support Vector Machines Algorithms are good for classification prediction problems.
# They use several tricks/features to help identify/describe a hyperplane (a line in 2 dim problem)
# that separates classes of observations... |
cmsaf.divc <-
function(var,const=1,infile,outfile){
if (const==0){
stop("Division by zero not allowed!")
}
start.time <- Sys.time()
# check filename
filecheck <- checkfile(infile,outfile)
if (filecheck[[1]]){
infile <- filecheck[[2]]
outfile <- filecheck[[3]]
# define standard names of... | /cmsaf/R/cmsaf.divc.R | no_license | ingted/R-Examples | R | false | false | 6,518 | r | cmsaf.divc <-
function(var,const=1,infile,outfile){
if (const==0){
stop("Division by zero not allowed!")
}
start.time <- Sys.time()
# check filename
filecheck <- checkfile(infile,outfile)
if (filecheck[[1]]){
infile <- filecheck[[2]]
outfile <- filecheck[[3]]
# define standard names of... |
\name{gmQO}
\alias{gmQO}
\title{
Quasi-Optimization
}
\description{
Function for deriving a Markov generator matrix estimate based on the quasi-optimization procedure of Kreinin and Sidelnikova, 2001
}
\usage{
gmQO(tmrel, te, logmethod = "Eigen")
}
\arguments{
\item{tmrel}{
matrix of relative transition ... | /man/gmQO.Rd | no_license | cran/ctmcd | R | false | false | 1,205 | rd | \name{gmQO}
\alias{gmQO}
\title{
Quasi-Optimization
}
\description{
Function for deriving a Markov generator matrix estimate based on the quasi-optimization procedure of Kreinin and Sidelnikova, 2001
}
\usage{
gmQO(tmrel, te, logmethod = "Eigen")
}
\arguments{
\item{tmrel}{
matrix of relative transition ... |
library(agRee)
### Name: agree.sddm
### Title: Mean Normalized Smallest Detectable Difference
### Aliases: agree.sddm
### Keywords: htest
### ** Examples
data(petVT)
agree.sddm(petVT$cerebellum)
| /data/genthat_extracted_code/agRee/examples/agree.sddm.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 206 | r | library(agRee)
### Name: agree.sddm
### Title: Mean Normalized Smallest Detectable Difference
### Aliases: agree.sddm
### Keywords: htest
### ** Examples
data(petVT)
agree.sddm(petVT$cerebellum)
|
#################FINDING USEFUL COEFFICIENTS
library(tidyverse)
library(glmnet)
library(Metrics)
#SIMPLE GLM MODEL#
model = glm(pstr ~ ageyear+SEX+higheduc+think_will_hospitalized_cv+fam_wage_loss_cv+fam_exp1_cv+fam_actions_cv___5+fam_actions_cv___6, data = trainData)
predictionTest = predict(model, testDa... | /kaggleSubmissions.R | no_license | Jeffrey-NB/stress-prediction | R | false | false | 5,775 | r | #################FINDING USEFUL COEFFICIENTS
library(tidyverse)
library(glmnet)
library(Metrics)
#SIMPLE GLM MODEL#
model = glm(pstr ~ ageyear+SEX+higheduc+think_will_hospitalized_cv+fam_wage_loss_cv+fam_exp1_cv+fam_actions_cv___5+fam_actions_cv___6, data = trainData)
predictionTest = predict(model, testDa... |
mean(Car$speed1)
mfv(Car$type4)
sd(Car$pollution3)
sd(Car$pollution5)
| /tarea1_999003157.R | no_license | FAMM999003157/FAMM999003157 | R | false | false | 73 | r | mean(Car$speed1)
mfv(Car$type4)
sd(Car$pollution3)
sd(Car$pollution5)
|
\name{MOL.passage}
\alias{MOL.passage}
\title{Approximate the First Passage Time Density of a Two-Barrier Problem for Time-Homogeneous Scalar Diffusions.}
\description{
For scalar diffusions with drift \code{mu=function(X){}} and diffusion \code{sig=function(X){}}, moving in relation to lower and upper bounds \co... | /man/MOL.passage.Rd | no_license | cran/DiffusionRimp | R | false | false | 4,823 | rd | \name{MOL.passage}
\alias{MOL.passage}
\title{Approximate the First Passage Time Density of a Two-Barrier Problem for Time-Homogeneous Scalar Diffusions.}
\description{
For scalar diffusions with drift \code{mu=function(X){}} and diffusion \code{sig=function(X){}}, moving in relation to lower and upper bounds \co... |
context('test corpus.R')
test_that("test show.corpus", {
testcorpus <- corpus(c('The'))
expect_that(
show(testcorpus),
prints_text('Corpus consisting of 1 document.')
)
testcorpus <- corpus(
c('The', 'quick', 'brown', 'fox')
)
expect_that(
show(testcorpus),
... | /tests/testthat/test-corpus.R | no_license | leighd2008/quanteda | R | false | false | 10,124 | r | context('test corpus.R')
test_that("test show.corpus", {
testcorpus <- corpus(c('The'))
expect_that(
show(testcorpus),
prints_text('Corpus consisting of 1 document.')
)
testcorpus <- corpus(
c('The', 'quick', 'brown', 'fox')
)
expect_that(
show(testcorpus),
... |
#' Get one or multiple key from database by chunks
#'
#' This function reads all keys that qualify for the like condition
#' specified in the arguments of this function.
#'
#' @param ... chunks of class character that should be use to narrow
#' down selected keys
#' @param conn a postgreSQL connection object
#' @aut... | /experiments_with_old_definitions.R | no_license | mbannert/miro | R | false | false | 9,345 | r | #' Get one or multiple key from database by chunks
#'
#' This function reads all keys that qualify for the like condition
#' specified in the arguments of this function.
#'
#' @param ... chunks of class character that should be use to narrow
#' down selected keys
#' @param conn a postgreSQL connection object
#' @aut... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.