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 |
|---|---|---|---|---|---|---|---|---|---|
setwd("C:/Users/USER/Desktop/Assignment")
library(lubridate)
variable.class<-c(rep('character',2),rep('numeric',7))
dataset<-read.table("household_power_consumption.txt",header=TRUE,sep=';',na.strings='?',colClasses=variable.class)
dataset<-dataset[dataset$Date=='1/2/2007' | dataset$Date=='2/2/2007',]
cols<-c('Date','... | /plot2.r | no_license | liuyanxiong/CourserCourse1 | R | false | false | 739 | r | setwd("C:/Users/USER/Desktop/Assignment")
library(lubridate)
variable.class<-c(rep('character',2),rep('numeric',7))
dataset<-read.table("household_power_consumption.txt",header=TRUE,sep=';',na.strings='?',colClasses=variable.class)
dataset<-dataset[dataset$Date=='1/2/2007' | dataset$Date=='2/2/2007',]
cols<-c('Date','... |
#' Create a tCorpus
#'
#' Create a \link{tCorpus} from raw text input. Input can be a character (or factor) vector, data.frame or quanteda corpus.
#' If a data.frame is given, all columns other than the document id and text columns are included as meta data. If a quanteda
#' corpus is given, the ids and texts are alrea... | /corpustools/R/create_tcorpus.r | no_license | akhikolla/InformationHouse | R | false | false | 17,517 | r | #' Create a tCorpus
#'
#' Create a \link{tCorpus} from raw text input. Input can be a character (or factor) vector, data.frame or quanteda corpus.
#' If a data.frame is given, all columns other than the document id and text columns are included as meta data. If a quanteda
#' corpus is given, the ids and texts are alrea... |
#IMPORT DATA AND TRANSPOSE
nci <- t(read.table("nci.data.txt"));
#IMPORT LABELS
label <- read.table("label.txt");
table(label);
#SINGLE LINKAGE
w.output <- HC(nci,0);
#The following provides a view on the cluster labels through iterations
View(w.output[,,1]);
#The following provides a view o... | /HC/script.r | no_license | Adrian-Ng/Machine-Learning | R | false | false | 1,417 | r | #IMPORT DATA AND TRANSPOSE
nci <- t(read.table("nci.data.txt"));
#IMPORT LABELS
label <- read.table("label.txt");
table(label);
#SINGLE LINKAGE
w.output <- HC(nci,0);
#The following provides a view on the cluster labels through iterations
View(w.output[,,1]);
#The following provides a view o... |
setwd("C:\\Users\\A580489\\Documents\\R\\Coursera\\Exploratory Data Analysis\\exdata-data-household_power_consumption")
data <- read.table("household_power_consumption.txt",sep=";", header=T,stringsAsFactors=F)
data$Date <- as.Date(data$Date, format = "%d/%m/%Y")
data2 <- data[c(which(data$Date=="2007-02-01"),which(da... | /Plot1.R | no_license | embren/ExData_Plotting1 | R | false | false | 630 | r | setwd("C:\\Users\\A580489\\Documents\\R\\Coursera\\Exploratory Data Analysis\\exdata-data-household_power_consumption")
data <- read.table("household_power_consumption.txt",sep=";", header=T,stringsAsFactors=F)
data$Date <- as.Date(data$Date, format = "%d/%m/%Y")
data2 <- data[c(which(data$Date=="2007-02-01"),which(da... |
\name{setup.figure}
\alias{setup.figure}
\alias{setup.figure.gridColScheme}
\alias{setup.figure.gridRowScheme}
\title{
Method defining a layout scheme
}
\description{
Layout schemes are defined by the scheme object and the implmentation of
the \code{setup.figure} method for that object.
The purpose of \code{setup.figu... | /man/setup.figure.Rd | permissive | s-u/snippets | R | false | false | 1,428 | rd | \name{setup.figure}
\alias{setup.figure}
\alias{setup.figure.gridColScheme}
\alias{setup.figure.gridRowScheme}
\title{
Method defining a layout scheme
}
\description{
Layout schemes are defined by the scheme object and the implmentation of
the \code{setup.figure} method for that object.
The purpose of \code{setup.figu... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ec2_operations.R
\name{ec2_describe_vpc_attribute}
\alias{ec2_describe_vpc_attribute}
\title{Describes the specified attribute of the specified VPC}
\usage{
ec2_describe_vpc_attribute(Attribute, VpcId, DryRun = NULL)
}
\arguments{
\item{Attri... | /cran/paws.compute/man/ec2_describe_vpc_attribute.Rd | permissive | paws-r/paws | R | false | true | 917 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ec2_operations.R
\name{ec2_describe_vpc_attribute}
\alias{ec2_describe_vpc_attribute}
\title{Describes the specified attribute of the specified VPC}
\usage{
ec2_describe_vpc_attribute(Attribute, VpcId, DryRun = NULL)
}
\arguments{
\item{Attri... |
if (!"load_data.R" %in% list.files()) {
setwd("C:/Users/richard/Documents/datascience/data/Coursera-Exploratory-Data-Analysis/")
}
source("load_data.R")
png(filename = "plot4.png",
width = 480, height = 480,
units = "px", bg = "transparent")
par(mfrow = c(2, 2))
## Top-left
plot(DateTime, Global_active_powe... | /plot4.R | no_license | elema/Coursera-Exploratory-Data-Analysis | R | false | false | 1,051 | r | if (!"load_data.R" %in% list.files()) {
setwd("C:/Users/richard/Documents/datascience/data/Coursera-Exploratory-Data-Analysis/")
}
source("load_data.R")
png(filename = "plot4.png",
width = 480, height = 480,
units = "px", bg = "transparent")
par(mfrow = c(2, 2))
## Top-left
plot(DateTime, Global_active_powe... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/agraph.R
\name{parent_edges}
\alias{parent_edges}
\title{Create the list of edges for an admixture graph.}
\usage{
parent_edges(edges)
}
\arguments{
\item{edges}{List of edges.}
}
\description{
Syntactic suggar for constructing edges in an ad... | /man/parent_edges.Rd | no_license | guzhongru/admixture_graph | R | false | true | 338 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/agraph.R
\name{parent_edges}
\alias{parent_edges}
\title{Create the list of edges for an admixture graph.}
\usage{
parent_edges(edges)
}
\arguments{
\item{edges}{List of edges.}
}
\description{
Syntactic suggar for constructing edges in an ad... |
#Q.3 Problem Statement :- Building a prediction model for salary hike based on the better R^2 value.
SH<-read.csv(file.choose())
View(SH)
attach(SH)
summary(SH)
# x = YearsExperience; y = Salary
X <- YearsExperience; Y <- Salary
plot(Y,X)
#Lets check the correlation between the given X and Y
cor(... | /Q4.R | no_license | ShubhamDS-P/Linear-Regression | R | false | false | 16,290 | r | #Q.3 Problem Statement :- Building a prediction model for salary hike based on the better R^2 value.
SH<-read.csv(file.choose())
View(SH)
attach(SH)
summary(SH)
# x = YearsExperience; y = Salary
X <- YearsExperience; Y <- Salary
plot(Y,X)
#Lets check the correlation between the given X and Y
cor(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/addElements.R
\docType{methods}
\name{addFACS2cellexalvr}
\alias{addFACS2cellexalvr}
\alias{addFACS2cellexalvr,cellexalvrR-method}
\title{description of function 'addFACS2cellexalvr'}
\arguments{
\item{cellexalObj, }{cellexalvr object}
\item... | /man/addFACS2cellexalvr-methods.Rd | no_license | frenkiboy/cellexalvrR | R | false | true | 525 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/addElements.R
\docType{methods}
\name{addFACS2cellexalvr}
\alias{addFACS2cellexalvr}
\alias{addFACS2cellexalvr,cellexalvrR-method}
\title{description of function 'addFACS2cellexalvr'}
\arguments{
\item{cellexalObj, }{cellexalvr object}
\item... |
context("Test complete enumeration implementation")
library("anticlust")
test_that("complete enumeration computes optimal solution", {
conditions <- expand.grid(m = 1:4, p = 2:3)
for (i in nrow(conditions)) {
m_features <- conditions[i, "m"]
K <- conditions[i, "p"]
n_elements <- K * 4 # n must be mult... | /tests/testthat/test-enumeration.R | permissive | unDocUMeantIt/anticlust | R | false | false | 883 | r |
context("Test complete enumeration implementation")
library("anticlust")
test_that("complete enumeration computes optimal solution", {
conditions <- expand.grid(m = 1:4, p = 2:3)
for (i in nrow(conditions)) {
m_features <- conditions[i, "m"]
K <- conditions[i, "p"]
n_elements <- K * 4 # n must be mult... |
readBerkeleyStation <- function(filename) {
if(!file.exists(filename))stop(cat(filename, " not found", "\n"))
notallna <- function(x){ any(!is.na(x))}
switch(basename(filename),
data.txt = { X<- tbl_df(read_delim(filename,col_names=c("Id","Series","Date","Temperatu... | /Functions/readBerkeleyStation.R | no_license | stevenmosher/BerkeleyEarthFunctions | R | false | false | 11,315 | r | readBerkeleyStation <- function(filename) {
if(!file.exists(filename))stop(cat(filename, " not found", "\n"))
notallna <- function(x){ any(!is.na(x))}
switch(basename(filename),
data.txt = { X<- tbl_df(read_delim(filename,col_names=c("Id","Series","Date","Temperatu... |
testlist <- list(doy = numeric(0), latitude = numeric(0), temp = c(1.85957127796016e-292, 2.31846386614547e-290, 2.16463723225414e+282, 1.07957356037334e+256, 9.9966463153609e-79, 1.52969492154541e-307, -6.6792472828346e-83, 3.26827603831782e-308, 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/ET0_ThornthwaiteWilmott/AFL_ET0_ThornthwaiteWilmott/ET0_ThornthwaiteWilmott_valgrind_files/1615831040-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 461 | r | testlist <- list(doy = numeric(0), latitude = numeric(0), temp = c(1.85957127796016e-292, 2.31846386614547e-290, 2.16463723225414e+282, 1.07957356037334e+256, 9.9966463153609e-79, 1.52969492154541e-307, -6.6792472828346e-83, 3.26827603831782e-308, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,... |
library(xml2)
library(rvest)
library(curl)
library(XML)
library(jsonlite)
url <- 'http://www.soccernews.com/soccer-transfers/english-premier-league-transfers/'
web_content <- read_html(curl(url, handle = new_handle("useragent" = "Mozilla/5.0")))
table <- data.frame(position = html_text(html_nodes(html_nodes(web_con... | /rProcessing/getTestData.R | no_license | amirunpri2018/aggNets | R | false | false | 2,461 | r | library(xml2)
library(rvest)
library(curl)
library(XML)
library(jsonlite)
url <- 'http://www.soccernews.com/soccer-transfers/english-premier-league-transfers/'
web_content <- read_html(curl(url, handle = new_handle("useragent" = "Mozilla/5.0")))
table <- data.frame(position = html_text(html_nodes(html_nodes(web_con... |
##############################################################################################################
### Baixar e organizar dados do GBIF ###
#############################################################################################... | /scripts/03.1 occs GBIF.R | no_license | Xuletajr/cncflora_scripts_r_avaliacao | R | false | false | 4,950 | r | ##############################################################################################################
### Baixar e organizar dados do GBIF ###
#############################################################################################... |
mp_setapikey("../manifesto_apikey.txt")
test_that("Relative measure of party size works and produces correct results", {
c(1, 2, 5) %>%
mp_rmps(threshold_sum = 0) %>%
expect_equal(c(0.07, 0.23, 0.71), tolerance = 0.01)
c(1, 2, 5, NA) %>%
mp_rmps(threshold_sum = 0) %>%
expect_equal(c(0.07, 0.23, 0.... | /tests/testthat/testclarity.R | no_license | mohamednasr1/manifestoR | R | false | false | 3,623 | r | mp_setapikey("../manifesto_apikey.txt")
test_that("Relative measure of party size works and produces correct results", {
c(1, 2, 5) %>%
mp_rmps(threshold_sum = 0) %>%
expect_equal(c(0.07, 0.23, 0.71), tolerance = 0.01)
c(1, 2, 5, NA) %>%
mp_rmps(threshold_sum = 0) %>%
expect_equal(c(0.07, 0.23, 0.... |
library(CpGassoc)
### Name: cpg.GC
### Title: cpg.GC and methods for output of function
### Aliases: cpg.GC print.cpg.gc print.cpg.perm.gc
### Keywords: ~kwd1 ~kwd2
### ** Examples
data(samplecpg,samplepheno,package="CpGassoc")
results<-cpg.assoc(samplecpg,samplepheno$weight,large.data=FALSE)
cpg.GC(results)
##If ... | /data/genthat_extracted_code/CpGassoc/examples/cpg.GC.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 402 | r | library(CpGassoc)
### Name: cpg.GC
### Title: cpg.GC and methods for output of function
### Aliases: cpg.GC print.cpg.gc print.cpg.perm.gc
### Keywords: ~kwd1 ~kwd2
### ** Examples
data(samplecpg,samplepheno,package="CpGassoc")
results<-cpg.assoc(samplecpg,samplepheno$weight,large.data=FALSE)
cpg.GC(results)
##If ... |
\name{lossDevOptions}
\alias{lossDevOptions}
\title{Options for BALD.}
\usage{lossDevOptions(...)}
\description{Options for \pkg{BALD}.}
\details{Currently the only options are \code{keepCodaOnDisk} and \code{logsplinePenaltyFunction}.
\describe{
\item{\code{logsplinePenaltyFunction}}{
When drawing kernal den... | /man/lossDevOptions.Rd | no_license | cran/BALD | R | false | false | 1,066 | rd | \name{lossDevOptions}
\alias{lossDevOptions}
\title{Options for BALD.}
\usage{lossDevOptions(...)}
\description{Options for \pkg{BALD}.}
\details{Currently the only options are \code{keepCodaOnDisk} and \code{logsplinePenaltyFunction}.
\describe{
\item{\code{logsplinePenaltyFunction}}{
When drawing kernal den... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/NOMAD.R
\name{nomadCheckLogTransform}
\alias{nomadCheckLogTransform}
\title{Check whether logging the data is necessary. y and x are the same inputs
as nomadNormalization
Check whether logging the data is necessary}
\usage{
nomadCheckLogTrans... | /man/nomadCheckLogTransform.Rd | no_license | somakray/NOMAD | R | false | true | 1,116 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/NOMAD.R
\name{nomadCheckLogTransform}
\alias{nomadCheckLogTransform}
\title{Check whether logging the data is necessary. y and x are the same inputs
as nomadNormalization
Check whether logging the data is necessary}
\usage{
nomadCheckLogTrans... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/LearnerClustPAM.R
\name{mlr_learners_clust.pam}
\alias{mlr_learners_clust.pam}
\alias{LearnerClustPAM}
\title{Partitioning Around Medoids Clustering Learner}
\description{
A \link{LearnerClust} for PAM clustering implemented in \code{\link[cl... | /man/mlr_learners_clust.pam.Rd | no_license | mlr-org/mlr3cluster | R | false | true | 4,944 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/LearnerClustPAM.R
\name{mlr_learners_clust.pam}
\alias{mlr_learners_clust.pam}
\alias{LearnerClustPAM}
\title{Partitioning Around Medoids Clustering Learner}
\description{
A \link{LearnerClust} for PAM clustering implemented in \code{\link[cl... |
# in_file <- "http://localhost/thredds/dodsC/nwm_retro_full"
# out_file <- "demo_nwm_retro.nc"
#
in_file <- "http://10.0.0.25:8080/thredds/dodsC/data/nwmv21/content/data/nwm_v21_retro_full_ts.ncml"
out_file <- "nwmv21_nwis.nc"
comid_list <- readRDS("R/nexus_locations/nwis_comids.rds")
library(ncdf4)
nc <- nc_open(i... | /R/subset_catchments_dap.R | permissive | dblodgett-usgs/nwm_subset | R | false | false | 5,115 | r | # in_file <- "http://localhost/thredds/dodsC/nwm_retro_full"
# out_file <- "demo_nwm_retro.nc"
#
in_file <- "http://10.0.0.25:8080/thredds/dodsC/data/nwmv21/content/data/nwm_v21_retro_full_ts.ncml"
out_file <- "nwmv21_nwis.nc"
comid_list <- readRDS("R/nexus_locations/nwis_comids.rds")
library(ncdf4)
nc <- nc_open(i... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{probit}
\alias{probit}
\alias{probitInv}
\title{probit and inverse probit functions}
\usage{
probit(x, low = 0, high = 1)
probitInv(x, low = 0, high = 1)
}
\arguments{
\item{x}{Input value(s) in range [low,high] to ... | /man/probit.Rd | no_license | cran/RxODE | R | false | true | 707 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{probit}
\alias{probit}
\alias{probitInv}
\title{probit and inverse probit functions}
\usage{
probit(x, low = 0, high = 1)
probitInv(x, low = 0, high = 1)
}
\arguments{
\item{x}{Input value(s) in range [low,high] to ... |
n<-4
(M<-matrix(NA,n,n))
(列数<-col(M))
(行数<-row(M))
(対角要素<-diag(列数))
(対角<-対角要素^2-対角要素+1)
(四角行列<-outer(対角,対角,"pmax"))
(差分<-列数-行数)
ans<-四角行列+差分
ans | /NQ004.R | no_license | haradakunihiko/investigation_of_r | R | false | false | 226 | r |
n<-4
(M<-matrix(NA,n,n))
(列数<-col(M))
(行数<-row(M))
(対角要素<-diag(列数))
(対角<-対角要素^2-対角要素+1)
(四角行列<-outer(対角,対角,"pmax"))
(差分<-列数-行数)
ans<-四角行列+差分
ans |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stan_axe.R
\name{stan_axe}
\alias{stan_axe}
\title{Remove elements from stanfit object}
\usage{
stan_axe(object, what = c("summary", "fit_instance", "stanmodel"))
}
\arguments{
\item{object}{stanfit}
\item{what}{name of attribute to remove, ... | /man/stan_axe.Rd | permissive | statwonk/shredder | R | false | true | 859 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/stan_axe.R
\name{stan_axe}
\alias{stan_axe}
\title{Remove elements from stanfit object}
\usage{
stan_axe(object, what = c("summary", "fit_instance", "stanmodel"))
}
\arguments{
\item{object}{stanfit}
\item{what}{name of attribute to remove, ... |
#'@include utilities.R ggpar.R ggpie.R
NULL
#'Donut chart
#'@description Create a donut chart.
#'@inheritParams ggboxplot
#'@inheritParams ggplot2::geom_errorbar
#'@param x variable containing values for drawing.
#'@param label variable specifying the label of each slice.
#'@param lab.pos character specifying the posit... | /R/ggdonutchart.R | no_license | earcanal/ggpubr | R | false | false | 4,799 | r | #'@include utilities.R ggpar.R ggpie.R
NULL
#'Donut chart
#'@description Create a donut chart.
#'@inheritParams ggboxplot
#'@inheritParams ggplot2::geom_errorbar
#'@param x variable containing values for drawing.
#'@param label variable specifying the label of each slice.
#'@param lab.pos character specifying the posit... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/community_graph.R
\name{scale_free}
\alias{scale_free}
\title{keywords internal}
\usage{
scale_free(D, e, pfun)
}
\description{
keywords internal
}
| /man/scale_free.Rd | no_license | githubwangsibo/SpiecEasi | R | false | false | 235 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/community_graph.R
\name{scale_free}
\alias{scale_free}
\title{keywords internal}
\usage{
scale_free(D, e, pfun)
}
\description{
keywords internal
}
|
toolbox_event_roll <- function(env = 'urban'){
roll <- sample(c(rep('Events', times = 6),
rep('Creatures', times = 2),
rep('People', times = 4),
rep('Situations', times = 8)), size = 1)
if(roll == 'Events'){
if(env == 'urban') print(toolbox_event_ur... | /R/solo_adventurer_toolbox_event.R | permissive | ghobo-ai/trpgtools | R | false | false | 7,340 | r | toolbox_event_roll <- function(env = 'urban'){
roll <- sample(c(rep('Events', times = 6),
rep('Creatures', times = 2),
rep('People', times = 4),
rep('Situations', times = 8)), size = 1)
if(roll == 'Events'){
if(env == 'urban') print(toolbox_event_ur... |
/R/Ks.R | no_license | jamesorr/seacarb | R | false | false | 3,799 | r | ||
clock3 <- function(occ, bg.coords){
# the spatial sampling aims at defining areas containing either test or training data
# for the CLOCK-3 method, 2 diagonal transects are defined, cutting the Southern Ocean circle into 3 areas. Two of the 3 areas contains the data that will be used to train the model, the remain... | /Spatial cross validation procedures/clock3-cg.R | no_license | charleneguillaumot/THESIS | R | false | false | 4,797 | r | clock3 <- function(occ, bg.coords){
# the spatial sampling aims at defining areas containing either test or training data
# for the CLOCK-3 method, 2 diagonal transects are defined, cutting the Southern Ocean circle into 3 areas. Two of the 3 areas contains the data that will be used to train the model, the remain... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dfmanipulation.R
\name{mode.type}
\alias{mode.type}
\title{Mode Type}
\usage{
mode.type(df)
}
\arguments{
\item{df}{data frame}
}
\value{
Return character vector of mode types
}
\description{
Find the mode of the variables of a df as
dictated... | /man/mode.type.Rd | no_license | jtlandis/justinmisc | R | false | true | 330 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dfmanipulation.R
\name{mode.type}
\alias{mode.type}
\title{Mode Type}
\usage{
mode.type(df)
}
\arguments{
\item{df}{data frame}
}
\value{
Return character vector of mode types
}
\description{
Find the mode of the variables of a df as
dictated... |
/old usb backup/on machine/gcglass1.rd | no_license | htbrdd/rdworks-files | R | false | false | 70,157 | rd | ||
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/enhancers.R
\name{add_gcd}
\alias{add_gcd}
\title{Add gene content distance}
\usage{
add_gcd(tg, method, binary)
}
\arguments{
\item{tg}{A tidygenomes object}
\item{method}{See \code{\link[vegan:vegdist]{vegan::vegdist()}}}
\item{binary}{Se... | /man/add_gcd.Rd | no_license | SWittouck/tidygenomes | R | false | true | 673 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/enhancers.R
\name{add_gcd}
\alias{add_gcd}
\title{Add gene content distance}
\usage{
add_gcd(tg, method, binary)
}
\arguments{
\item{tg}{A tidygenomes object}
\item{method}{See \code{\link[vegan:vegdist]{vegan::vegdist()}}}
\item{binary}{Se... |
library(pmeasyr)
# cidd2 <- DBI::dbConnect(odbc::odbc(),
# time_out = 10)
cidd2 <- DBI::dbConnect(odbc::odbc(),
time_out = 10)
library(dplyr)
a <- tibble(A = seq(Sys.Date()+1, Sys.Date() + 1e6, by = 1))
DBI::dbWriteTable(cidd2, 'TEST_DATES', a, overwrite = TRUE)
DBI::... | /import_init_pmsi.R | no_license | GuillaumePressiat/schema_pmsi | R | false | false | 21,040 | r |
library(pmeasyr)
# cidd2 <- DBI::dbConnect(odbc::odbc(),
# time_out = 10)
cidd2 <- DBI::dbConnect(odbc::odbc(),
time_out = 10)
library(dplyr)
a <- tibble(A = seq(Sys.Date()+1, Sys.Date() + 1e6, by = 1))
DBI::dbWriteTable(cidd2, 'TEST_DATES', a, overwrite = TRUE)
DBI::... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lpfr.R
\name{lpfr}
\alias{lpfr}
\title{Longitudinal penalized functional regression}
\usage{
lpfr(Y, subj, covariates = NULL, funcs, kz = 30, kb = 30,
smooth.cov = FALSE, family = "gaussian", method = "REML", ...)
}
\arguments{
\item{Y}{vec... | /man/lpfr.Rd | no_license | dill/refund | R | false | true | 4,395 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/lpfr.R
\name{lpfr}
\alias{lpfr}
\title{Longitudinal penalized functional regression}
\usage{
lpfr(Y, subj, covariates = NULL, funcs, kz = 30, kb = 30,
smooth.cov = FALSE, family = "gaussian", method = "REML", ...)
}
\arguments{
\item{Y}{vec... |
source("notebooks/lib.R")
library(zoo)
myred <- "#F05431"
myyellow <- "#FED152"
mygreen <- "#BFCE80"
client_colours <- c("#000011", "#ff9a02", "#eb4a9b", "#7dc19e", "grey", "red")
bxs_ats <- 63241:63400 %>%
map(get_blocks_and_attestations) %>%
purrr::transpose() %>%
map(rbindlist)
bxs <- copy(bxs_ats$block)
bx... | /posdata/scripts/20210908_slowdown.R | no_license | ethereum/rig | R | false | false | 7,007 | r | source("notebooks/lib.R")
library(zoo)
myred <- "#F05431"
myyellow <- "#FED152"
mygreen <- "#BFCE80"
client_colours <- c("#000011", "#ff9a02", "#eb4a9b", "#7dc19e", "grey", "red")
bxs_ats <- 63241:63400 %>%
map(get_blocks_and_attestations) %>%
purrr::transpose() %>%
map(rbindlist)
bxs <- copy(bxs_ats$block)
bx... |
context("Utility functions")
x <- log(runif(100) + 1)
test_that("log_sum_exp is numerically stable for large and small numbers", {
expect_equal(log_sum_exp(x), log(sum(exp(x))))
expect_equal(log_sum_exp(x - 1e9) + 1e9, log_sum_exp(x))
expect_equal(log_sum_exp(x + 1e9) - 1e9, log_sum_exp(x))
})
test_that("subt... | /tests/testthat/test-utils.R | permissive | kleinschmidt/phondisttools | R | false | false | 790 | r | context("Utility functions")
x <- log(runif(100) + 1)
test_that("log_sum_exp is numerically stable for large and small numbers", {
expect_equal(log_sum_exp(x), log(sum(exp(x))))
expect_equal(log_sum_exp(x - 1e9) + 1e9, log_sum_exp(x))
expect_equal(log_sum_exp(x + 1e9) - 1e9, log_sum_exp(x))
})
test_that("subt... |
testlist <- list(a = 0L, b = 0L, x = c(-724249388L, -724249388L, -724249388L, -724249388L, -724249388L, -724249388L, -724249388L, -724249388L, -724249388L, -738197504L, 0L, 268371968L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L))
result <- do.call(grattan:::anyOutside,testlist)
str(result) | /grattan/inst/testfiles/anyOutside/libFuzzer_anyOutside/anyOutside_valgrind_files/1610387103-test.R | no_license | akhikolla/updated-only-Issues | R | false | false | 297 | r | testlist <- list(a = 0L, b = 0L, x = c(-724249388L, -724249388L, -724249388L, -724249388L, -724249388L, -724249388L, -724249388L, -724249388L, -724249388L, -738197504L, 0L, 268371968L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L, 0L))
result <- do.call(grattan:::anyOutside,testlist)
str(result) |
\name{remlscoregamma}
\alias{remlscoregamma}
\title{Approximate REML for gamma regression with structured dispersion}
\description{
Estimates structured dispersion effects using approximate REML with gamma responses.
}
\usage{
remlscoregamma(y,X,Z,mlink="log",dlink="log",trace=FALSE,tol=1e-5,maxit=40)
}
\argum... | /man/remlscorgamma.Rd | no_license | franckess/statmod | R | false | false | 2,999 | rd | \name{remlscoregamma}
\alias{remlscoregamma}
\title{Approximate REML for gamma regression with structured dispersion}
\description{
Estimates structured dispersion effects using approximate REML with gamma responses.
}
\usage{
remlscoregamma(y,X,Z,mlink="log",dlink="log",trace=FALSE,tol=1e-5,maxit=40)
}
\argum... |
# Examples of: ClassMorph, pcc, CleanCols, CleanRows, easyswap, Booleanize
#-------------------------------------------------------------------------------------
# Example: Change column classes in batch
#-------------------------------------------------------------------------------------
library(data.table)
DT <- ... | /inst/examples/ex-cleaning.R | no_license | bfatemi/easydata | R | false | false | 2,257 | r | # Examples of: ClassMorph, pcc, CleanCols, CleanRows, easyswap, Booleanize
#-------------------------------------------------------------------------------------
# Example: Change column classes in batch
#-------------------------------------------------------------------------------------
library(data.table)
DT <- ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/db_download.R
\name{db_download}
\alias{db_download}
\alias{db_download_itis}
\alias{db_download_tpl}
\alias{db_download_col}
\alias{db_download_gbif}
\title{Download taxonomic databases}
\usage{
db_download_itis(verbose = TRUE)
db_download_... | /man/db_download.Rd | permissive | tdjames1/taxizedb | R | false | true | 1,331 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/db_download.R
\name{db_download}
\alias{db_download}
\alias{db_download_itis}
\alias{db_download_tpl}
\alias{db_download_col}
\alias{db_download_gbif}
\title{Download taxonomic databases}
\usage{
db_download_itis(verbose = TRUE)
db_download_... |
library(testthat)
library(rmorphodita)
test_check("rmorphodita")
| /tests/testthat.R | permissive | skvrnami/rmorphodita | R | false | false | 66 | r | library(testthat)
library(rmorphodita)
test_check("rmorphodita")
|
testlist <- list(id = NULL, id = NULL, booklet_id = c(8168473L, 2127314835L, 171177770L, -1942759639L, -1815221204L, 601253144L, -804651186L, 2094281728L, 860713787L, -971707632L, -1475044502L, 870040598L, -1183306098L, -1415711445L, 1901326755L, -1882837573L, 1340545259L, 1156041943L, 823641812L, -1106109928L, -10... | /dexterMST/inst/testfiles/is_person_booklet_sorted/AFL_is_person_booklet_sorted/is_person_booklet_sorted_valgrind_files/1615938475-test.R | no_license | akhikolla/updatedatatype-list1 | R | false | false | 826 | r | testlist <- list(id = NULL, id = NULL, booklet_id = c(8168473L, 2127314835L, 171177770L, -1942759639L, -1815221204L, 601253144L, -804651186L, 2094281728L, 860713787L, -971707632L, -1475044502L, 870040598L, -1183306098L, -1415711445L, 1901326755L, -1882837573L, 1340545259L, 1156041943L, 823641812L, -1106109928L, -10... |
#Read Data
file <- "./household_power_consumption.txt"
obs <- read.table(file, header=TRUE,sep=";",na.strings="?", stringsAsFactors = FALSE)
# Convert to Date format
obs$Date <- as.Date(obs$Date, "%d/%m/%Y")
#Subset Data
reqobs <- subset(obs,obs$Date=="2007-02-01")
reqobs <- rbind(reqobs,subset(obs,obs$Date=="2007-02-0... | /plot1.R | no_license | jefriyang/ExData_Plotting1 | R | false | false | 810 | r | #Read Data
file <- "./household_power_consumption.txt"
obs <- read.table(file, header=TRUE,sep=";",na.strings="?", stringsAsFactors = FALSE)
# Convert to Date format
obs$Date <- as.Date(obs$Date, "%d/%m/%Y")
#Subset Data
reqobs <- subset(obs,obs$Date=="2007-02-01")
reqobs <- rbind(reqobs,subset(obs,obs$Date=="2007-02-0... |
##0.Get the data
#Download the file and put the data in the "data" folder
if(!file.exists("./data")){dir.create("./data")}
fileUrl<-"https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.file(fileUrl, destfile = "./data/Dataset.zip")
#Unzip the file
unzip(zipfile = "./data/D... | /run_analysis.R | no_license | krisjun1/Getting-and-Cleaning-Data-Course-Project | R | false | false | 4,183 | r | ##0.Get the data
#Download the file and put the data in the "data" folder
if(!file.exists("./data")){dir.create("./data")}
fileUrl<-"https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip"
download.file(fileUrl, destfile = "./data/Dataset.zip")
#Unzip the file
unzip(zipfile = "./data/D... |
# This takes in a bag of words across all essays (essay_word_counts.feather)
# and identifies the TOP_N most frequent words. It then uses the google tranlsate
# API to translate those words into all languages (GOOGLE_LANGS). Google charges
# $20 more 1M characters.
library(feather)
library(tidyverse)
library(data.tab... | /analyses/2_language_drawing_dists/R_scripts/4a_get_target_word_translations.R | no_license | mllewis/conceptviz | R | false | false | 1,587 | r | # This takes in a bag of words across all essays (essay_word_counts.feather)
# and identifies the TOP_N most frequent words. It then uses the google tranlsate
# API to translate those words into all languages (GOOGLE_LANGS). Google charges
# $20 more 1M characters.
library(feather)
library(tidyverse)
library(data.tab... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/convergence.R
\name{mcse_sd}
\alias{mcse_sd}
\alias{mcse_sd.default}
\alias{mcse_sd.rvar}
\title{Monte Carlo standard error for the standard deviation}
\usage{
mcse_sd(x, ...)
\method{mcse_sd}{default}(x, ...)
\method{mcse_sd}{rvar}(x, ...)... | /man/mcse_sd.Rd | permissive | stan-dev/posterior | R | false | true | 2,638 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/convergence.R
\name{mcse_sd}
\alias{mcse_sd}
\alias{mcse_sd.default}
\alias{mcse_sd.rvar}
\title{Monte Carlo standard error for the standard deviation}
\usage{
mcse_sd(x, ...)
\method{mcse_sd}{default}(x, ...)
\method{mcse_sd}{rvar}(x, ...)... |
### Compute GO term enrichment based on Arabidopsis orthologs.
library(tidyverse)
library(purrrlyr)
source("src/go_enrich_at.R")
# Load data files ---------------------------------------------------------
cand <- read_rds("data/gemma/nearest_genes.rds")
gene_table <- read_rds("data/gemma/candidate_genes.rds") %>%
... | /04.genetic_analysis/08.go_enrichment.R | no_license | amkusmec/genomes2fields | R | false | false | 1,400 | r | ### Compute GO term enrichment based on Arabidopsis orthologs.
library(tidyverse)
library(purrrlyr)
source("src/go_enrich_at.R")
# Load data files ---------------------------------------------------------
cand <- read_rds("data/gemma/nearest_genes.rds")
gene_table <- read_rds("data/gemma/candidate_genes.rds") %>%
... |
# data
# http://www.ncdc.noaa.gov/data-access/land-based-station-data/land-based-datasets/climate-normals/1981-2010-normals-data
# http://gis.ncdc.noaa.gov/map/viewer/#app=cdo&cfg=cdo&theme=normals&layers=01&node=gis&extent=-149.3:20.2:-60.1:69.6&custom=normals
cparkjan <- c(33.4,33.3,33.1,33,32.9,32.8,32.7,32.6,32.5... | /ttest/ttest.R | no_license | Bhavikpatel576/hackNYmasters | R | false | false | 1,617 | r | # data
# http://www.ncdc.noaa.gov/data-access/land-based-station-data/land-based-datasets/climate-normals/1981-2010-normals-data
# http://gis.ncdc.noaa.gov/map/viewer/#app=cdo&cfg=cdo&theme=normals&layers=01&node=gis&extent=-149.3:20.2:-60.1:69.6&custom=normals
cparkjan <- c(33.4,33.3,33.1,33,32.9,32.8,32.7,32.6,32.5... |
## Super-wet. Need to solve ggplot log-axis problem
## Or else use existing pipeline stuff (elkNames)
library(ggplot2)
# theme_set(theme_bw(text(size=rel(2))))
theme_set(
theme_bw(base_size=18)
## %+replace% theme(axis.text = element_text(size = rel(2.0)))
)
tstitle <- ifelse(is.null(gtitle), "Time series", gtitle)... | /elkplot.R | no_license | Bio3SS/Population_time_series | R | false | false | 1,135 | r | ## Super-wet. Need to solve ggplot log-axis problem
## Or else use existing pipeline stuff (elkNames)
library(ggplot2)
# theme_set(theme_bw(text(size=rel(2))))
theme_set(
theme_bw(base_size=18)
## %+replace% theme(axis.text = element_text(size = rel(2.0)))
)
tstitle <- ifelse(is.null(gtitle), "Time series", gtitle)... |
#this function takes in input the filtered list of bmd results and compute the intersection of the genes at different timepoints
venn_diagram_bmd_genes_across_time_point = function(bmd_list){
GL = list()
for(i in 1:length(bmd_list)){
BMD_tab <- bmd_list[[i]]$BMDValues_filtered
if(!is.null(BMD_tab) & nrow(BM... | /functions/bmdx_utilities.R | no_license | liuxch5/BMDx | R | false | false | 3,183 | r | #this function takes in input the filtered list of bmd results and compute the intersection of the genes at different timepoints
venn_diagram_bmd_genes_across_time_point = function(bmd_list){
GL = list()
for(i in 1:length(bmd_list)){
BMD_tab <- bmd_list[[i]]$BMDValues_filtered
if(!is.null(BMD_tab) & nrow(BM... |
# BioC 3.0
# Created 27 Jan 2014
# Updated 27 Jan 2014
# Perform filtering that should be optimal for DM
# Updated 13 May 2015
# Create dgeSQTL object
##############################################################################################################
setwd("/home/Shared/data/seq/GEUVADIS/")
library(Ge... | /analysis_geuvadis/DM_0.1.3_filtering.R | no_license | gosianow/multinomial_project | R | false | false | 10,145 | r | # BioC 3.0
# Created 27 Jan 2014
# Updated 27 Jan 2014
# Perform filtering that should be optimal for DM
# Updated 13 May 2015
# Create dgeSQTL object
##############################################################################################################
setwd("/home/Shared/data/seq/GEUVADIS/")
library(Ge... |
##' Face Tour GUI
##' Displays a Chernoff's Face Tour GUI
##'
##' This GUI allows users to control the faces tour by simply moving and clicking their mouses.
##' The Variable Selection checkboxes contains all the numeric variables, and at least three of them... | /tourrGui/R/gui_faces.r | no_license | ingted/R-Examples | R | false | false | 11,016 | r | ##' Face Tour GUI
##' Displays a Chernoff's Face Tour GUI
##'
##' This GUI allows users to control the faces tour by simply moving and clicking their mouses.
##' The Variable Selection checkboxes contains all the numeric variables, and at least three of them... |
# This example code estimates weights for individual patient data from a single
# arm study of 'intervention' based on aggregate baseline characteristics from
# the comparator trial
library(dplyr)
library(MAIC)
#### Prepare the data ----------------------------------------------------------
### Intervention data
... | /inst/examples/MAIC_example_weights.R | permissive | Roche/MAIC | R | false | false | 3,556 | r |
# This example code estimates weights for individual patient data from a single
# arm study of 'intervention' based on aggregate baseline characteristics from
# the comparator trial
library(dplyr)
library(MAIC)
#### Prepare the data ----------------------------------------------------------
### Intervention data
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{microsoft_max_100}
\alias{microsoft_max_100}
\title{100 Samples of Azure Public Dataset V1}
\format{
A data frame with 8000 rows and 100 columns.
}
\source{
\url{https://github.com/Azure/AzurePublicDataset/blob/mas... | /man/microsoft_max_100.Rd | no_license | carlonlv/DataCenterSim | R | false | true | 876 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{microsoft_max_100}
\alias{microsoft_max_100}
\title{100 Samples of Azure Public Dataset V1}
\format{
A data frame with 8000 rows and 100 columns.
}
\source{
\url{https://github.com/Azure/AzurePublicDataset/blob/mas... |
# Functions needed to process fconstr_pGMCM to then dump into an LGF file
# Get the 2-mers from the fits
get_h <- function(fits) {
mus <- purrr::map(fits, "mu") %>%
lapply(function(X)
replace(X, X > 0, 1)) %>%
lapply(function(X)
replace(X, X < 0,-1))
mus
}
# Find out wh... | /R/lemon_processors.R | permissive | esb5324/CLIMB-1 | R | false | false | 6,576 | r | # Functions needed to process fconstr_pGMCM to then dump into an LGF file
# Get the 2-mers from the fits
get_h <- function(fits) {
mus <- purrr::map(fits, "mu") %>%
lapply(function(X)
replace(X, X > 0, 1)) %>%
lapply(function(X)
replace(X, X < 0,-1))
mus
}
# Find out wh... |
# s.NBAYES.R
# ::rtemis::
# 2017 Efstathios D. Gennatas egenn.lambdamd.org
#' Naive Bayes Classifier [C]
#'
#' Train a Naive Bayes Classifier using \code{e1071::naiveBayes}
#'
#' @inheritParams s.GLM
#' @param laplace Float (>0): Laplace smoothing. Default = 0 (no smoothing)
#' @return \link{rtMod} object
#' @author E... | /R/s.NBAYES.R | no_license | zeta1999/rtemis | R | false | false | 3,919 | r | # s.NBAYES.R
# ::rtemis::
# 2017 Efstathios D. Gennatas egenn.lambdamd.org
#' Naive Bayes Classifier [C]
#'
#' Train a Naive Bayes Classifier using \code{e1071::naiveBayes}
#'
#' @inheritParams s.GLM
#' @param laplace Float (>0): Laplace smoothing. Default = 0 (no smoothing)
#' @return \link{rtMod} object
#' @author E... |
data <- read.csv("~/ExData_Plotting1/household_power_consumption.txt", sep=";"
, na.strings = "?"
,colClasses = c("character", "character", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric")
)
data$Date <- as.Date(data$Date, "%d/%m/%Y")
dataSelect <- data[(dat... | /Exploratory_Analysis/Week2_Assignment/Code/Plot3.R | no_license | prateeksarangi/DataScienceCoursera | R | false | false | 1,092 | r | data <- read.csv("~/ExData_Plotting1/household_power_consumption.txt", sep=";"
, na.strings = "?"
,colClasses = c("character", "character", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric", "numeric")
)
data$Date <- as.Date(data$Date, "%d/%m/%Y")
dataSelect <- data[(dat... |
library(rPraat)
### Name: it.legendreDemo
### Title: it.legendreDemo
### Aliases: it.legendreDemo
### ** Examples
## Not run:
##D it.legendreDemo()
## End(Not run)
| /data/genthat_extracted_code/rPraat/examples/it.legendreDemo.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 172 | r | library(rPraat)
### Name: it.legendreDemo
### Title: it.legendreDemo
### Aliases: it.legendreDemo
### ** Examples
## Not run:
##D it.legendreDemo()
## End(Not run)
|
#.libPaths(c('/home/mkosinski/R/x86_64-pc-linux-gnu-library/3.2', .libPaths()))
library(shiny)
library(shinydashboard)
library(leaflet)
library(DT)
library(dplyr)
library(ggmap)
library(stringi)
library(RSQLite)
conn <- dbConnect(dbDriver("SQLite"), "../dane/czas_dojazdu.db")
dane <- list()
dbGetQuery(conn, 'SELECT c... | /pl/app.R | no_license | mi2-warsaw/CzasDojazdu | R | false | false | 4,834 | r | #.libPaths(c('/home/mkosinski/R/x86_64-pc-linux-gnu-library/3.2', .libPaths()))
library(shiny)
library(shinydashboard)
library(leaflet)
library(DT)
library(dplyr)
library(ggmap)
library(stringi)
library(RSQLite)
conn <- dbConnect(dbDriver("SQLite"), "../dane/czas_dojazdu.db")
dane <- list()
dbGetQuery(conn, 'SELECT c... |
source('source_data.R')
batch_folder = "over_100"
solving_method = "lsoda"
all_good_pars <- get(load(file = paste0(getwd(), "/114_fits.Rdata")))
all_good_pars <- all_good_pars[[1]]
run_model_for_longer <- function(x) {
# cleaning up the parameters list such that each element only has a length of 1 (those pa... | /one_run_test.R | no_license | Geidelberg/cotonou_calibration | R | false | false | 1,623 | r | source('source_data.R')
batch_folder = "over_100"
solving_method = "lsoda"
all_good_pars <- get(load(file = paste0(getwd(), "/114_fits.Rdata")))
all_good_pars <- all_good_pars[[1]]
run_model_for_longer <- function(x) {
# cleaning up the parameters list such that each element only has a length of 1 (those pa... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_ooptics.R
\name{read_ooptics}
\alias{read_ooptics}
\title{Function to read reflectance spectra from the Ocean Optics machine (text format)}
\usage{
read_ooptics(filename = "./", plot = TRUE, indices = FALSE)
}
\arguments{
\item{filename}... | /man/read_ooptics.Rd | no_license | bmjesus/thejesus | R | false | true | 872 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/read_ooptics.R
\name{read_ooptics}
\alias{read_ooptics}
\title{Function to read reflectance spectra from the Ocean Optics machine (text format)}
\usage{
read_ooptics(filename = "./", plot = TRUE, indices = FALSE)
}
\arguments{
\item{filename}... |
library(DCL)
### Name: validating.incurred
### Title: Back-test: testing against the experience
### Aliases: validating.incurred
### Keywords: models
### ** Examples
data(NtriangleBDCL)
data(XtriangleBDCL)
data(ItriangleBDCL)
Ntriangle<-NtriangleBDCL
Xtriangle<-XtriangleBDCL
Itriangle<-ItriangleBDCL
## First compa... | /data/genthat_extracted_code/DCL/examples/validating.incurred.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 1,016 | r | library(DCL)
### Name: validating.incurred
### Title: Back-test: testing against the experience
### Aliases: validating.incurred
### Keywords: models
### ** Examples
data(NtriangleBDCL)
data(XtriangleBDCL)
data(ItriangleBDCL)
Ntriangle<-NtriangleBDCL
Xtriangle<-XtriangleBDCL
Itriangle<-ItriangleBDCL
## First compa... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cas_read_db_contents_data.R
\name{cas_read_db_contents_data}
\alias{cas_read_db_contents_data}
\title{Read contents data from local database}
\usage{
cas_read_db_contents_data(db_connection = NULL, db_folder = NULL, ...)
}
\arguments{
\item{d... | /man/cas_read_db_contents_data.Rd | permissive | giocomai/castarter | R | false | true | 593 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/cas_read_db_contents_data.R
\name{cas_read_db_contents_data}
\alias{cas_read_db_contents_data}
\title{Read contents data from local database}
\usage{
cas_read_db_contents_data(db_connection = NULL, db_folder = NULL, ...)
}
\arguments{
\item{d... |
#' @name adjacency_matrix
#' @title Creat adjacency matrix for all the operations in the context
#' @param ctx dlr_context object
#' @examples
#' library(aria)
#' ctx <- get_context()
#' register_ops(ctx, cars)
#' register_ops(ctx, data.frame)
#' x <- cpu_tensor(5, dims = 1)
#' y <- x ** 3
#' y <- (x ** 3) / 2
#' all.o... | /dlr/R/visualize.R | no_license | krzjoa/learning-R | R | false | false | 999 | r | #' @name adjacency_matrix
#' @title Creat adjacency matrix for all the operations in the context
#' @param ctx dlr_context object
#' @examples
#' library(aria)
#' ctx <- get_context()
#' register_ops(ctx, cars)
#' register_ops(ctx, data.frame)
#' x <- cpu_tensor(5, dims = 1)
#' y <- x ** 3
#' y <- (x ** 3) / 2
#' all.o... |
library(shiny)
library(shinythemes)
country_data <- read.delim("./data/language_pageviews_per_country.tsv", as.is = TRUE, header = TRUE)
shinyUI(fluidPage(
titlePanel(title = "", windowTitle = "Where in the world is Wikipedia?"),
h2("Where in the world is Wikipedia?"),
h4("Explore how traffic to Wikimedia projec... | /ui.R | permissive | wikimedia-research/WhereInTheWorldIsWikipedia | R | false | false | 3,408 | r | library(shiny)
library(shinythemes)
country_data <- read.delim("./data/language_pageviews_per_country.tsv", as.is = TRUE, header = TRUE)
shinyUI(fluidPage(
titlePanel(title = "", windowTitle = "Where in the world is Wikipedia?"),
h2("Where in the world is Wikipedia?"),
h4("Explore how traffic to Wikimedia projec... |
############################################################################/**
# @RdocDefault weightedQuantile
#
# @title "Weighted Quantile Value"
#
# @synopsis
#
# \description{
# Computes a weighted quantile of a numeric vector.
# }
#
# \arguments{
# \item{x}{a @numeric @vector containing the values whose weigh... | /R/weightedQuantile.R | no_license | flywind2/PSCBS | R | false | false | 3,594 | r | ############################################################################/**
# @RdocDefault weightedQuantile
#
# @title "Weighted Quantile Value"
#
# @synopsis
#
# \description{
# Computes a weighted quantile of a numeric vector.
# }
#
# \arguments{
# \item{x}{a @numeric @vector containing the values whose weigh... |
# PERSISTENCE FUNCTION 1 (TJORVE 2009)
model <- list(
name = c("Persistence function 1"),
formula = expression(S == c*A^z * exp(-d*A)),
exp = expression(c*A^z * exp(-d*A)),
mod = s~c*a^z * exp(-d*a),
shape = "convex",
asymp = function(pars)FALSE,
custStart = function(data)c(5,.25,.15),
#limits ... | /inst/non_lin_models/Mod_p1.R | no_license | Bhanditz/sars | R | false | false | 721 | r | # PERSISTENCE FUNCTION 1 (TJORVE 2009)
model <- list(
name = c("Persistence function 1"),
formula = expression(S == c*A^z * exp(-d*A)),
exp = expression(c*A^z * exp(-d*A)),
mod = s~c*a^z * exp(-d*a),
shape = "convex",
asymp = function(pars)FALSE,
custStart = function(data)c(5,.25,.15),
#limits ... |
## this script assumes that the data zip file for the assignment has already been
## downloaded into the working directory
colnames <- c("date","time","active","reactive","voltage","intensity","meter1","meter2","meter3")
colclasses <- c(rep("character",2),rep("numeric",7))
## read the whole dataset
elec <- read.csv2(... | /plot2.R | no_license | blackwood531/ExData_Plotting1 | R | false | false | 1,803 | r | ## this script assumes that the data zip file for the assignment has already been
## downloaded into the working directory
colnames <- c("date","time","active","reactive","voltage","intensity","meter1","meter2","meter3")
colclasses <- c(rep("character",2),rep("numeric",7))
## read the whole dataset
elec <- read.csv2(... |
## ----echo=FALSE, message=FALSE-------------------------------------------
knitr::opts_chunk$set(collapse = T, comment = NA)
library(WOODCARB3R)
## ------------------------------------------------------------------------
finalCarbonContribution()
## -------------------------------------------------------------------... | /vignettes/WOODCARB3Rguide.R | no_license | marlandes/WOODCARB3R | R | false | false | 1,433 | r | ## ----echo=FALSE, message=FALSE-------------------------------------------
knitr::opts_chunk$set(collapse = T, comment = NA)
library(WOODCARB3R)
## ------------------------------------------------------------------------
finalCarbonContribution()
## -------------------------------------------------------------------... |
# From Introduction to R --------------------------------------------------------------------------------
#testing git commit
#subsetting
x <- c(NA,1:20)
x[1:10]
x[is.na(x)]
y <- x[!is.na(x)]
y
y[y>4]
y[y>0]
x[x.0]
x[x>0]
x[!is.na(x) & x > 0]
x[c(3, 5, 7)]
x[0]
x[3000]
x[c(-2, -10)]
x[-c(2, 10)]
#plots
swirl()
swirl(... | /Swirl lesson - Unit 1 Introduction.R | no_license | NickAnderson94/Swirl | R | false | false | 1,239 | r | # From Introduction to R --------------------------------------------------------------------------------
#testing git commit
#subsetting
x <- c(NA,1:20)
x[1:10]
x[is.na(x)]
y <- x[!is.na(x)]
y
y[y>4]
y[y>0]
x[x.0]
x[x>0]
x[!is.na(x) & x > 0]
x[c(3, 5, 7)]
x[0]
x[3000]
x[c(-2, -10)]
x[-c(2, 10)]
#plots
swirl()
swirl(... |
rm(list = ls())
library(ggplot2)
library(stringr)
library(ggthemes)
library(rjson)
# moon phases
library(suncalc)
# change code below based on your settings
files_path_root <- paste("YOUR PATH HERE", sep = "")
source(paste(files_path_root, "multiplot.R", sep = ""))
# function to compute moving average
mav <- functio... | /script_moonphase.R | permissive | marcoalt/moon-cycle-and-sleep | R | false | false | 3,784 | r | rm(list = ls())
library(ggplot2)
library(stringr)
library(ggthemes)
library(rjson)
# moon phases
library(suncalc)
# change code below based on your settings
files_path_root <- paste("YOUR PATH HERE", sep = "")
source(paste(files_path_root, "multiplot.R", sep = ""))
# function to compute moving average
mav <- functio... |
\name{write.partitioned.nex}
\Rdversion{1.1}
\alias{write.partitioned.nex}
\title{Write partitioned and commented NEXUS files}
\description{
This function takes one or more objects of class \code{"DNAbin"} and writes them to an interleaved NEXUS file.
}
\usage{
write.partitioned.nex(..., file, labels)
}
\arguments{... | /man/write.partitioned.nex.Rd | no_license | LunaSare/phyloch | R | false | false | 1,045 | rd | \name{write.partitioned.nex}
\Rdversion{1.1}
\alias{write.partitioned.nex}
\title{Write partitioned and commented NEXUS files}
\description{
This function takes one or more objects of class \code{"DNAbin"} and writes them to an interleaved NEXUS file.
}
\usage{
write.partitioned.nex(..., file, labels)
}
\arguments{... |
source("PlotterFunctions.R")
source("GlobalParameters.R")
load("../../Outputs/BaseSpread.RData")
# Plot the trade-off in a final population
plotTradeOff(runList=spreadReps[[1]],
parList=parameters,
file="../../Figures/TradeOff.pdf")
# Plot of a single realisation of spread.
#plotRealisation(runList=sp... | /Code/R/Plots.R | no_license | benflips/GBB | R | false | false | 1,227 | r | source("PlotterFunctions.R")
source("GlobalParameters.R")
load("../../Outputs/BaseSpread.RData")
# Plot the trade-off in a final population
plotTradeOff(runList=spreadReps[[1]],
parList=parameters,
file="../../Figures/TradeOff.pdf")
# Plot of a single realisation of spread.
#plotRealisation(runList=sp... |
library(dplyr)
##grabbing train dataset
subs_in_train <- read.table("train/subject_train.txt", header = FALSE, sep = "")
x_in_train <- read.table("train/X_train.txt", header = FALSE, sep = "")
y_in_train <- read.table("train/y_train.txt", header = FALSE, sep = "")
##merging traning dataset by columns
train_dataset <-... | /run_analysis.R | no_license | SaNDy4ortyFivE/GNCD-week4-JHU | R | false | false | 3,640 | r | library(dplyr)
##grabbing train dataset
subs_in_train <- read.table("train/subject_train.txt", header = FALSE, sep = "")
x_in_train <- read.table("train/X_train.txt", header = FALSE, sep = "")
y_in_train <- read.table("train/y_train.txt", header = FALSE, sep = "")
##merging traning dataset by columns
train_dataset <-... |
context("Run Task")
client <- OPTaaSClient$new(OPTAAS_URL, OPTAAS_API_KEY)
title <- "Dummy task"
bool_param <- BoolParameter('my_bool', id='x')
cat_param <- CategoricalParameter('my_cat', values=list('a', 'b', 'c'), default='c', id='y')
int_param <- IntParameter('my_int', minimum=0, maximum=20)
optional_int_param <... | /tests/testthat/test_run_task.R | permissive | MindFoundry/optaas-r-client | R | false | false | 3,852 | r | context("Run Task")
client <- OPTaaSClient$new(OPTAAS_URL, OPTAAS_API_KEY)
title <- "Dummy task"
bool_param <- BoolParameter('my_bool', id='x')
cat_param <- CategoricalParameter('my_cat', values=list('a', 'b', 'c'), default='c', id='y')
int_param <- IntParameter('my_int', minimum=0, maximum=20)
optional_int_param <... |
# Download and unzip the file
#############################
my_path <- getwd()
remote_url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip"
downloaded_zip_file = "nei.zip"
download.file(remote_url, file.path(my_path, downloaded_zip_file))
unzip(zipfile = downloaded_zip_file)
# Read th... | /plot13.R | no_license | joysn/R-Programs | R | false | false | 1,181 | r | # Download and unzip the file
#############################
my_path <- getwd()
remote_url <- "https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2FNEI_data.zip"
downloaded_zip_file = "nei.zip"
download.file(remote_url, file.path(my_path, downloaded_zip_file))
unzip(zipfile = downloaded_zip_file)
# Read th... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/csd_estimate.R
\name{csd_estimate}
\alias{csd_estimate}
\title{csd_estimate: Estimate the connectivity suitability and dispersal plot}
\usage{
csd_estimate(model, dispersal_steps = c(2, 4, 8, 16, 32, 64))
}
\arguments{
\item{model}{A raster m... | /man/csd_estimate.Rd | no_license | juvelas/bam | R | false | true | 954 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/csd_estimate.R
\name{csd_estimate}
\alias{csd_estimate}
\title{csd_estimate: Estimate the connectivity suitability and dispersal plot}
\usage{
csd_estimate(model, dispersal_steps = c(2, 4, 8, 16, 32, 64))
}
\arguments{
\item{model}{A raster m... |
library(nycflights13)
library(tidyverse)
library(modelr)
library(glmnetUtils)
fitfun=function(dF){
cv.glmnet(arr_delay~distance+air_time+dep_time,data=dF)
}
gnetr2=function(model,datavals){
yvar=all.vars(formula(model)[[2]])
# print(paste('y variable:',yvar))
# print('observations')
# print(str(as.data.frame... | /scripts/test.R | no_license | dschneiderch/aso_regression_project | R | false | false | 3,077 | r | library(nycflights13)
library(tidyverse)
library(modelr)
library(glmnetUtils)
fitfun=function(dF){
cv.glmnet(arr_delay~distance+air_time+dep_time,data=dF)
}
gnetr2=function(model,datavals){
yvar=all.vars(formula(model)[[2]])
# print(paste('y variable:',yvar))
# print('observations')
# print(str(as.data.frame... |
#' @title my_lowess
#' @description high frequency lowess filtering
#' @param timeS a time series
#' @param span the number of periods to span
#' @return the filtered time series
#' @examples
#' # hc4<- my_lowess(hc4.ts, span= 13)
my_lowess <- function(timeS, span=5){
f<- span/length(timeS)
m1 <- as.numeric(time... | /R/my_lowess.R | no_license | MrOoijer/myLib | R | false | false | 377 | r |
#' @title my_lowess
#' @description high frequency lowess filtering
#' @param timeS a time series
#' @param span the number of periods to span
#' @return the filtered time series
#' @examples
#' # hc4<- my_lowess(hc4.ts, span= 13)
my_lowess <- function(timeS, span=5){
f<- span/length(timeS)
m1 <- as.numeric(time... |
# new tests on top
context('Preprocessing: autoscale')
data(simdata)
# normal spectra
X1 = simdata$spectra.c
p11 = prep.autoscale(X1)
p12 = prep.autoscale(X1, center = T, scale = F)
p13 = prep.autoscale(X1, center = T, scale = T)
# spectra with constant and small variation variables
X2 = simdata$spectra.c
X2[, 20:5... | /tests/testthat/test_prep.R | no_license | nurashikin/mdatools | R | false | false | 2,024 | r | # new tests on top
context('Preprocessing: autoscale')
data(simdata)
# normal spectra
X1 = simdata$spectra.c
p11 = prep.autoscale(X1)
p12 = prep.autoscale(X1, center = T, scale = F)
p13 = prep.autoscale(X1, center = T, scale = T)
# spectra with constant and small variation variables
X2 = simdata$spectra.c
X2[, 20:5... |
# Predict Class via Support Vector Machine --------------------------------
#
# Set working directory.
#setwd("~")
# Set seed value.
set.seed(1)
# Load libraries. ----------------------------------------------------------
source("auxiliary.R")
source("algorithms/SupportVectorMachine.R")
# Load *.fasta dataset. -------... | /scripts/classifier/predict_class_svm.R | permissive | jakubhorvath/Kojima_et_al_2021_PNAS | R | false | false | 2,679 | r | # Predict Class via Support Vector Machine --------------------------------
#
# Set working directory.
#setwd("~")
# Set seed value.
set.seed(1)
# Load libraries. ----------------------------------------------------------
source("auxiliary.R")
source("algorithms/SupportVectorMachine.R")
# Load *.fasta dataset. -------... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generics.R
\name{expression-parts}
\alias{expression-parts}
\alias{variables}
\alias{parameters}
\alias{constants}
\alias{atoms}
\title{Parts of an Expression Leaf}
\usage{
variables(object)
parameters(object)
constants(object)
atoms(objec... | /CVXR/man/expression-parts.Rd | no_license | akhikolla/TestedPackages-NoIssues | R | false | true | 925 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/generics.R
\name{expression-parts}
\alias{expression-parts}
\alias{variables}
\alias{parameters}
\alias{constants}
\alias{atoms}
\title{Parts of an Expression Leaf}
\usage{
variables(object)
parameters(object)
constants(object)
atoms(objec... |
library(shiny)
library(datasets)
# We tweak the "am" field to have nicer factor labels. Since
# this doesn't rely on any user inputs we can do this once at
# startup and then use the value throughout the lifetime of the
# application
mpgData <- mtcars
mpgData$am <- factor(mpgData$am, labels = c("Automatic", "Manual"))... | /RShiny/ShinyTutorial/lesson1/examples/04_mpg/server.R | no_license | statisticallyfit/R | R | false | false | 993 | r | library(shiny)
library(datasets)
# We tweak the "am" field to have nicer factor labels. Since
# this doesn't rely on any user inputs we can do this once at
# startup and then use the value throughout the lifetime of the
# application
mpgData <- mtcars
mpgData$am <- factor(mpgData$am, labels = c("Automatic", "Manual"))... |
#The following code was used to create the graph in plot1.png
#For this script to work the zip file that contains the dataset must be present in the working directoty
#The zip file can be downloaded from https://github.com/rdpeng/ExData_Plotting1 and is in the README.md file
#on this page
unzip("exdata_data_househol... | /figure/plot1.R | no_license | darton5/ExData_Plotting1 | R | false | false | 893 | r | #The following code was used to create the graph in plot1.png
#For this script to work the zip file that contains the dataset must be present in the working directoty
#The zip file can be downloaded from https://github.com/rdpeng/ExData_Plotting1 and is in the README.md file
#on this page
unzip("exdata_data_househol... |
#!/usr/bin/env Rscript
suppressPackageStartupMessages(library("optparse"))
suppressPackageStartupMessages(library("hciR"))
opts <- list(
make_option(c("-d", "--directory"), default="NA",
help="Directory with featuerCounts output files"),
make_option(c("-p", "--pattern"), default="counts$",
help="Pa... | /bin/read_featureCounts.R | no_license | HuntsmanCancerInstitute/hciRscripts | R | false | false | 858 | r | #!/usr/bin/env Rscript
suppressPackageStartupMessages(library("optparse"))
suppressPackageStartupMessages(library("hciR"))
opts <- list(
make_option(c("-d", "--directory"), default="NA",
help="Directory with featuerCounts output files"),
make_option(c("-p", "--pattern"), default="counts$",
help="Pa... |
# Aim: generate data for set viz
# Data generation
set.seed(2017)
x = runif(n = 20, min = 0, max = 1)
y = runif(n = 20, min = 0, max = 1)
red = runif(n = 20, min = 0, max = 1) > 0.5
blue = runif(n = 20, min = 0, max = 1) > 0.2
yellow = runif(n = 20, min = 0, max = 1) > 0.1
p = data.frame(x, y, red, blue, yellow)
# Co... | /B_analysts_sources_github/Robinlovelace/spatialSetViz/data-gen.R | no_license | Irbis3/crantasticScrapper | R | false | false | 1,050 | r | # Aim: generate data for set viz
# Data generation
set.seed(2017)
x = runif(n = 20, min = 0, max = 1)
y = runif(n = 20, min = 0, max = 1)
red = runif(n = 20, min = 0, max = 1) > 0.5
blue = runif(n = 20, min = 0, max = 1) > 0.2
yellow = runif(n = 20, min = 0, max = 1) > 0.1
p = data.frame(x, y, red, blue, yellow)
# Co... |
#' Constructors for `ml_model` Objects
#'
#' Functions for developers writing extensions for Spark ML. These functions are constructors
#' for `ml_model` objects that are returned when using the formula interface.
#'
#' @name ml-model-constructors
#'
#' @param pipeline_model The pipeline model object returned by `ml_... | /R/ml_model_constructors.R | permissive | sparklyr/sparklyr | R | false | false | 5,480 | r | #' Constructors for `ml_model` Objects
#'
#' Functions for developers writing extensions for Spark ML. These functions are constructors
#' for `ml_model` objects that are returned when using the formula interface.
#'
#' @name ml-model-constructors
#'
#' @param pipeline_model The pipeline model object returned by `ml_... |
#!/usr/bin/env Rscript
suppressPackageStartupMessages(library(optparse))
options_list<-list(
make_option(c("--input","-i"),help="Input path"),
make_option(c("--output","-o"),help="ouput full path name, directories and files will be created here"),
make_option(c("--zipfile","-z"),help="zipfile containing .CDFs")... | /scripts/runRamid.R | permissive | phnmnl/container-ramid | R | false | false | 695 | r | #!/usr/bin/env Rscript
suppressPackageStartupMessages(library(optparse))
options_list<-list(
make_option(c("--input","-i"),help="Input path"),
make_option(c("--output","-o"),help="ouput full path name, directories and files will be created here"),
make_option(c("--zipfile","-z"),help="zipfile containing .CDFs")... |
score_RandomForest <- function(T, X, trainid, testid,
...){
T <- clean_format_treat(T)
if (class(X) == c("numeric")){
X <- as.matrix(X)
}
if (is.logical(trainid)){
trainid <- which(trainid)
}
Xtrain <- X[trainid, , drop = FALSE]
Ttrain <- as.fa... | /R/score-RandomForest.R | permissive | lihualei71/ovalue | R | false | false | 784 | r | score_RandomForest <- function(T, X, trainid, testid,
...){
T <- clean_format_treat(T)
if (class(X) == c("numeric")){
X <- as.matrix(X)
}
if (is.logical(trainid)){
trainid <- which(trainid)
}
Xtrain <- X[trainid, , drop = FALSE]
Ttrain <- as.fa... |
### Terrence D. Jorgensen
### Last updated: 14 January 2021
### permutation randomization test for measurement equivalence and DIF
## -----------------
## Class and Methods
## -----------------
##' Class for the Results of Permutation Randomization Tests of Measurement
##' Equivalence and DIF
##'
##' This class cont... | /semTools/R/permuteMeasEq.R | no_license | memazouni/semTools | R | false | false | 73,468 | r | ### Terrence D. Jorgensen
### Last updated: 14 January 2021
### permutation randomization test for measurement equivalence and DIF
## -----------------
## Class and Methods
## -----------------
##' Class for the Results of Permutation Randomization Tests of Measurement
##' Equivalence and DIF
##'
##' This class cont... |
# This script is for modeling tax revenue of stylized governments
#**********************************************************************
# Packages ####
#**********************************************************************
library(plyr)
library(tidyverse)
l... | /Model_pensionRisk.R | no_license | mconsidine/PenSimMacro_Data | R | false | false | 33,294 | r | # This script is for modeling tax revenue of stylized governments
#**********************************************************************
# Packages ####
#**********************************************************************
library(plyr)
library(tidyverse)
l... |
# """ Does age predict income? """
# Importing the dataset
dataset = read.csv('Social_Network_Ads.csv')
dataset = dataset[3:5]
# Encoding the target feature as factor
dataset$Purchased = factor(dataset$Purchased, levels = c(0, 1))
# Splitting the dataset into the Training set and Test set
# install.packages('caTools... | /Part 3 - Classification/Section 19 - Decision Tree Classification/decision_tree.R | no_license | Kostevski/ML-scripts | R | false | false | 2,427 | r | # """ Does age predict income? """
# Importing the dataset
dataset = read.csv('Social_Network_Ads.csv')
dataset = dataset[3:5]
# Encoding the target feature as factor
dataset$Purchased = factor(dataset$Purchased, levels = c(0, 1))
# Splitting the dataset into the Training set and Test set
# install.packages('caTools... |
#' @title Read FARS file
#' @description
#' \code{fars_read} Returns a data frame from a file.
#' @param filename character vector of the name of a .csv file to load
#' @return Data frame containing the contents of the file named in \code{filename}
#' @details
#' This function calls read_csv from the readr library to r... | /R/fars_functions.R | no_license | burch-cm/farsdata | R | false | false | 5,178 | r | #' @title Read FARS file
#' @description
#' \code{fars_read} Returns a data frame from a file.
#' @param filename character vector of the name of a .csv file to load
#' @return Data frame containing the contents of the file named in \code{filename}
#' @details
#' This function calls read_csv from the readr library to r... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AAAMapclass.R
\docType{class}
\name{EarthEngineMap-class}
\alias{EarthEngineMap-class}
\title{Class EarthEngineMap}
\description{
Class EarthEngineMap
}
\section{Slots}{
\describe{
\item{\code{object}}{the spatial object}
\item{\code{map}}{... | /man/EarthEngineMap-class.Rd | permissive | westamine/rgee | R | false | true | 348 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/AAAMapclass.R
\docType{class}
\name{EarthEngineMap-class}
\alias{EarthEngineMap-class}
\title{Class EarthEngineMap}
\description{
Class EarthEngineMap
}
\section{Slots}{
\describe{
\item{\code{object}}{the spatial object}
\item{\code{map}}{... |
library(shiny)
#library(shinyjs)
#library(logging)
library(leaflet)
library(lubridate)
data(state)
old_storms <- read.csv("result2010.txt",strip.white=TRUE,fill=TRUE,nrow=-1)
col_names <- c("BGN_DATE","STATE","EVTYPE","FATALITIES","LATITUDE","LONGITUDE" )
colnames(old_storms) <- col_names
old_storms$Date <- as.Date(s... | /server.R | no_license | maddalir/FinalProject | R | false | false | 7,030 | r | library(shiny)
#library(shinyjs)
#library(logging)
library(leaflet)
library(lubridate)
data(state)
old_storms <- read.csv("result2010.txt",strip.white=TRUE,fill=TRUE,nrow=-1)
col_names <- c("BGN_DATE","STATE","EVTYPE","FATALITIES","LATITUDE","LONGITUDE" )
colnames(old_storms) <- col_names
old_storms$Date <- as.Date(s... |
# Getting-and-Cleaning-Data-course-project
library(dplyr)
# First Step
# To Merge the training and test sets to create one data set.
######
x_train <- read.table("train/X_train.txt")
y_train <- read.table("train/y_train.txt")
subject_train <- read.table("train/subject_train.txt")
x_test <- read.table("test/X_test.tx... | /run_analysis.R | no_license | RohitDixit188/Getting-and-Cleaning-Data-course-project | R | false | false | 1,877 | r | # Getting-and-Cleaning-Data-course-project
library(dplyr)
# First Step
# To Merge the training and test sets to create one data set.
######
x_train <- read.table("train/X_train.txt")
y_train <- read.table("train/y_train.txt")
subject_train <- read.table("train/subject_train.txt")
x_test <- read.table("test/X_test.tx... |
make_column <- function(df, ctype, ..., nr, guess_max = min(1000, nr)) {
## must resolve COL_GUESS here (vs when parsing) because need to know ctype
## here, when making the column
ctype <- resolve_col_type(df$cell[df$row <= guess_max], ctype)
parsed <- parse(df$cell, ctype, ...)
if (is.null(parsed)) {
re... | /R/make_column.R | permissive | Hisbald/googlesheets4 | R | false | false | 4,616 | r | make_column <- function(df, ctype, ..., nr, guess_max = min(1000, nr)) {
## must resolve COL_GUESS here (vs when parsing) because need to know ctype
## here, when making the column
ctype <- resolve_col_type(df$cell[df$row <= guess_max], ctype)
parsed <- parse(df$cell, ctype, ...)
if (is.null(parsed)) {
re... |
## Build prediction interval for regression data
### Poisson model (has "i" for overdisp)
### community data
buidCIs_regrxn_pois_comm <- function(mod, mod.type = "poisson"){
#new data
if(mod.type == "poisson"){
newdat <- expand.grid(
i = mod@frame$i[1]
,site = unique(mod@frame$site)[1]
,year =... | /R/build_CIs_regrxn_pois_comm.R | no_license | brouwern/DRmencia | R | false | false | 1,075 | r | ## Build prediction interval for regression data
### Poisson model (has "i" for overdisp)
### community data
buidCIs_regrxn_pois_comm <- function(mod, mod.type = "poisson"){
#new data
if(mod.type == "poisson"){
newdat <- expand.grid(
i = mod@frame$i[1]
,site = unique(mod@frame$site)[1]
,year =... |
#read table
powerConsumption <- read.table(file = "household_power_consumption.txt",sep = ";",header=TRUE,na.strings="?")
#format Date
powerConsumption$Date <- as.Date(powerConsumption$Date,"%d/%m/%Y")
#subset of data for dates 2007-02-01 & 2007-02-02
powerConsumptionSubset <- subset(powerConsumption,powerConsumption$D... | /plot2.R | no_license | shubham-pathak22/ExData_Plotting1 | R | false | false | 814 | r | #read table
powerConsumption <- read.table(file = "household_power_consumption.txt",sep = ";",header=TRUE,na.strings="?")
#format Date
powerConsumption$Date <- as.Date(powerConsumption$Date,"%d/%m/%Y")
#subset of data for dates 2007-02-01 & 2007-02-02
powerConsumptionSubset <- subset(powerConsumption,powerConsumption$D... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tools.R
\name{shift}
\alias{shift}
\title{function that shifts vector values to right or left}
\usage{
shift(x, n = 0, default = NA, invert = FALSE)
}
\arguments{
\item{x}{Vector for which to shift values}
\item{n}{Number of place... | /man/shift.Rd | permissive | petermeissner/diffrprojects | R | false | true | 744 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/tools.R
\name{shift}
\alias{shift}
\title{function that shifts vector values to right or left}
\usage{
shift(x, n = 0, default = NA, invert = FALSE)
}
\arguments{
\item{x}{Vector for which to shift values}
\item{n}{Number of place... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.