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 |
|---|---|---|---|---|---|---|---|---|---|
FETPage = R6Class(
"FETPage",
inherit = ShinyModule,
public = list(
# attributes
id = "fet",
# initializer
initialize = function(){
},
# UI
ui = function(){
ns = NS(self$id)
tagList(
fl... | /apps/bac3-ko/views/tabs/fet.R | no_license | zhuchcn/alzheimer_pilot | R | false | false | 5,127 | r | FETPage = R6Class(
"FETPage",
inherit = ShinyModule,
public = list(
# attributes
id = "fet",
# initializer
initialize = function(){
},
# UI
ui = function(){
ns = NS(self$id)
tagList(
fl... |
#' Populate Parameter Information Columns
#'
#' Populates INFO data frame with additional user-supplied information concerning the measured parameter.
#'
#' @param INFO dataframe with value and code columns. Default is INFO
#' @param parameterCd character USGS parameter code
#' @param interactive logical Option f... | /R/populateParameterINFO.r | no_license | cran/EGRET | R | false | false | 3,050 | r | #' Populate Parameter Information Columns
#'
#' Populates INFO data frame with additional user-supplied information concerning the measured parameter.
#'
#' @param INFO dataframe with value and code columns. Default is INFO
#' @param parameterCd character USGS parameter code
#' @param interactive logical Option f... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{g_fun0}
\alias{g_fun0}
\title{g 0}
\usage{
g_fun0(eta)
}
\arguments{
\item{eta}{local variational parameter}
}
\description{
g 0
}
\seealso{
Other VI functions:
\code{\link{approx_sb}()},
\code{\link{g_fun.vec}()},
\code{\link{... | /man/g_fun0.Rd | no_license | limengbinggz/lotR | R | false | true | 381 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{g_fun0}
\alias{g_fun0}
\title{g 0}
\usage{
g_fun0(eta)
}
\arguments{
\item{eta}{local variational parameter}
}
\description{
g 0
}
\seealso{
Other VI functions:
\code{\link{approx_sb}()},
\code{\link{g_fun.vec}()},
\code{\link{... |
# Context
#
# You work for Motor Trend, a magazine about the automobile industry. Looking at a data set of a collection of cars, they are interested in exploring the relationship between a set of variables and miles per gallon (MPG) (outcome). They are particularly interested in the following two questions:
#
# “... | /Regression/Transmission_MPG.R | no_license | steverowe/jhdatascience | R | false | false | 1,910 | r | # Context
#
# You work for Motor Trend, a magazine about the automobile industry. Looking at a data set of a collection of cars, they are interested in exploring the relationship between a set of variables and miles per gallon (MPG) (outcome). They are particularly interested in the following two questions:
#
# “... |
library(dplyr)
library(tidyr)
library(acl)
library(abind)
rm(list=ls())
load('../data/dbn.rdata')
csv<-read.csv('../data/neil_time2.csv', header=F, stringsAsFactors=F)
ip<-csv[,1]
date<-csv[,2]
events<-csv[,3]
beliefs<-csv[,4]
trials<-csv[,5]
extras<-csv[,6]
feedback<-csv[,7]
######################
#Subjectwise
###... | /code/R/read_in_sql_data_prolificrun_higher_numbers.R | no_license | bramleyccslab/time_intervene | R | false | false | 17,939 | r | library(dplyr)
library(tidyr)
library(acl)
library(abind)
rm(list=ls())
load('../data/dbn.rdata')
csv<-read.csv('../data/neil_time2.csv', header=F, stringsAsFactors=F)
ip<-csv[,1]
date<-csv[,2]
events<-csv[,3]
beliefs<-csv[,4]
trials<-csv[,5]
extras<-csv[,6]
feedback<-csv[,7]
######################
#Subjectwise
###... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calculate_velocity.R
\name{calculate_velocity}
\alias{calculate_velocity}
\title{Calculate Velocity}
\format{
Input data frame columns
\describe{
\item{gazeHasValue}{Logical (boolean) if there is valid gaze data}
\item{eyeDataRelativeTime... | /man/calculate_velocity.Rd | permissive | chandms/ARETT-R-Package | R | false | true | 2,149 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calculate_velocity.R
\name{calculate_velocity}
\alias{calculate_velocity}
\title{Calculate Velocity}
\format{
Input data frame columns
\describe{
\item{gazeHasValue}{Logical (boolean) if there is valid gaze data}
\item{eyeDataRelativeTime... |
testlist <- list(x = c(0, 0, 0, 0, 0, 0, 0, 0), y = numeric(0))
result <- do.call(netrankr:::checkPairs,testlist)
str(result) | /netrankr/inst/testfiles/checkPairs/libFuzzer_checkPairs/checkPairs_valgrind_files/1612746627-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 125 | r | testlist <- list(x = c(0, 0, 0, 0, 0, 0, 0, 0), y = numeric(0))
result <- do.call(netrankr:::checkPairs,testlist)
str(result) |
#HOW "VegEnvDataNew2018.csv" was produced?====
#New data was produced by Emily (efarrer@tulane.edu) in Jan 2018 as shown in 2 following files:
#"HydrologicDataECF.R" and VegECF.R"
#then...
#Pawel (pwaryszak@tulane.edu) JOINED VEG6 with ENVC4 data objects as per below:
#ENVC4 is an object produced in "HydrologicDataECF.... | /ROC2018.R | no_license | PWaryszak/CRMS | R | false | false | 6,363 | r | #HOW "VegEnvDataNew2018.csv" was produced?====
#New data was produced by Emily (efarrer@tulane.edu) in Jan 2018 as shown in 2 following files:
#"HydrologicDataECF.R" and VegECF.R"
#then...
#Pawel (pwaryszak@tulane.edu) JOINED VEG6 with ENVC4 data objects as per below:
#ENVC4 is an object produced in "HydrologicDataECF.... |
m_t$pricecategory<-NA
m_t$pricecategory[m_t$price>999 & m_t$price<=10000]<-1
m_t$pricecategory[m_t$price>10000 & m_t$price<=20000]<-2
m_t$pricecategory[m_t$price>20000 & m_t$price<=30000]<-3
m_t$pricecategory[m_t$price>30000 & m_t$price<=40000]<-4
m_t$pricecategory[m_t$price>40000 & m_t$price<=50000]<-5
m_t$price... | /knn.R | no_license | soujveeru/CarSales_Price_Prediction | R | false | false | 3,902 | r | m_t$pricecategory<-NA
m_t$pricecategory[m_t$price>999 & m_t$price<=10000]<-1
m_t$pricecategory[m_t$price>10000 & m_t$price<=20000]<-2
m_t$pricecategory[m_t$price>20000 & m_t$price<=30000]<-3
m_t$pricecategory[m_t$price>30000 & m_t$price<=40000]<-4
m_t$pricecategory[m_t$price>40000 & m_t$price<=50000]<-5
m_t$price... |
make_preds <- function(spat_res,east,north,tmp.array,mod,newdat,factor_vars,smooth_vars,nm_var){
if(class(mod)=="try-error"){
out_mat_pred = matrix(NA,byrow=TRUE,ncol=1300,nrow=700)
out_mat_var = matrix(NA,byrow=TRUE,ncol=1300,nrow=700)
resuse=NULL
}else{
###convert all covariat... | /R/make_preds.r | no_license | NERC-CEH/Spatial-Upscaling-model | R | false | false | 3,238 | r |
make_preds <- function(spat_res,east,north,tmp.array,mod,newdat,factor_vars,smooth_vars,nm_var){
if(class(mod)=="try-error"){
out_mat_pred = matrix(NA,byrow=TRUE,ncol=1300,nrow=700)
out_mat_var = matrix(NA,byrow=TRUE,ncol=1300,nrow=700)
resuse=NULL
}else{
###convert all covariat... |
testlist <- list(a = 0L, b = 0L, x = c(-1499027802L, -1499027802L, -1509949440L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,... | /grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610055728-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 516 | r | testlist <- list(a = 0L, b = 0L, x = c(-1499027802L, -1499027802L, -1509949440L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,... |
#' Expand vectors that have been grouped together
#'
#' @param lst A list whose elements are lists of grouped vectors. Each group of
#' vectors are expanded to include the elements of all the other vectors in
#' the same group.
#'
#' @return A list whose elements are lists of grouped vectors that have been
#' exp... | /R/expand.R | permissive | ramiromagno/common | R | false | false | 464 | r | #' Expand vectors that have been grouped together
#'
#' @param lst A list whose elements are lists of grouped vectors. Each group of
#' vectors are expanded to include the elements of all the other vectors in
#' the same group.
#'
#' @return A list whose elements are lists of grouped vectors that have been
#' exp... |
library(ggplot2)
library(plyr)
####Read the file of CorpusSearch codes into an R data frame.
foo <- read.delim("../queriesandoutput/cprelExtrapos.pceec.cod.ooo",header=F,sep=":")
####Give appropriate column names to the columns
colnames(foo) <- c("Extraposed","Position","Clause","TextOrSpeech","Weight","Year","ASe... | /extraposition/plotsandstats/extraposition_intraspeaker.R | no_license | betsysneller/tyneside | R | false | false | 2,502 | r | library(ggplot2)
library(plyr)
####Read the file of CorpusSearch codes into an R data frame.
foo <- read.delim("../queriesandoutput/cprelExtrapos.pceec.cod.ooo",header=F,sep=":")
####Give appropriate column names to the columns
colnames(foo) <- c("Extraposed","Position","Clause","TextOrSpeech","Weight","Year","ASe... |
\name{confusion.matrix}
\alias{confusion.matrix}
\title{
Confusion matrix for logistic regression models
}
\description{
This function takes the output of a logistic regression created with \code{glm} and returns the confusion matrix.
}
\usage{
confusion.matrix(M,DATA=NA)
}
\arguments{
\item{M}{
A logistic regre... | /man/confusion.matrix.Rd | no_license | profpetrie/regclass | R | false | false | 1,641 | rd | \name{confusion.matrix}
\alias{confusion.matrix}
\title{
Confusion matrix for logistic regression models
}
\description{
This function takes the output of a logistic regression created with \code{glm} and returns the confusion matrix.
}
\usage{
confusion.matrix(M,DATA=NA)
}
\arguments{
\item{M}{
A logistic regre... |
#################################################
### Figures in the introductory presentation
#################################################
source("prelim_extra_functions.R")
# Generate a piecewise quadratic signal
n = 100
quad.signal <- gen.splines.signals(n, 3, n.knots = 2, knots = c(0.3, 0.7), noise = 0.05, ... | /Introductory_presentation.R | no_license | SayidShen/prelim | R | false | false | 2,301 | r | #################################################
### Figures in the introductory presentation
#################################################
source("prelim_extra_functions.R")
# Generate a piecewise quadratic signal
n = 100
quad.signal <- gen.splines.signals(n, 3, n.knots = 2, knots = c(0.3, 0.7), noise = 0.05, ... |
###
### Solves programs (5) over 2-point masses distribution functions, when nu = 1.
###
computeBoundVal <- function(H,mu, sigma, lambda, direction = c("max", "min"))
{
direction <- match.arg(direction)
scale <- if (direction == "min") 1 else -1
# Exclusion of trivial scenarios
if (mu^2 > sigma) output <- list... | /R/optimizationFunctions.R | no_license | cmottet/RobustTail | R | false | false | 8,639 | r | ###
### Solves programs (5) over 2-point masses distribution functions, when nu = 1.
###
computeBoundVal <- function(H,mu, sigma, lambda, direction = c("max", "min"))
{
direction <- match.arg(direction)
scale <- if (direction == "min") 1 else -1
# Exclusion of trivial scenarios
if (mu^2 > sigma) output <- list... |
#Copyright © 2016 RTE Réseau de transport d’électricité
context("Function .getStartDate")
sapply(studyPathS, function(studyPath){
# Correction of start date #####################################################
describe(".getStartDate", {
library(lubridate)
mNames <- c("january", "february", "march", ... | /tests/testthat/test-getStartDate.R | no_license | cran/antaresRead | R | false | false | 4,057 | r | #Copyright © 2016 RTE Réseau de transport d’électricité
context("Function .getStartDate")
sapply(studyPathS, function(studyPath){
# Correction of start date #####################################################
describe(".getStartDate", {
library(lubridate)
mNames <- c("january", "february", "march", ... |
setwd("/Users/NomiB/Desktop/RECOG314/Homeworks/Homework_3\ /")
exchngrate <- read.csv("FRB_Z1.csv")
head(exchngrate)
annualexrate <- data.frame(exchngrate$Descriptions.,exchngrate$Unit.,exchngrate$Multiplier.,exchngrate$Currency.,exchngrate$Unique.Identifier.,exchngrate$Series.Name.)
head(annualexrate)
head(exchngrate)... | /projects/presentation1/Noimot_Bakare/Homework_3.R | no_license | anhnguyendepocen/ECOG_314 | R | false | false | 1,490 | r | setwd("/Users/NomiB/Desktop/RECOG314/Homeworks/Homework_3\ /")
exchngrate <- read.csv("FRB_Z1.csv")
head(exchngrate)
annualexrate <- data.frame(exchngrate$Descriptions.,exchngrate$Unit.,exchngrate$Multiplier.,exchngrate$Currency.,exchngrate$Unique.Identifier.,exchngrate$Series.Name.)
head(annualexrate)
head(exchngrate)... |
isOrderedStack <- function(vector_of_batting_order) {
if(any(is.na(vector_of_batting_order))) {
return(FALSE)
}
if(typeof(type.convert(vector_of_batting_order, as.is = TRUE)) == 'character') {
return(FALSE)
}
sorted <- sort(type.convert(vector_of_batting_order, as.is = TRUE))
has_batter_1 <- sorte... | /MLB/functions_global/isOrderedStack.R | no_license | alandu20/dailyfantasy | R | false | false | 839 | r |
isOrderedStack <- function(vector_of_batting_order) {
if(any(is.na(vector_of_batting_order))) {
return(FALSE)
}
if(typeof(type.convert(vector_of_batting_order, as.is = TRUE)) == 'character') {
return(FALSE)
}
sorted <- sort(type.convert(vector_of_batting_order, as.is = TRUE))
has_batter_1 <- sorte... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/speech_functions.R
\name{operations.list}
\alias{operations.list}
\title{Lists operations that match the specified filter in the request. If theserver doesn't support this method, it returns `UNIMPLEMENTED`.NOTE: the `name` binding below allo... | /googlespeechv1beta1.auto/man/operations.list.Rd | permissive | GVersteeg/autoGoogleAPI | R | false | true | 1,217 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/speech_functions.R
\name{operations.list}
\alias{operations.list}
\title{Lists operations that match the specified filter in the request. If theserver doesn't support this method, it returns `UNIMPLEMENTED`.NOTE: the `name` binding below allo... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FARfunctions.R
\name{fars_summarize_years}
\alias{fars_summarize_years}
\title{The function \code{fars_summarize_years} takes a list of data frames produced by the function \code{fars_read_years}
and produces a summary table of the number of ... | /man/fars_summarize_years.Rd | no_license | SergeyPry/FARfunctions | R | false | true | 954 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/FARfunctions.R
\name{fars_summarize_years}
\alias{fars_summarize_years}
\title{The function \code{fars_summarize_years} takes a list of data frames produced by the function \code{fars_read_years}
and produces a summary table of the number of ... |
## dist-funcs.R
## some functions for calculating moments
## kurtosis
# This formulation of kurtosis adjusts it so that if a distribution is normal,
# it will have k=0 (rtaher than 3), if platykurtic k<0, and if leptokurtic k>0.
kurtosis<-function(x, ...) {
m4<-sum((x-mean(x,...))^4)/sum(!is.na(x))
... | /scripts/dist-funcs.R | no_license | schwilklab/trait-flam | R | false | false | 1,400 | r | ## dist-funcs.R
## some functions for calculating moments
## kurtosis
# This formulation of kurtosis adjusts it so that if a distribution is normal,
# it will have k=0 (rtaher than 3), if platykurtic k<0, and if leptokurtic k>0.
kurtosis<-function(x, ...) {
m4<-sum((x-mean(x,...))^4)/sum(!is.na(x))
... |
install.packages("devtools")
library("devtools")
install_github("neuropsychology/neuropsychology.R", dependencies=TRUE)
library(neuropsychology)
citation("neuropsychology")
describe(personality)
| /data/genthat_extracted_code/neuropsychology/tests/test-describe.R | no_license | surayaaramli/typeRrh | R | false | false | 205 | r | install.packages("devtools")
library("devtools")
install_github("neuropsychology/neuropsychology.R", dependencies=TRUE)
library(neuropsychology)
citation("neuropsychology")
describe(personality)
|
# If there are existing libraries or functions, just use them
# count each categorical value in a column
## similar to python pandas value_counts()
library(plyr)
count(dt, 'col') # dt is a data.table
# set path on windows
path <- "C:/Users/your_name/Desktop/"
# order dataframe by 1 column
df[order(df$freq),] # ord... | /simplified_R.R | no_license | hanhanwu/Basic_But_Useful | R | false | false | 340 | r | # If there are existing libraries or functions, just use them
# count each categorical value in a column
## similar to python pandas value_counts()
library(plyr)
count(dt, 'col') # dt is a data.table
# set path on windows
path <- "C:/Users/your_name/Desktop/"
# order dataframe by 1 column
df[order(df$freq),] # ord... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helpers.R
\name{find_tests}
\alias{find_tests}
\title{Find test directory for package}
\usage{
find_tests(path)
}
\arguments{
\item{path}{package path}
}
\description{
Find a known test location for the package
}
\seealso{
CapturePackage
}
| /man/find_tests.Rd | no_license | bedatadriven/testr | R | false | true | 318 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/helpers.R
\name{find_tests}
\alias{find_tests}
\title{Find test directory for package}
\usage{
find_tests(path)
}
\arguments{
\item{path}{package path}
}
\description{
Find a known test location for the package
}
\seealso{
CapturePackage
}
|
library(testthat)
library(quitte)
library(ggplot2)
library(tidyverse)
test_check("quitte")
| /tests/testthat.R | no_license | piklev/quitte | R | false | false | 92 | r | library(testthat)
library(quitte)
library(ggplot2)
library(tidyverse)
test_check("quitte")
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/acl.R
\name{gcs_update_acl}
\alias{gcs_update_acl}
\title{Change access to an object in a bucket}
\usage{
gcs_update_acl(object_name, bucket, entity = "", entity_type = c("user",
"group", "domain", "project", "allUsers", "allAuthenticatedUs... | /man/gcs_update_acl.Rd | no_license | jmpasmoi/googleCloudStorageR | R | false | true | 1,508 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/acl.R
\name{gcs_update_acl}
\alias{gcs_update_acl}
\title{Change access to an object in a bucket}
\usage{
gcs_update_acl(object_name, bucket, entity = "", entity_type = c("user",
"group", "domain", "project", "allUsers", "allAuthenticatedUs... |
#ic50
cck8 <- function(raw_data1,raw_data2){
raw_data1 <- raw_data1
raw_data2 <- raw_data2
data_head <- raw_data1[,1]
ex_group <- str_which(data_head, '实验分组')
contract_num <- str_which(data_head, '合同号')
statistic_p <- str_which(data_head, '统计检验参数')
paried <- st... | /test/cck8_drc.R | no_license | joyling93/std_report | R | false | false | 18,558 | r |
#ic50
cck8 <- function(raw_data1,raw_data2){
raw_data1 <- raw_data1
raw_data2 <- raw_data2
data_head <- raw_data1[,1]
ex_group <- str_which(data_head, '实验分组')
contract_num <- str_which(data_head, '合同号')
statistic_p <- str_which(data_head, '统计检验参数')
paried <- st... |
context("classif_xyf")
test_that("classif_xyf", {
requirePackages("kohonen", default.method = "load")
parset.list1 = list(
list(),
list(grid = class::somgrid(xdim = 2L, ydim = 4L)),
list(rlen = 50L)
)
parset.list2 = list(
list(),
list(xdim = 2L, ydim = 4L),
list(rlen = 50L)
)
old.p... | /tests/testthat/test_classif_xyf.R | no_license | dickoa/mlr | R | false | false | 1,140 | r | context("classif_xyf")
test_that("classif_xyf", {
requirePackages("kohonen", default.method = "load")
parset.list1 = list(
list(),
list(grid = class::somgrid(xdim = 2L, ydim = 4L)),
list(rlen = 50L)
)
parset.list2 = list(
list(),
list(xdim = 2L, ydim = 4L),
list(rlen = 50L)
)
old.p... |
testlist <- list(Rext = numeric(0), Rs = numeric(0), Z = numeric(0), alpha = numeric(0), atmp = c(1.1988711311556e-153, 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, ... | /meteor/inst/testfiles/E_Penman/AFL_E_Penman/E_Penman_valgrind_files/1615918674-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 1,233 | r | testlist <- list(Rext = numeric(0), Rs = numeric(0), Z = numeric(0), alpha = numeric(0), atmp = c(1.1988711311556e-153, 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, ... |
library(DAAG)
library(lattice)
#Loading the csv file
dfAll <- read.csv("DelayedFlights.csv", na.strings=c(""," ","NA"))
dfAll <- na.omit(dfAll)
#Sampling for plotting purposes
df1000 <- dfAll[sample(nrow(dfAll), 1000), ]
df <- dfAll[sample(nrow(dfAll), 300), ]
summary(df)
#changing time in hhmm format to minutes
df... | /model.R | permissive | asmaaziz/flight-delays | R | false | false | 4,995 | r | library(DAAG)
library(lattice)
#Loading the csv file
dfAll <- read.csv("DelayedFlights.csv", na.strings=c(""," ","NA"))
dfAll <- na.omit(dfAll)
#Sampling for plotting purposes
df1000 <- dfAll[sample(nrow(dfAll), 1000), ]
df <- dfAll[sample(nrow(dfAll), 300), ]
summary(df)
#changing time in hhmm format to minutes
df... |
library(tidyverse)
library(SafeGraphR)
library(data.table)
library(stringr)
dir <- 'C:/Users/nickc/Documents/SafeGraph/2020/08/'
filename = 'Core-USA-August2020-Release-CORE_POI-2020_07-2020-08-07.zip'
f <- paste0(dir, filename)
files_in_zip <- utils::unzip(f, list = TRUE)$Name
files_in_zip <- files_in_zip[grep("\\.... | /create_example_dashboard_data.R | no_license | NickCH-K/SafeGraphCompareDashboard | R | false | false | 3,794 | r | library(tidyverse)
library(SafeGraphR)
library(data.table)
library(stringr)
dir <- 'C:/Users/nickc/Documents/SafeGraph/2020/08/'
filename = 'Core-USA-August2020-Release-CORE_POI-2020_07-2020-08-07.zip'
f <- paste0(dir, filename)
files_in_zip <- utils::unzip(f, list = TRUE)$Name
files_in_zip <- files_in_zip[grep("\\.... |
library("curl");
wd <-"~/R/exdata/ExData_Plotting1"
if(!file.exists(wd)){dir.create(wd)}
if (getwd()!=wd) {setwd(wd) }
if(!file.exists("./data")){dir.create("./data")}
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
destzip<- "./data/exdata%2Fdata%2Fhousehold_power_co... | /Plot1.R | no_license | giorgiosaez/ExData_Plotting1 | R | false | false | 922 | r | library("curl");
wd <-"~/R/exdata/ExData_Plotting1"
if(!file.exists(wd)){dir.create(wd)}
if (getwd()!=wd) {setwd(wd) }
if(!file.exists("./data")){dir.create("./data")}
fileUrl <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip"
destzip<- "./data/exdata%2Fdata%2Fhousehold_power_co... |
library(caret)
# Baseline models
modelAlwaysLight <- function(training, testing) {
rep("L", nrow(testing))
}
modelHalfSum <- function(training, testing) {
d <- which(testing$Red + testing$Green + testing$Blue < 1.5)
prediction <- rep("L", nrow(testing))
prediction[d] <- "D"
prediction
}
modelSta... | /analysis/models.R | no_license | dtkaczyk/dark-or-light | R | false | false | 3,130 | r | library(caret)
# Baseline models
modelAlwaysLight <- function(training, testing) {
rep("L", nrow(testing))
}
modelHalfSum <- function(training, testing) {
d <- which(testing$Red + testing$Green + testing$Blue < 1.5)
prediction <- rep("L", nrow(testing))
prediction[d] <- "D"
prediction
}
modelSta... |
require(dplyr)
require(tidyr)
require(stringr)
require(quanteda)
require(edgeR)
#' Gets MLE and Good-Turing probabilities
#' @param ngram phrase to calculate likelyhood for
#' @param model language model
#' @return a matrix with estimators values
getEstimators <- function(ngram,model){
phrase <- extractLastWord(n... | /Capstone/createModel.R | no_license | tgogorza/datasciencecoursera | R | false | false | 2,262 | r | require(dplyr)
require(tidyr)
require(stringr)
require(quanteda)
require(edgeR)
#' Gets MLE and Good-Turing probabilities
#' @param ngram phrase to calculate likelyhood for
#' @param model language model
#' @return a matrix with estimators values
getEstimators <- function(ngram,model){
phrase <- extractLastWord(n... |
constructor("RollingWindow", function(period = NULL) {
this <- extend(RObject(), "RollingWindow", .period = period)
if(inStaticConstructor(this)) return(this)
constructorNeeds(this, period="Period")
this
})
method("preceding", "RollingWindow", function(this, date, ...) {
needs(date="POSIXt"... | /R/src/QFPortfolio/R/RollingWindow.R | no_license | rsheftel/ratel | R | false | false | 522 | r | constructor("RollingWindow", function(period = NULL) {
this <- extend(RObject(), "RollingWindow", .period = period)
if(inStaticConstructor(this)) return(this)
constructorNeeds(this, period="Period")
this
})
method("preceding", "RollingWindow", function(this, date, ...) {
needs(date="POSIXt"... |
# Append two more function calls to accomplish the following:
#
# 1. Use group_by() (from dplyr) to group the data by part and
# sex, in that order.
#
# 2. Use mutate to add two new columns, whose values will be
# automatically computed group-by-group:
#
# * total = sum(count)
# * prop = count / total
#
sat %>%
s... | /Getting and Cleaning Data/Week3/script9.R | no_license | johnguzmare/datasciencecoursera | R | false | false | 535 | r | # Append two more function calls to accomplish the following:
#
# 1. Use group_by() (from dplyr) to group the data by part and
# sex, in that order.
#
# 2. Use mutate to add two new columns, whose values will be
# automatically computed group-by-group:
#
# * total = sum(count)
# * prop = count / total
#
sat %>%
s... |
## makeCacheMatrix creates a list containig a function to
## 1. set the value of the vector
## 2. get the value of the vector
## 3. set the value of the mean
## 4. get the value of the mean
makeCacheMatrix <- function(x = matrix()) {
m<-NULL
set <- function(y){
x <<- y
m <<- NULL
}
get <- function... | /cachematrix.R | no_license | zeezzu/ProgrammingAssignment2 | R | false | false | 1,052 | r | ## makeCacheMatrix creates a list containig a function to
## 1. set the value of the vector
## 2. get the value of the vector
## 3. set the value of the mean
## 4. get the value of the mean
makeCacheMatrix <- function(x = matrix()) {
m<-NULL
set <- function(y){
x <<- y
m <<- NULL
}
get <- function... |
# Interlude 3
# Descriptive Statistics exercises
# ==================================
#
# Using your R editor, load this file and edit it, adding R code to complete each exercise.
# Save it. Then you'll have a record of how you solved the exercises.
#
# TIPS:
# - Use comments (#) in your code, if you need to explain ... | /exercises/exercises-descriptive-statistics.R | no_license | jsperhac/workshop-dev | R | false | false | 6,060 | r | # Interlude 3
# Descriptive Statistics exercises
# ==================================
#
# Using your R editor, load this file and edit it, adding R code to complete each exercise.
# Save it. Then you'll have a record of how you solved the exercises.
#
# TIPS:
# - Use comments (#) in your code, if you need to explain ... |
list.of.packages <- c("data.table","readr","Hmisc")
new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
if(length(new.packages)) install.packages(new.packages)
lapply(list.of.packages, require, character.only=T)
wd="E:/git/poverty_trends"
setwd(wd)
P20trends=fread("data/P20inc... | /data/general_trends/code/trends_gap_NP20_Rest.R | no_license | ZChristensen/poverty_trends | R | false | false | 2,028 | r |
list.of.packages <- c("data.table","readr","Hmisc")
new.packages <- list.of.packages[!(list.of.packages %in% installed.packages()[,"Package"])]
if(length(new.packages)) install.packages(new.packages)
lapply(list.of.packages, require, character.only=T)
wd="E:/git/poverty_trends"
setwd(wd)
P20trends=fread("data/P20inc... |
\name{getSites}
\alias{getSites}
\title{getSites}
\usage{
getSites(activityId, ...)
}
\description{
Fetches a list of sites for the given activity.
}
| /man/getSites.Rd | no_license | Edouard-Legoupil/activityinfo-R | R | false | false | 151 | rd | \name{getSites}
\alias{getSites}
\title{getSites}
\usage{
getSites(activityId, ...)
}
\description{
Fetches a list of sites for the given activity.
}
|
#' Pedestrian Level of Service(LOS) on Stairs
#'
#' Pedestrian service level on stairs.
#' This is presented by dividing the case when the pedestrian forms the platoon and the case where it does not.
#' When pedestrians pass by forming a platoon, it can be observed mainly from the stairs of terminals and subway... | /R/LOS_stair_ped.R | no_license | regenesis90/KHCMinR | R | false | false | 1,910 | r | #' Pedestrian Level of Service(LOS) on Stairs
#'
#' Pedestrian service level on stairs.
#' This is presented by dividing the case when the pedestrian forms the platoon and the case where it does not.
#' When pedestrians pass by forming a platoon, it can be observed mainly from the stairs of terminals and subway... |
if(!requireNamespace("tseries") ||
!requireNamespace("urca") ||
!requireNamespace("dynlm") ||
!requireNamespace("strucchange")) q()
###################################################
### chunk number 1: setup
###################################################
options(prompt = "R> ", continue = "+ ", width ... | /tests/Ch-TimeSeries.R | no_license | cran/AER | R | false | false | 13,701 | r | if(!requireNamespace("tseries") ||
!requireNamespace("urca") ||
!requireNamespace("dynlm") ||
!requireNamespace("strucchange")) q()
###################################################
### chunk number 1: setup
###################################################
options(prompt = "R> ", continue = "+ ", width ... |
library(gpk)
### Name: Geometricbirds
### Title: Rank abundance distribution of bird species
### Aliases: Geometricbirds
### Keywords: datasets
### ** Examples
data(Geometricbirds)
| /data/genthat_extracted_code/gpk/examples/Geometricbirds.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 188 | r | library(gpk)
### Name: Geometricbirds
### Title: Rank abundance distribution of bird species
### Aliases: Geometricbirds
### Keywords: datasets
### ** Examples
data(Geometricbirds)
|
source('fd_cleaner.R')
# split up the list
#get unique list of tns
unique_tns_full <- unique(fd_clean[trackable_type == 'Condition',
.(trackable_name, count)][order(-count)]$trackable_name)
unique_tns <-
unique(fd_clean[trackable_type == 'Condition' &
nchar(tr... | /FD/Updated L Distance.R | no_license | cassandrabayer/Flaredown-trackable-name-cleaner | R | false | false | 2,947 | r | source('fd_cleaner.R')
# split up the list
#get unique list of tns
unique_tns_full <- unique(fd_clean[trackable_type == 'Condition',
.(trackable_name, count)][order(-count)]$trackable_name)
unique_tns <-
unique(fd_clean[trackable_type == 'Condition' &
nchar(tr... |
source("trips.R")
centroid1=c(33.72916,-84.58021)
centroid2<-c(33.68428,-84.32226)
trip_details<- return_Trips(centroid1,centroid2)
| /trips_function_call.R | no_license | Emory-ADS-Group/CHEP-scripts | R | false | false | 138 | r | source("trips.R")
centroid1=c(33.72916,-84.58021)
centroid2<-c(33.68428,-84.32226)
trip_details<- return_Trips(centroid1,centroid2)
|
# This code chunk sets the color palette and custom gg variables
# Create custom ramp palette based on "spectral"
library(RColorBrewer)
pal = brewer.pal("Spectral",n = 11)
cols = colorRampPalette(pal)
# custom palette for crops
palcrop = c("#9E0142","#F88D51","#5E4FA2")
# HOW TO USE:
# editing gg scales [if colors e... | /fun/cols_gg.r | no_license | guizar/Pest-MS | R | false | false | 1,047 | r | # This code chunk sets the color palette and custom gg variables
# Create custom ramp palette based on "spectral"
library(RColorBrewer)
pal = brewer.pal("Spectral",n = 11)
cols = colorRampPalette(pal)
# custom palette for crops
palcrop = c("#9E0142","#F88D51","#5E4FA2")
# HOW TO USE:
# editing gg scales [if colors e... |
library(RNeXML)
### Name: nexml_validate
### Title: validate nexml using the online validator tool
### Aliases: nexml_validate
### ** Examples
## Not run:
##D data(bird.orders)
##D birds <- nexml_write(bird.orders, "birds_orders.xml")
##D nexml_validate("birds_orders.xml")
##D unlink("birds_orders.xml") # delete f... | /data/genthat_extracted_code/RNeXML/examples/nexml_validate.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 355 | r | library(RNeXML)
### Name: nexml_validate
### Title: validate nexml using the online validator tool
### Aliases: nexml_validate
### ** Examples
## Not run:
##D data(bird.orders)
##D birds <- nexml_write(bird.orders, "birds_orders.xml")
##D nexml_validate("birds_orders.xml")
##D unlink("birds_orders.xml") # delete f... |
###########################################
## sequential advantage selection
###########################################
I_SS<-function(X,Y,trt,g_true,step,rho){
#some constants
n<-length(Y);p<-dim(X)[2]
#store the treatment regime
#critical<-rep(0,step);direction<-rep(0,step);err.rate<-rep(0,st... | /othermethods_functions.r | no_license | MinZhangUMBiostat/OptimalRule | R | false | false | 7,753 | r |
###########################################
## sequential advantage selection
###########################################
I_SS<-function(X,Y,trt,g_true,step,rho){
#some constants
n<-length(Y);p<-dim(X)[2]
#store the treatment regime
#critical<-rep(0,step);direction<-rep(0,step);err.rate<-rep(0,st... |
# ------------------------------------- # 전문 분석 도전
# 프로젝트 데이터 필요
# Koweps_hpc10_2015_beta1.sav : 한국복지재단 패널데이터
# 2016년 6914가구, 16664명에 대한 정보를 담고 있다.
# spss 자료를 읽기 위해 foreign 패키지 설치여부 확인
# 분석 시 필요한 라이브러리
library(foreign) # spss 불러오기
library(dplyr) # 분석툴
library(ggplot2) # 시각화툴
library(readxl) # 엑셀툴
... | /R_0730_04.R | no_license | mjiana/R | R | false | false | 1,347 | r | # ------------------------------------- # 전문 분석 도전
# 프로젝트 데이터 필요
# Koweps_hpc10_2015_beta1.sav : 한국복지재단 패널데이터
# 2016년 6914가구, 16664명에 대한 정보를 담고 있다.
# spss 자료를 읽기 위해 foreign 패키지 설치여부 확인
# 분석 시 필요한 라이브러리
library(foreign) # spss 불러오기
library(dplyr) # 분석툴
library(ggplot2) # 시각화툴
library(readxl) # 엑셀툴
... |
#
# MemoPower03_cube.R, 5 Nov 18
#
# Data from:
# "Look It up" or "Do the Math": An Energy, Area, and Timing Analysis of Instruction Resuse and Memoization
# Daniel Citron and Dror G. Feitelson
#
# Example from:
# Evidence-based Software Engineering: based on the publicly available data
# Derek M. Jones
#
# TAG experi... | /experiment/MemoPower03_cube.R | no_license | shanechin/ESEUR-code-data | R | false | false | 994 | r | #
# MemoPower03_cube.R, 5 Nov 18
#
# Data from:
# "Look It up" or "Do the Math": An Energy, Area, and Timing Analysis of Instruction Resuse and Memoization
# Daniel Citron and Dror G. Feitelson
#
# Example from:
# Evidence-based Software Engineering: based on the publicly available data
# Derek M. Jones
#
# TAG experi... |
# Figure 3.5 and 3.6 from super report, multiple implementations
library(ggplot2)
library(grattan)
library(data.table)
library(dplyr)
library(tidyr)
library(readxl)
library(grid)
fig35 <-
read_excel("fig35.xlsx") %>%
mutate(housing_inclusion = factor(housing_inclusion, levels = c("Including housing", "Excluding ... | /Budget-repair-book/Super-tax-targeting/super-atlas/Fig3-5orig.R | no_license | grattan/Budget-repair-book-2016 | R | false | false | 6,318 | r | # Figure 3.5 and 3.6 from super report, multiple implementations
library(ggplot2)
library(grattan)
library(data.table)
library(dplyr)
library(tidyr)
library(readxl)
library(grid)
fig35 <-
read_excel("fig35.xlsx") %>%
mutate(housing_inclusion = factor(housing_inclusion, levels = c("Including housing", "Excluding ... |
rm(list = ls())
# Copy the data file to the clipboard and then type the following instruction in R: Note don't copy th item column
data <- read.table(pipe("pbpaste"), sep="\t", header=T)
summary(data) # a summary of the data set
# assign names to environmental variables
x <- data[,6]
y <- data[,7]
z <- data[,8]
... | /labs/lab13/Lab 13.R | no_license | ChrisLynch96/data-analytics | R | false | false | 2,945 | r | rm(list = ls())
# Copy the data file to the clipboard and then type the following instruction in R: Note don't copy th item column
data <- read.table(pipe("pbpaste"), sep="\t", header=T)
summary(data) # a summary of the data set
# assign names to environmental variables
x <- data[,6]
y <- data[,7]
z <- data[,8]
... |
#' Function that corrects chronologies for sudden jumps in time
#'
#' Some occurrences in the model results can lead the CumDY function
#' to detect extra year transitions, resulting in sudden jumps in
#' the shell chronology or a start of the chronology at an age
#' beyond 1 year. This function removes these sharp tr... | /R/age_corr.r | permissive | nielsjdewinter/ShellChron | R | false | false | 5,169 | r | #' Function that corrects chronologies for sudden jumps in time
#'
#' Some occurrences in the model results can lead the CumDY function
#' to detect extra year transitions, resulting in sudden jumps in
#' the shell chronology or a start of the chronology at an age
#' beyond 1 year. This function removes these sharp tr... |
\name{redisHKeys}
\alias{redisHKeys}
\title{Redis hash fields.}
\description{Return the fields associated with the given key.}
\usage{
redisHKeys(key, ...)
}
\arguments{
\item{key}{The key to look up.}
\item{...}{ Optional additional arguments. Specify \code{raw=TRUE} to skip de-serialization of the data.}
}
\deta... | /man/redisHKeys.Rd | no_license | bwlewis/rredis | R | false | false | 772 | rd | \name{redisHKeys}
\alias{redisHKeys}
\title{Redis hash fields.}
\description{Return the fields associated with the given key.}
\usage{
redisHKeys(key, ...)
}
\arguments{
\item{key}{The key to look up.}
\item{...}{ Optional additional arguments. Specify \code{raw=TRUE} to skip de-serialization of the data.}
}
\deta... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fishpals_colors.R
\docType{data}
\name{cfs}
\alias{cfs}
\title{Cramer Fish Sciences Palette}
\format{An object of class \code{character} of length 5.}
\usage{
cfs
}
\description{
Cramer Fish Sciences Palette
}
\keyword{internal}
| /man/cfs.Rd | no_license | hrbrmstr/fishpals | R | false | true | 307 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/fishpals_colors.R
\docType{data}
\name{cfs}
\alias{cfs}
\title{Cramer Fish Sciences Palette}
\format{An object of class \code{character} of length 5.}
\usage{
cfs
}
\description{
Cramer Fish Sciences Palette
}
\keyword{internal}
|
#' @details
#' \code{spectralIndices} calculates all indices in one go in C++, which is more efficient than calculating each index separately (for large rasters).
#' By default all indices which can be calculated given the specified indices will be calculated. If you don't want all indices, use the \code{indices} argu... | /man-roxygen/spectralIndices_table.R | no_license | bleutner/RStoolbox | R | false | false | 2,125 | r | #' @details
#' \code{spectralIndices} calculates all indices in one go in C++, which is more efficient than calculating each index separately (for large rasters).
#' By default all indices which can be calculated given the specified indices will be calculated. If you don't want all indices, use the \code{indices} argu... |
# Optimisation of the linked and unlinked specimen populations: -----------
# Reading in several functions needed for subsequent analysis
source("Files/DataOptFunctions.R", local = T)
#### GCMS
# Applying pre-treatments
GCMS_TV_N <- GCMS_T/rowSums(GCMS_T)
GCMS_TV_N2R <- GCMS_TV_N^0.5
GCMS_TV_N4R <- GCMS_TV_N^0.25
#... | /Files/Prioritisation-of-analytical-techniques_2.R | no_license | PopovicAna/Dynamic-Network-Visualisation | R | false | false | 2,258 | r | # Optimisation of the linked and unlinked specimen populations: -----------
# Reading in several functions needed for subsequent analysis
source("Files/DataOptFunctions.R", local = T)
#### GCMS
# Applying pre-treatments
GCMS_TV_N <- GCMS_T/rowSums(GCMS_T)
GCMS_TV_N2R <- GCMS_TV_N^0.5
GCMS_TV_N4R <- GCMS_TV_N^0.25
#... |
\name{varlab}
\alias{varlab}
\title{
Etiqueta de variable
}
\description{
Funcion que permite definir variables
}
\usage{
varlab(df,var,val)
}
\arguments{
\item{df}{
Objeto del tipo data.frame donde se encuentra la variable que se desea definir
}
\item{var}{
La variable en cuestion
}
\item{val}{
La definicion d... | /man/varlab.Rd | no_license | Aulide81/estadisticos | R | false | false | 420 | rd | \name{varlab}
\alias{varlab}
\title{
Etiqueta de variable
}
\description{
Funcion que permite definir variables
}
\usage{
varlab(df,var,val)
}
\arguments{
\item{df}{
Objeto del tipo data.frame donde se encuentra la variable que se desea definir
}
\item{var}{
La variable en cuestion
}
\item{val}{
La definicion d... |
require(scoreActivity)
Test_Statements <- score_set(
check_exists(vals),
check(TRUE, min(vals) >= 0),
check(TRUE, test200 < -20),
check_exists(LL_exp),
check(about(sum(log(dexp(vals,rate=1/200)))), LL_exp(rate=1/200), pts=2),
check(TRUE, max(rates) >= 1/80),
check_exists(exp_results),
check(TRUE, "objec... | /DailyProgrammingTasks/Day-07-Test-Statements.R | no_license | dtkaplan/Math-253 | R | false | false | 440 | r | require(scoreActivity)
Test_Statements <- score_set(
check_exists(vals),
check(TRUE, min(vals) >= 0),
check(TRUE, test200 < -20),
check_exists(LL_exp),
check(about(sum(log(dexp(vals,rate=1/200)))), LL_exp(rate=1/200), pts=2),
check(TRUE, max(rates) >= 1/80),
check_exists(exp_results),
check(TRUE, "objec... |
\name{geom_text}
\alias{geom_text}
\title{Textual annotations.}
\usage{
geom_text(mapping = NULL, data = NULL, stat = "identity",
position = "identity", parse = FALSE, ...)
}
\arguments{
\item{parse}{If TRUE, the labels will be parsed into
expressions and displayed as described in ?plotmath}
\item{mapping}... | /man/geom_text.Rd | no_license | djmurphy420/ggplot2 | R | false | false | 2,486 | rd | \name{geom_text}
\alias{geom_text}
\title{Textual annotations.}
\usage{
geom_text(mapping = NULL, data = NULL, stat = "identity",
position = "identity", parse = FALSE, ...)
}
\arguments{
\item{parse}{If TRUE, the labels will be parsed into
expressions and displayed as described in ?plotmath}
\item{mapping}... |
# Turns each book into a single vector of characters.
library(xml2)
# List files in that directory
books_dir <- list.files("../gap-html/gap-html/", full.names = T)
books <- list()
for (book in books_dir) {
files <- list.files(book, full.names = T)
book_text <- vector()
book_titles <- vector()
for (page... | /IndividualCoursework/RScripts/html_parsing.R | no_license | alunmeredith/DataMining | R | false | false | 2,093 | r | # Turns each book into a single vector of characters.
library(xml2)
# List files in that directory
books_dir <- list.files("../gap-html/gap-html/", full.names = T)
books <- list()
for (book in books_dir) {
files <- list.files(book, full.names = T)
book_text <- vector()
book_titles <- vector()
for (page... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/modify_legend.R
\name{add_to_legend}
\alias{add_to_legend}
\title{add function call to the overall legend}
\usage{
add_to_legend(object, fun.name, legend.name, call.args, option.args, where)
}
\description{
add function call to the overall le... | /man/add_to_legend.Rd | permissive | USGS-R/gsplot | R | false | true | 629 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/modify_legend.R
\name{add_to_legend}
\alias{add_to_legend}
\title{add function call to the overall legend}
\usage{
add_to_legend(object, fun.name, legend.name, call.args, option.args, where)
}
\description{
add function call to the overall le... |
\name{write.molecules}
\alias{write.molecules}
\title{
Write Molecules To Disk
}
\description{
This function writes one or more molecules to an SD file on disk,
which can be of the single- or multi-molecule variety. In
addition, if the molecule has keyed properties, they can also be
written out as SD tags.
}
... | /rcdk/man/writemols.Rd | no_license | schymane/cdkr | R | false | false | 1,623 | rd | \name{write.molecules}
\alias{write.molecules}
\title{
Write Molecules To Disk
}
\description{
This function writes one or more molecules to an SD file on disk,
which can be of the single- or multi-molecule variety. In
addition, if the molecule has keyed properties, they can also be
written out as SD tags.
}
... |
plotzi = function(xs,x1,x2,col="red",plot=FALSE,...){
if(plot) {
plot(xs,-1/x1-xs*x2/x1,type="l",col=col,...)
}
else {
lines(xs,-1/x1-xs*x2/x1,type="l",col=col,...)
}
}
nobs = 7
xx1 = rnorm(nobs)
xx2 = rnorm(nobs)
beta0 = 1
beta1 = 2
beta2 = 3
yy = (beta0 + xx1*beta1 + xx2*beta2 + rnorm(no... | /OppgaveR/Manski/OldCRAP/2d-testing.R | no_license | JonasMoss/cuberoot | R | false | false | 527 | r | plotzi = function(xs,x1,x2,col="red",plot=FALSE,...){
if(plot) {
plot(xs,-1/x1-xs*x2/x1,type="l",col=col,...)
}
else {
lines(xs,-1/x1-xs*x2/x1,type="l",col=col,...)
}
}
nobs = 7
xx1 = rnorm(nobs)
xx2 = rnorm(nobs)
beta0 = 1
beta1 = 2
beta2 = 3
yy = (beta0 + xx1*beta1 + xx2*beta2 + rnorm(no... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/NGLVieweR.R
\name{setRock}
\alias{setRock}
\title{Set rock}
\usage{
setRock(NGLVieweR, rock = TRUE)
}
\arguments{
\item{NGLVieweR}{A NGLVieweR object.}
\item{rock}{If \code{TRUE} (default), start rocking and stop spinning.}
}
\value{
setRock... | /man/setRock.Rd | permissive | Taro-Imahiro/NGLVieweR | R | false | true | 870 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/NGLVieweR.R
\name{setRock}
\alias{setRock}
\title{Set rock}
\usage{
setRock(NGLVieweR, rock = TRUE)
}
\arguments{
\item{NGLVieweR}{A NGLVieweR object.}
\item{rock}{If \code{TRUE} (default), start rocking and stop spinning.}
}
\value{
setRock... |
# analysis of all indicators
# z-score
zscore <- function(a.v, g.v) {pij <- a.v/sum(a.v)
rij <- g.v/sum(a.v)
zm <- (rij-pij)/sqrt((pij * (1 - pij))/sum(a.v))
sum(zm^2)}
# percent >5% deviation
perc.5 <- function(x, y){
length(... | /models/analysis.R | no_license | Robinlovelace/IPF-performance-testing | R | false | false | 1,682 | r | # analysis of all indicators
# z-score
zscore <- function(a.v, g.v) {pij <- a.v/sum(a.v)
rij <- g.v/sum(a.v)
zm <- (rij-pij)/sqrt((pij * (1 - pij))/sum(a.v))
sum(zm^2)}
# percent >5% deviation
perc.5 <- function(x, y){
length(... |
rankall <- function(outcome, num = "best") {
## Read outcome data, check that state and outcome are valid
## For each state, find the hospital of the given rank, return a dataframe
##with the hospital names and the (abbreviated) state name
data <- read.csv("outcome-of-care-measures.csv", colClas... | /rankall_US_hospitals.R | no_license | anajaved/coursera-datascience | R | false | false | 1,872 | r |
rankall <- function(outcome, num = "best") {
## Read outcome data, check that state and outcome are valid
## For each state, find the hospital of the given rank, return a dataframe
##with the hospital names and the (abbreviated) state name
data <- read.csv("outcome-of-care-measures.csv", colClas... |
#' @title Check model for (non-)constant error variance
#' @name check_heteroscedasticity
#'
#' @description Significance testing for linear regression models assumes that
#' the model errors (or residuals) have constant variance. If this assumption
#' is violated the p-values from the model are no longer reli... | /R/check_heteroscedasticity.R | no_license | cran/performance | R | false | false | 3,827 | r | #' @title Check model for (non-)constant error variance
#' @name check_heteroscedasticity
#'
#' @description Significance testing for linear regression models assumes that
#' the model errors (or residuals) have constant variance. If this assumption
#' is violated the p-values from the model are no longer reli... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/ClassNumbers.R
\name{ClassNumbers}
\alias{ClassNumbers}
\title{ClassNumbers}
\usage{
ClassNumbers(BAF)
}
\value{
Data frame with a populate percentage for each class
}
\description{
ClassNumbers: Define how B allele frequency (BAF) is... | /man/ClassNumbers.Rd | no_license | ej/iPsychCNV | R | false | false | 567 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/ClassNumbers.R
\name{ClassNumbers}
\alias{ClassNumbers}
\title{ClassNumbers}
\usage{
ClassNumbers(BAF)
}
\value{
Data frame with a populate percentage for each class
}
\description{
ClassNumbers: Define how B allele frequency (BAF) is... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Project.R
\name{getFileFolderPath}
\alias{getFileFolderPath}
\title{Show dialogs to select files or folders}
\usage{
getFileFolderPath(type = "dir", caption = "", extension = "", new_flag = F)
}
\arguments{
\item{type}{Type of document to get... | /man/getFileFolderPath.Rd | no_license | deepika060193/plethem | R | false | true | 937 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Project.R
\name{getFileFolderPath}
\alias{getFileFolderPath}
\title{Show dialogs to select files or folders}
\usage{
getFileFolderPath(type = "dir", caption = "", extension = "", new_flag = F)
}
\arguments{
\item{type}{Type of document to get... |
################################################################################
NIL_PTR <- methods::new("externalptr")
assert_sparse_matrix <- function(spmat) {
if (inherits(spmat, "dgCMatrix")) {
FALSE
} else if (inherits(spmat, "dsCMatrix")) {
if (!identical(spmat@uplo, "U"))
stop2("Only upper-t... | /R/SFBM.R | no_license | privefl/bigsparser | R | false | false | 12,129 | r | ################################################################################
NIL_PTR <- methods::new("externalptr")
assert_sparse_matrix <- function(spmat) {
if (inherits(spmat, "dgCMatrix")) {
FALSE
} else if (inherits(spmat, "dsCMatrix")) {
if (!identical(spmat@uplo, "U"))
stop2("Only upper-t... |
testlist <- list(id = NULL, score = NULL, id = NULL, booklet_id = integer(0), item_score = integer(0), person_id = c(50270463L, -1179026247L, 16777216L, 16L, -4605572L, -1191067646L, -15663175L, -1183008511L, 2L, -15663175L, -1183008511L, 0L, 4351L, -1179026247L, 16777216L, -4605572L, 280559616L, 0L... | /dexterMST/inst/testfiles/mutate_booklet_score/libFuzzer_mutate_booklet_score/mutate_booklet_score_valgrind_files/1612726821-test.R | no_license | akhikolla/updatedatatype-list1 | R | false | false | 476 | r | testlist <- list(id = NULL, score = NULL, id = NULL, booklet_id = integer(0), item_score = integer(0), person_id = c(50270463L, -1179026247L, 16777216L, 16L, -4605572L, -1191067646L, -15663175L, -1183008511L, 2L, -15663175L, -1183008511L, 0L, 4351L, -1179026247L, 16777216L, -4605572L, 280559616L, 0L... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ModelGeneration.R
\name{GetPredType}
\alias{GetPredType}
\title{A helper function used by the predict function. Since the many types of models are not
uniform in how they are called, this function determines what values to pass into "type"
an... | /man/GetPredType.Rd | no_license | orionw/ModelComparison | R | false | true | 985 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ModelGeneration.R
\name{GetPredType}
\alias{GetPredType}
\title{A helper function used by the predict function. Since the many types of models are not
uniform in how they are called, this function determines what values to pass into "type"
an... |
#Chapter 3: Graphs
attach(mtcars) #Attaches the data frame mtcars
plot(wt, mpg) #Opens a graphics window and generates a scatter plot between these varaibles
abline(lm(mpg~wt)) #Adds a line of best fit
title("Regression of MPG on Weight")
detach(mtcars) #Detaches the data frame again
#To save the file in a specific ... | /dawie_code/ch3.R | no_license | DawievLill/r_action | R | false | false | 4,671 | r |
#Chapter 3: Graphs
attach(mtcars) #Attaches the data frame mtcars
plot(wt, mpg) #Opens a graphics window and generates a scatter plot between these varaibles
abline(lm(mpg~wt)) #Adds a line of best fit
title("Regression of MPG on Weight")
detach(mtcars) #Detaches the data frame again
#To save the file in a specific ... |
# Получаем список магазинов
yamarketrGetCampaigns <- function(Login = NULL, TokenPath = getwd()){
#Авторизация
Token <- yamarketrAuth(Login = Login, TokenPath = TokenPath, NewUser = FALSE)$access_token
result <- data.frame(id = character(0), domain = character(0), state = numeric(0), stateReasons = numeric(0))
... | /Ryamarket/R/yamarketrGetCampaigns.R | permissive | mi-analyst/connectors | R | false | false | 3,986 | r | # Получаем список магазинов
yamarketrGetCampaigns <- function(Login = NULL, TokenPath = getwd()){
#Авторизация
Token <- yamarketrAuth(Login = Login, TokenPath = TokenPath, NewUser = FALSE)$access_token
result <- data.frame(id = character(0), domain = character(0), state = numeric(0), stateReasons = numeric(0))
... |
#options(error = utils::recover)
library(OpenMx)
library(rpf)
set.seed(9)
numItems <- 1024 + 512
i1 <- rpf.drm(multidimensional=TRUE)
items <- vector("list", numItems)
correct <- vector("list", numItems)
for (ix in 1:numItems) {
items[[ix]] <- i1
correct[[ix]] <- rpf.rparam(i1, version=1)
correct[[ix]][3] <- lo... | /inst/models/nightly/ifa-drm-wide.R | permissive | trbrick/OpenMx | R | false | false | 1,948 | r | #options(error = utils::recover)
library(OpenMx)
library(rpf)
set.seed(9)
numItems <- 1024 + 512
i1 <- rpf.drm(multidimensional=TRUE)
items <- vector("list", numItems)
correct <- vector("list", numItems)
for (ix in 1:numItems) {
items[[ix]] <- i1
correct[[ix]] <- rpf.rparam(i1, version=1)
correct[[ix]][3] <- lo... |
c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 9428
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 9427
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 9427
c
c Input Parameter (command line, fil... | /code/dcnf-ankit-optimized/Results/QBFLIB-2018/E1/Experiments/Basler/terminator/stmt21_5_304/stmt21_5_304.R | no_license | arey0pushpa/dcnf-autarky | R | false | false | 709 | r | c DCNF-Autarky [version 0.0.1].
c Copyright (c) 2018-2019 Swansea University.
c
c Input Clause Count: 9428
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 9427
c
c Performing E1-Autarky iteration.
c Remaining clauses count after E-Reduction: 9427
c
c Input Parameter (command line, fil... |
library(rvest)
library(dplyr)
library(httr)
res <- GET(url="https://datalab.naver.com/")
print(x=res)
status_code(x=res)
## 계층구조로 출력하기 위해 cat() 사용
content(x=res, as='text', encoding="UTF-8") %>% cat()
## http 응답객체에서 html 읽기
html <- read_html(x=res)
## HTML에서 css로 필요한 요소만 선택
span <- html_nodes(x=htm... | /크롤링(rvest).R | no_license | Lee-jun-young98/Social_Network_Analysis | R | false | false | 1,038 | r | library(rvest)
library(dplyr)
library(httr)
res <- GET(url="https://datalab.naver.com/")
print(x=res)
status_code(x=res)
## 계층구조로 출력하기 위해 cat() 사용
content(x=res, as='text', encoding="UTF-8") %>% cat()
## http 응답객체에서 html 읽기
html <- read_html(x=res)
## HTML에서 css로 필요한 요소만 선택
span <- html_nodes(x=htm... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ntcounts.R
\name{bamreadcounts}
\alias{bamreadcounts}
\title{extract nucleotide counts for targeted variants from the BAM file.}
\usage{
bamreadcounts(
bam = NULL,
loci = NULL,
zerobased = FALSE,
mapq = 10,
sam_flag = 1024,
op = N... | /man/bamreadcounts.Rd | permissive | bkohrn/maftools | R | false | true | 1,059 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ntcounts.R
\name{bamreadcounts}
\alias{bamreadcounts}
\title{extract nucleotide counts for targeted variants from the BAM file.}
\usage{
bamreadcounts(
bam = NULL,
loci = NULL,
zerobased = FALSE,
mapq = 10,
sam_flag = 1024,
op = N... |
#' Retrieve the taxonomic hierarchy for a given taxon ID.
#'
#' @export
#' @param x Vector of taxa names (character) or IDs (character or numeric)
#' to query.
#' @param db character; database to query. either \code{ncbi}, \code{itis},
#' \code{eol}, \code{col}, \code{tropicos}, \code{gbif}, \code{nbn},
#' \code{worms}... | /R/classification.R | permissive | haithamsghaier/taxize | R | false | false | 28,863 | r | #' Retrieve the taxonomic hierarchy for a given taxon ID.
#'
#' @export
#' @param x Vector of taxa names (character) or IDs (character or numeric)
#' to query.
#' @param db character; database to query. either \code{ncbi}, \code{itis},
#' \code{eol}, \code{col}, \code{tropicos}, \code{gbif}, \code{nbn},
#' \code{worms}... |
Sys.setenv(LANG = "en")
library(class)
library(caret)
data=read.csv("car/car.data",header=FALSE)
#data=read.csv("bank/bank-additional-full.csv",sep=";")
#data=read.csv("iris/iris.data",header=FALSE)
ordinal_data=data
to_predic=""
for (i in colnames(data)) {
if(! all(is.numeric(data[,i]))){
ordinal_data[,i]=factor(da... | /lvq.R | permissive | nvty13/Machine-Learning-P01-Aizu | R | false | false | 1,247 | r | Sys.setenv(LANG = "en")
library(class)
library(caret)
data=read.csv("car/car.data",header=FALSE)
#data=read.csv("bank/bank-additional-full.csv",sep=";")
#data=read.csv("iris/iris.data",header=FALSE)
ordinal_data=data
to_predic=""
for (i in colnames(data)) {
if(! all(is.numeric(data[,i]))){
ordinal_data[,i]=factor(da... |
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be use... | /fBasics/unitTests/runit.listIndex.R | permissive | solgenomics/R_libs | R | false | false | 1,589 | r |
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Library General Public
# License as published by the Free Software Foundation; either
# version 2 of the License, or (at your option) any later version.
#
# This library is distributed in the hope that it will be use... |
testlist <- list(ends = c(-1125300777L, 765849512L, -1760774663L, 791623263L, 1358782356L, -128659642L, -14914341L, 1092032864L, 1837701012L, 1632068659L), pts = c(1758370433L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,... | /IntervalSurgeon/inst/testfiles/rcpp_pile/AFL_rcpp_pile/rcpp_pile_valgrind_files/1609875342-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 729 | r | testlist <- list(ends = c(-1125300777L, 765849512L, -1760774663L, 791623263L, 1358782356L, -128659642L, -14914341L, 1092032864L, 1837701012L, 1632068659L), pts = c(1758370433L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L,... |
#Packages
library(rvest)
library(readr)
library(stringr)
library(plyr)
library(purrr)
#Set working directory (silly, but assumes following step 1...)
setwd("/Users/jonastillman/git/coderbunker/table_proj/scraping/R/")
relative_year_path = "./01_yearly_links/"
# Constants
SLEEP_INTERVAL = 0.25 #s
# Read in the data f... | /scraping/R/02_get_song_data.R | no_license | Tille88/scrape_dommanip_d3_table_talk | R | false | false | 4,250 | r | #Packages
library(rvest)
library(readr)
library(stringr)
library(plyr)
library(purrr)
#Set working directory (silly, but assumes following step 1...)
setwd("/Users/jonastillman/git/coderbunker/table_proj/scraping/R/")
relative_year_path = "./01_yearly_links/"
# Constants
SLEEP_INTERVAL = 0.25 #s
# Read in the data f... |
# Yige Wu @WashU Nov 2020
# set up libraries and output directory -----------------------------------
## set working directory
dir_base = "~/Box/Ding_Lab/Projects_Current/RCC/ccRCC_snRNA/"
setwd(dir_base)
source("./ccRCC_snRNA_analysis/load_pkgs.R")
source("./ccRCC_snRNA_analysis/functions.R")
source("./ccRCC_snRNA_an... | /findmarkers/tumor_vs_normal/filter_deg/filter_each_tumor_vs_normal_degs_to_pbrm1mutant_shared.R | no_license | ding-lab/ccRCC_snRNA_analysis | R | false | false | 1,914 | r | # Yige Wu @WashU Nov 2020
# set up libraries and output directory -----------------------------------
## set working directory
dir_base = "~/Box/Ding_Lab/Projects_Current/RCC/ccRCC_snRNA/"
setwd(dir_base)
source("./ccRCC_snRNA_analysis/load_pkgs.R")
source("./ccRCC_snRNA_analysis/functions.R")
source("./ccRCC_snRNA_an... |
suppressMessages(library(plyr))
suppressMessages(library(dplyr))
suppressMessages(library(RODBC))
suppressMessages(library(caret))
suppressMessages(library(lubridate))
suppressMessages(library(doParallel))
suppressMessages(library(FSelector))
suppressMessages(library(pROC)) # for AUC calculations
suppressMessages(libra... | /Engine/AnalysisResults/Tests/ML_Linux_FEA.R | no_license | esteevanderwalt/TwitterAnalysis | R | false | false | 7,647 | r | suppressMessages(library(plyr))
suppressMessages(library(dplyr))
suppressMessages(library(RODBC))
suppressMessages(library(caret))
suppressMessages(library(lubridate))
suppressMessages(library(doParallel))
suppressMessages(library(FSelector))
suppressMessages(library(pROC)) # for AUC calculations
suppressMessages(libra... |
ssawork <-
function(formula,ssamk){
### check inputs
if(formula==ssamk$formula){
Etab <- ssamk$et
mfdim <- dim(Etab)
tnames <- colnames(Etab)
oldnames <- rownames(ssamk$et)[2:(ssamk$nxvar+1L)]
} else{
# get formula
trmfrm <- terms.formula(formula)
ychk... | /bigsplines/R/ssawork.R | no_license | ingted/R-Examples | R | false | false | 16,987 | r | ssawork <-
function(formula,ssamk){
### check inputs
if(formula==ssamk$formula){
Etab <- ssamk$et
mfdim <- dim(Etab)
tnames <- colnames(Etab)
oldnames <- rownames(ssamk$et)[2:(ssamk$nxvar+1L)]
} else{
# get formula
trmfrm <- terms.formula(formula)
ychk... |
library(conting)
### Name: mod_probs
### Title: Compute Posterior Model Probabilities
### Aliases: mod_probs
### ** Examples
set.seed(1)
## Set seed for reproducibility
data(AOH)
## Load AOH data
test1<-bcct(formula=y~(alc+hyp+obe)^3,data=AOH,n.sample=100,prior="UIP")
## Starting from maximal model of saturated mo... | /data/genthat_extracted_code/conting/examples/mod_probs.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 975 | r | library(conting)
### Name: mod_probs
### Title: Compute Posterior Model Probabilities
### Aliases: mod_probs
### ** Examples
set.seed(1)
## Set seed for reproducibility
data(AOH)
## Load AOH data
test1<-bcct(formula=y~(alc+hyp+obe)^3,data=AOH,n.sample=100,prior="UIP")
## Starting from maximal model of saturated mo... |
library(ALDqr)
### Name: EM.qr
### Title: Quantile Regression Using Asymmetric Laplace Distribution
### Aliases: EM.qr
### Keywords: regression
### ** Examples
data(ais, package="sn")
attach(ais)
sexInd <- (sex=="female") + 0
x <- cbind(1,LBM,sexInd)
y <- BMI
tau <- 0.5
## EM.qr
EM.qr(y,x,tau)
| /data/genthat_extracted_code/ALDqr/examples/EM.qr.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 318 | r | library(ALDqr)
### Name: EM.qr
### Title: Quantile Regression Using Asymmetric Laplace Distribution
### Aliases: EM.qr
### Keywords: regression
### ** Examples
data(ais, package="sn")
attach(ais)
sexInd <- (sex=="female") + 0
x <- cbind(1,LBM,sexInd)
y <- BMI
tau <- 0.5
## EM.qr
EM.qr(y,x,tau)
|
### this is the script for plotting
rm(list=ls())
options(warn=1)
options(stringsAsFactors=FALSE)
options(digits=15)
require(stringr)
require(magrittr)
require(R.matlab)
require(ggplot2)
require(xml2)
require(cowplot)
dir="/Users/mikeaalv/Library/Mobile Documents/com~apple~CloudDocs/working/course/phys8601/assignment/a... | /assign1/plot.R | no_license | mikeaalv/Monte_Carlo_course_assign | R | false | false | 2,841 | r | ### this is the script for plotting
rm(list=ls())
options(warn=1)
options(stringsAsFactors=FALSE)
options(digits=15)
require(stringr)
require(magrittr)
require(R.matlab)
require(ggplot2)
require(xml2)
require(cowplot)
dir="/Users/mikeaalv/Library/Mobile Documents/com~apple~CloudDocs/working/course/phys8601/assignment/a... |
columns_selection_block = function(data, title){
columns <- c(colnames(data))
user_action <- menu(columns, graphics=T, title=title)
return(columns[user_action])
} | /Scripts/Blocks/column_selection_block.R | no_license | HolyBayes/R_for_analytics | R | false | false | 168 | r | columns_selection_block = function(data, title){
columns <- c(colnames(data))
user_action <- menu(columns, graphics=T, title=title)
return(columns[user_action])
} |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RequestRegistry.R
\name{HashCounter}
\alias{HashCounter}
\title{HashCounter}
\description{
hash with counter, to store requests, and count each time
it is used
}
\examples{
x <- HashCounter$new()
x$hash
z <- RequestSignature$new(method = "get... | /man/HashCounter.Rd | permissive | ropensci/webmockr | R | false | true | 2,655 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/RequestRegistry.R
\name{HashCounter}
\alias{HashCounter}
\title{HashCounter}
\description{
hash with counter, to store requests, and count each time
it is used
}
\examples{
x <- HashCounter$new()
x$hash
z <- RequestSignature$new(method = "get... |
#' Generic function to get regional data from the PCT
#'
#' This function gets data generated for the Propensity to Cycle Tool
#' project and returns objects in the modern `sf` class.
#'
#' @param base_url Where the data is stored.
#' @param purpose Trip purpose (typically `school` or `commute`)
#' @param geography Geo... | /R/get_pct.R | no_license | nujcharee/pct | R | false | false | 5,383 | r | #' Generic function to get regional data from the PCT
#'
#' This function gets data generated for the Propensity to Cycle Tool
#' project and returns objects in the modern `sf` class.
#'
#' @param base_url Where the data is stored.
#' @param purpose Trip purpose (typically `school` or `commute`)
#' @param geography Geo... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/train.spLearner.R
\docType{methods}
\name{train.spLearner,SpatialPointsDataFrame,ANY,SpatialPixelsDataFrame-method}
\alias{train.spLearner,SpatialPointsDataFrame,ANY,SpatialPixelsDataFrame-method}
\alias{train.spLearner}
\alias{train.sp... | /man/train.spLearner-methods.Rd | no_license | cran/landmap | R | false | true | 10,810 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/train.spLearner.R
\docType{methods}
\name{train.spLearner,SpatialPointsDataFrame,ANY,SpatialPixelsDataFrame-method}
\alias{train.spLearner,SpatialPointsDataFrame,ANY,SpatialPixelsDataFrame-method}
\alias{train.spLearner}
\alias{train.sp... |
\name{accuracy}
\alias{accuracy}
\alias{accuracy.improve}
\title{Estimate accuracy of three axis accelerometer/magnetometer.}
\description{The accuracy of the accelerometer and magnetometer is crucial to estimating pitch, roll, and heading. The axes must be orthogonal.}
\usage{
accuracy(x, y, z)
accuracy.impro... | /man/accuracy.Rd | no_license | cran/animalTrack | R | false | false | 6,397 | rd | \name{accuracy}
\alias{accuracy}
\alias{accuracy.improve}
\title{Estimate accuracy of three axis accelerometer/magnetometer.}
\description{The accuracy of the accelerometer and magnetometer is crucial to estimating pitch, roll, and heading. The axes must be orthogonal.}
\usage{
accuracy(x, y, z)
accuracy.impro... |
##############################
# This will access 311 customer service requests
# For accidents and street quality
##############################
rm(list=ls())
library(methods)
library(plyr)
library(dplyr)
library(jsonlite)
library(stringr)
library(httr)
library(ggmap)
rerun = FALSE
homedir = datadir = "~/"
socrata_ap... | /programs/Get_311_Data_Droplet.R | no_license | wfondrie/jhudashbike | R | false | false | 3,340 | r | ##############################
# This will access 311 customer service requests
# For accidents and street quality
##############################
rm(list=ls())
library(methods)
library(plyr)
library(dplyr)
library(jsonlite)
library(stringr)
library(httr)
library(ggmap)
rerun = FALSE
homedir = datadir = "~/"
socrata_ap... |
library(dMod)
### Name: funC0
### Title: Evaluation of algebraic expressions defined by characters
### Aliases: funC0
### ** Examples
library(ggplot2)
myfun <- funC0(c(y = "a*x^4 + b*x^2 + c"))
out <- myfun(a = -1, b = 2, c = 3, x = seq(-2, 2, .1), attach.input = TRUE)
qplot(x = x, y = y, data = as.data.frame(out),... | /data/genthat_extracted_code/dMod/examples/funC0.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 339 | r | library(dMod)
### Name: funC0
### Title: Evaluation of algebraic expressions defined by characters
### Aliases: funC0
### ** Examples
library(ggplot2)
myfun <- funC0(c(y = "a*x^4 + b*x^2 + c"))
out <- myfun(a = -1, b = 2, c = 3, x = seq(-2, 2, .1), attach.input = TRUE)
qplot(x = x, y = y, data = as.data.frame(out),... |
#dyplyr important lib: sql/oracle =store/view/filter
#sum of the fun:select/filter(rowwise)/mutate/Arrange/summarize
data()
data(airquality)
View(airquality)
air_quality<-airquality
dim(air_quality)
str(air_quality)
length(air_quality)
names(air_quality)
head(select(air_quality,Ozone,Day,Month),10)
tail(sele... | /selectdplyr.R | no_license | HanseeR/Practice- | R | false | false | 521 | r | #dyplyr important lib: sql/oracle =store/view/filter
#sum of the fun:select/filter(rowwise)/mutate/Arrange/summarize
data()
data(airquality)
View(airquality)
air_quality<-airquality
dim(air_quality)
str(air_quality)
length(air_quality)
names(air_quality)
head(select(air_quality,Ozone,Day,Month),10)
tail(sele... |
#' @title OpenML configuration.
#'
#' @description
#' After loading the package, it tries to find a configuration in your home
#' directory. The R command \code{path.expand("~/.openml/config")} gives you the
#' full path to the configuration file on your operating system.
#'
#' For further information please read the
#... | /R/config.R | no_license | jonmcalder/openml-r | R | false | false | 672 | r | #' @title OpenML configuration.
#'
#' @description
#' After loading the package, it tries to find a configuration in your home
#' directory. The R command \code{path.expand("~/.openml/config")} gives you the
#' full path to the configuration file on your operating system.
#'
#' For further information please read the
#... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.