content large_stringlengths 0 6.46M | path large_stringlengths 3 331 | license_type large_stringclasses 2
values | repo_name large_stringlengths 5 125 | language large_stringclasses 1
value | is_vendor bool 2
classes | is_generated bool 2
classes | length_bytes int64 4 6.46M | extension large_stringclasses 75
values | text stringlengths 0 6.46M |
|---|---|---|---|---|---|---|---|---|---|
\name{crSpanTest}
\alias{crSpanTest}
\title{Test of Span Parameter in linearity for Component + Residual Plots}
\description{This function performs \code{crTest} for a user-defined range of span parameters, optionally allowing for multiple testing corrections in the p-values. }
\usage{
crSpanTest(model, spfromto, n=10,... | /man/crSpanTest.Rd | no_license | TotallyBullshit/damisc | R | false | false | 1,858 | rd | \name{crSpanTest}
\alias{crSpanTest}
\title{Test of Span Parameter in linearity for Component + Residual Plots}
\description{This function performs \code{crTest} for a user-defined range of span parameters, optionally allowing for multiple testing corrections in the p-values. }
\usage{
crSpanTest(model, spfromto, n=10,... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/combine.R
\docType{methods}
\name{SCE-combine}
\alias{SCE-combine}
\alias{cbind,SingleCellExperiment-method}
\alias{rbind,SingleCellExperiment-method}
\alias{[,SingleCellExperiment,ANY-method}
\alias{[,SingleCellExperiment,ANY,ANY-method}
\al... | /man/combine.Rd | no_license | RagnarDanneskjold/SingleCellExperiment | R | false | true | 4,512 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/combine.R
\docType{methods}
\name{SCE-combine}
\alias{SCE-combine}
\alias{cbind,SingleCellExperiment-method}
\alias{rbind,SingleCellExperiment-method}
\alias{[,SingleCellExperiment,ANY-method}
\alias{[,SingleCellExperiment,ANY,ANY-method}
\al... |
#Analysis of quine data
#Author: Sophie King
#Date: 30/12/2016
#Aim: To do a work up of the quine data available in the MASS package in R. This is a bit of overkill given the size of the data, but this is mainly an example of some of my work.
#The data was worked up in Example 4.6 in
# Aitkin, Murray. “The Analysis of ... | /Example regression.r | no_license | S0phie/Playground | R | false | false | 13,188 | r | #Analysis of quine data
#Author: Sophie King
#Date: 30/12/2016
#Aim: To do a work up of the quine data available in the MASS package in R. This is a bit of overkill given the size of the data, but this is mainly an example of some of my work.
#The data was worked up in Example 4.6 in
# Aitkin, Murray. “The Analysis of ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/facet_graph.R
\name{facet_graph}
\alias{facet_graph}
\title{Create a grid of small multiples by node and/or edge attributes}
\usage{
facet_graph(facets, row_type = "edge", col_type = "node", margins = FALSE,
scales = "fixed", space = "fixed... | /man/facet_graph.Rd | permissive | mailund/ggraph | R | false | true | 4,582 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/facet_graph.R
\name{facet_graph}
\alias{facet_graph}
\title{Create a grid of small multiples by node and/or edge attributes}
\usage{
facet_graph(facets, row_type = "edge", col_type = "node", margins = FALSE,
scales = "fixed", space = "fixed... |
library(ape)
testtree <- read.tree("7478_1.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="7478_1_unrooted.txt") | /codeml_files/newick_trees_processed/7478_1/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 135 | r | library(ape)
testtree <- read.tree("7478_1.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="7478_1_unrooted.txt") |
dummyCNOlist <- function(stimuli = NULL, inhibitors = NULL, maxStim = 0, maxInhibit = 0, signals = NULL) {
if (is.null(signals)) {
signals <- c(stimuli, inhibitors)
}
stimn <- length(stimuli)
inhibn <- length(inhibitors)
## do the stim design:
if (maxStim > stimn) {
maxStim <- stimn
}
if (stimn ... | /R/method/dummyCNOlist.R | no_license | bitmask/B-NEM | R | false | false | 7,565 | r | dummyCNOlist <- function(stimuli = NULL, inhibitors = NULL, maxStim = 0, maxInhibit = 0, signals = NULL) {
if (is.null(signals)) {
signals <- c(stimuli, inhibitors)
}
stimn <- length(stimuli)
inhibn <- length(inhibitors)
## do the stim design:
if (maxStim > stimn) {
maxStim <- stimn
}
if (stimn ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/summary.flexsurvmix.R
\name{p_flexsurvmix}
\alias{p_flexsurvmix}
\title{Transition probabilities from a flexsurvmix model}
\usage{
p_flexsurvmix(x, newdata = NULL, startname = "start", t = 1, B = NULL)
}
\arguments{
\item{x}{Fitted m... | /man/p_flexsurvmix.Rd | no_license | cran/flexsurv | R | false | true | 1,806 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/summary.flexsurvmix.R
\name{p_flexsurvmix}
\alias{p_flexsurvmix}
\title{Transition probabilities from a flexsurvmix model}
\usage{
p_flexsurvmix(x, newdata = NULL, startname = "start", t = 1, B = NULL)
}
\arguments{
\item{x}{Fitted m... |
unscaleDesign <- function(design, min=NULL, max=NULL, uniformize=FALSE, InitialDesign=NULL){
d <- dim(design)[[2]] ; n <- dim(design)[[1]]
if (uniformize & !is.null(InitialDesign)){ # Inverse Rosenblatt transformation from U[0,1]^d
for (i in 1:d) x[,i] <- quantile(InitialDesign[,i],design[,i])
}else x <- ... | /R/unscaleDesign.R | no_license | cran/DiceDesign | R | false | false | 490 | r |
unscaleDesign <- function(design, min=NULL, max=NULL, uniformize=FALSE, InitialDesign=NULL){
d <- dim(design)[[2]] ; n <- dim(design)[[1]]
if (uniformize & !is.null(InitialDesign)){ # Inverse Rosenblatt transformation from U[0,1]^d
for (i in 1:d) x[,i] <- quantile(InitialDesign[,i],design[,i])
}else x <- ... |
# Library required
library(tm)
library(SnowballC)
library(caTools)
library(randomForest)
dataset = read.delim('Bank_Reviews.tsv', quote = '', stringsAsFactors = FALSE)
# Clearing the data
Corpus = VCorpus(VectorSource(dataset$Review))
Corpus = tm_map(Corpus, content_transformer(tolower))
Corpus = tm_map(corpus, removeP... | /npl.R | no_license | anshika1707/Predictive-Analysis-of-Bank-reviews- | R | false | false | 1,091 | r | # Library required
library(tm)
library(SnowballC)
library(caTools)
library(randomForest)
dataset = read.delim('Bank_Reviews.tsv', quote = '', stringsAsFactors = FALSE)
# Clearing the data
Corpus = VCorpus(VectorSource(dataset$Review))
Corpus = tm_map(Corpus, content_transformer(tolower))
Corpus = tm_map(corpus, removeP... |
require("sp")
require("rgdal")
require("rgeos")
setwd("/Users/tilmangraff/Documents/GitHub/TJ")
colors = c("#0098D4", "#E32017", "#FFD300", "#00782A", "#00A4A7", "#F3A9BB", "#A0A5A9", "#9B0056")
hex = readOGR("./input/temp/testenvironment/test.shp")
adj = gTouches(hex, byid=TRUE)
n = length(hex)
# find some random... | /code/0.environment/plot_routes.R | no_license | TilmanGraff/TJ | R | false | false | 2,514 | r | require("sp")
require("rgdal")
require("rgeos")
setwd("/Users/tilmangraff/Documents/GitHub/TJ")
colors = c("#0098D4", "#E32017", "#FFD300", "#00782A", "#00A4A7", "#F3A9BB", "#A0A5A9", "#9B0056")
hex = readOGR("./input/temp/testenvironment/test.shp")
adj = gTouches(hex, byid=TRUE)
n = length(hex)
# find some random... |
# Author: Davit Sargsyan
# Created: 08/02/2013
require(rgl)
#DATA----
nX1 <- 3
nX2 <- 3
xx1 <- (1:nX1)
xx2 <- (1:nX2)
nRpl <- 10
x1 <- as.factor(rep(LETTERS[xx1], nX2 * nRpl))
x2 <- as.factor(rep(letters[xx2], each = nX1 * nRpl))
x1
x2
y <- rnorm(nX1 * nX2 * nRpl)
y
# Plot boxplots
bp <- boxplot(y ~ x1 + x2, col = r... | /source/CylinderAndWhiskersPlot.R | no_license | SpyrosSpiliopoulos/snippets | R | false | false | 2,183 | r | # Author: Davit Sargsyan
# Created: 08/02/2013
require(rgl)
#DATA----
nX1 <- 3
nX2 <- 3
xx1 <- (1:nX1)
xx2 <- (1:nX2)
nRpl <- 10
x1 <- as.factor(rep(LETTERS[xx1], nX2 * nRpl))
x2 <- as.factor(rep(letters[xx2], each = nX1 * nRpl))
x1
x2
y <- rnorm(nX1 * nX2 * nRpl)
y
# Plot boxplots
bp <- boxplot(y ~ x1 + x2, col = r... |
##
##
## MVNexample.r
##
## Introduction to the Multivariate Normal distribution
##
## 1. Preliminaries (install R package if needed)
## 2. Bivariate Normal Distribution
## 3. Groups of correlated observations
## 4. Correlation based on proximity (Moving Average in Time Series)
## 5. Correlation based on proximity (... | /Regression_Analysis_and_Modeling/Week 3/R examples/MVNexample.r | no_license | amalag-19/Applied_Coursework | R | false | false | 3,898 | r | ##
##
## MVNexample.r
##
## Introduction to the Multivariate Normal distribution
##
## 1. Preliminaries (install R package if needed)
## 2. Bivariate Normal Distribution
## 3. Groups of correlated observations
## 4. Correlation based on proximity (Moving Average in Time Series)
## 5. Correlation based on proximity (... |
library(deSolve)
parameters<-c(r=1.15,alpha=.01,q=.4)
state<-c(N=500,P=20)
lvmodel<-function(t,state,parameters){
with(as.list(c(state,parameters)),{
#rate of change
dN<-(r*N)-(alpha*N*P)
dP<-(alpha*N*P)-(q*P)
list(c(dN,dP))
})
}
times<-seq(0,100,by=1)
out<-ode(y=state,times=times,func=lvmodel,parms=paramet... | /Assignment-4 (copy 1)/PredPreyRexample.R | no_license | t4ls/CS3500 | R | false | false | 443 | r | library(deSolve)
parameters<-c(r=1.15,alpha=.01,q=.4)
state<-c(N=500,P=20)
lvmodel<-function(t,state,parameters){
with(as.list(c(state,parameters)),{
#rate of change
dN<-(r*N)-(alpha*N*P)
dP<-(alpha*N*P)-(q*P)
list(c(dN,dP))
})
}
times<-seq(0,100,by=1)
out<-ode(y=state,times=times,func=lvmodel,parms=paramet... |
#' @export
#' @name ModelResponse
#' @title Linear Model Response
#' @description R6 object containing all necessary information of a linear model object
#' @section Usage:
#' \preformatted{
#' radon_model <- lm(Uppm ~ typebldg + basement + dupflag, data = radon_mn)
#' result <- extract_model(radon_model)
#' result$as... | /R/lm.R | no_license | d3m-purdue/d3mLm | R | false | false | 10,475 | r |
#' @export
#' @name ModelResponse
#' @title Linear Model Response
#' @description R6 object containing all necessary information of a linear model object
#' @section Usage:
#' \preformatted{
#' radon_model <- lm(Uppm ~ typebldg + basement + dupflag, data = radon_mn)
#' result <- extract_model(radon_model)
#' result$as... |
setwd("D:/DataScience/DataScienceCourse/Exxploratory Data Analysis/week 1 Assignment")
dataset <- read.table("household_power_consumption.txt",skip=1,sep=";")
names(dataset) <- c("Date","Time","Global_active_power","Global_reactive_power","Voltage","Global_intensity","Sub_metering_1","Sub_metering_2","Sub_metering_... | /plot4.R | no_license | SumuduPriyabhashinee/ExData_Plotting1 | R | false | false | 1,639 | r | setwd("D:/DataScience/DataScienceCourse/Exxploratory Data Analysis/week 1 Assignment")
dataset <- read.table("household_power_consumption.txt",skip=1,sep=";")
names(dataset) <- c("Date","Time","Global_active_power","Global_reactive_power","Voltage","Global_intensity","Sub_metering_1","Sub_metering_2","Sub_metering_... |
## Surface plot with superimposed mdp solutions
## per standard deviation risk level
surfacePlot(surf, type = "filled.contour",
palette = gray.colors, addHull = TRUE, addGrid = FALSE,
addAssets = FALSE, xlab = "Target Risk", ylab = "Target Return",
main = "Convex Hull with Risk Surfa... | /inst/BookEx/C12R9.R | no_license | MatixR/FRAPO | R | false | false | 1,359 | r | ## Surface plot with superimposed mdp solutions
## per standard deviation risk level
surfacePlot(surf, type = "filled.contour",
palette = gray.colors, addHull = TRUE, addGrid = FALSE,
addAssets = FALSE, xlab = "Target Risk", ylab = "Target Return",
main = "Convex Hull with Risk Surfa... |
\docType{data}
\name{weta}
\alias{weta}
\title{Occupancy data for Mahoenui Giant Weta}
\format{A data frame with 72 observations (sites) on the following 7
variables. \describe{ \item{ch}{a character vector containing the presence
(1) and absence (0), or (.) not visited for each of 5 visits to the site}
\item{B... | /RMark/man/weta.Rd | no_license | wchallenger/RMark | R | false | false | 4,206 | rd | \docType{data}
\name{weta}
\alias{weta}
\title{Occupancy data for Mahoenui Giant Weta}
\format{A data frame with 72 observations (sites) on the following 7
variables. \describe{ \item{ch}{a character vector containing the presence
(1) and absence (0), or (.) not visited for each of 5 visits to the site}
\item{B... |
ensembleMOSlognormal <-
function(ensembleData, trainingDays, consecutive = FALSE, dates = NULL,
control = controlMOSlognormal(), warmStart = FALSE,
exchangeable = NULL)
{
if (!inherits(ensembleData,"ensembleData")) stop("not an ensembleData object")
call <- match.call()
if(!is.logical(warmStart)... | /ensembleMOS/R/ensembleMOSlognormal.R | no_license | Three-Poles/Reprocessing | R | false | false | 5,578 | r | ensembleMOSlognormal <-
function(ensembleData, trainingDays, consecutive = FALSE, dates = NULL,
control = controlMOSlognormal(), warmStart = FALSE,
exchangeable = NULL)
{
if (!inherits(ensembleData,"ensembleData")) stop("not an ensembleData object")
call <- match.call()
if(!is.logical(warmStart)... |
# read and load data
library(glmnet)
csv_USA_all <- 'Z:/Uni Nils/Energy Science Master/Masterarbeit/Python/Marc GranovetterModell/pygranovetter/Workprogress Scripts/Auswertung/Arrays_all_cluster_simulations/Relaxed Lasso Data/USA_all_Datframe_100000Simulations.csv'
csv_USA_only_tipped <- 'Z:/Uni Nils/Energy Science ... | /Relaxed Lasso Regressions/RProject_USA/RelaxedLasso_FinalAnalysis_USA.R | no_license | NilsDunker/Master-thesis-Dunker | R | false | false | 15,086 | r | # read and load data
library(glmnet)
csv_USA_all <- 'Z:/Uni Nils/Energy Science Master/Masterarbeit/Python/Marc GranovetterModell/pygranovetter/Workprogress Scripts/Auswertung/Arrays_all_cluster_simulations/Relaxed Lasso Data/USA_all_Datframe_100000Simulations.csv'
csv_USA_only_tipped <- 'Z:/Uni Nils/Energy Science ... |
#' Letter Data
#'
#' Data from the Extended Cohn-Kanade database, FACS data and emotions for posed images
#'
#' @docType data
#'
#' @usage data(emotions_set)
#'
#' @format An object of class.
#'
#' @keywords datasets
#'
#' @references Lucey P, Cohn JF, Kanade T, Saragih J, Ambadar Z, Matthews I (2010) The extended Cohn... | /R/emotions_set-data.R | permissive | gobbios/NetFACS | R | false | false | 587 | r | #' Letter Data
#'
#' Data from the Extended Cohn-Kanade database, FACS data and emotions for posed images
#'
#' @docType data
#'
#' @usage data(emotions_set)
#'
#' @format An object of class.
#'
#' @keywords datasets
#'
#' @references Lucey P, Cohn JF, Kanade T, Saragih J, Ambadar Z, Matthews I (2010) The extended Cohn... |
rm(list = ls())
gc(reset = T)
setwd('/Users/moon/Documents/CBS_model/code/simulation_code/ex3')
source('../model.R')
load('ex3_data_list_500.Rdata')
model_list = vector('list', length(x_data_list))
for(i in 1:100)
{
model_list[[i]] = btm_fit(x = x_data_list[[i]],
sim_n = 10,
... | /Simulation/ex3/ex3_exec_btm.R | no_license | Monster-Moon/RBS_ranking | R | false | false | 1,342 | r | rm(list = ls())
gc(reset = T)
setwd('/Users/moon/Documents/CBS_model/code/simulation_code/ex3')
source('../model.R')
load('ex3_data_list_500.Rdata')
model_list = vector('list', length(x_data_list))
for(i in 1:100)
{
model_list[[i]] = btm_fit(x = x_data_list[[i]],
sim_n = 10,
... |
#' Convert to dataframe
#'
#' Can be applied to both groupcheck definitions or check results
#'
#' @export
#'
#' @param x data to be converted
convert_to_df <- function(x) {
df <- Reduce(f = rbind, x = x)
rownames(df) <- NULL
as.data.frame(df, stringsAsFactors = FALSE)
}
#' Convert group of checks into dat... | /R/reporter.R | permissive | EvgenyPetrovsky/deeque | R | false | false | 872 | r | #' Convert to dataframe
#'
#' Can be applied to both groupcheck definitions or check results
#'
#' @export
#'
#' @param x data to be converted
convert_to_df <- function(x) {
df <- Reduce(f = rbind, x = x)
rownames(df) <- NULL
as.data.frame(df, stringsAsFactors = FALSE)
}
#' Convert group of checks into dat... |
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Do not modify this file since it was automatically generated from:
%
% exportBins.R
%
% by the Rdoc compiler part of the R.oo package.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\name{exportBins}
\alias{expo... | /man/exportBins.Rd | no_license | daoud-sie/QDNAseq | R | false | false | 1,919 | rd | %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Do not modify this file since it was automatically generated from:
%
% exportBins.R
%
% by the Rdoc compiler part of the R.oo package.
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\name{exportBins}
\alias{expo... |
# Simple Linear regression
#Importing dataset in R
newspapermarketing <- read.csv("newspapermarketing.csv")
# Now let's check the structure of advertising dataset.
# structure of dataset
str(newspapermarketing)
# Let's quickly look at the plot of sales and Radio spend
plot(newspapermarketing$Newspaper, newspape... | /course3/linearregression/newspapermarketing.R | no_license | amitshekhar/darprogramrepository | R | false | false | 1,569 | r | # Simple Linear regression
#Importing dataset in R
newspapermarketing <- read.csv("newspapermarketing.csv")
# Now let's check the structure of advertising dataset.
# structure of dataset
str(newspapermarketing)
# Let's quickly look at the plot of sales and Radio spend
plot(newspapermarketing$Newspaper, newspape... |
checkPedigreeGraph <- function(object)
{
errors <- c()
if(class(object@graph) != "igraph")
{
errors <- c(errors, "Slot graph must have class igraph")
}
if(!is.numeric(object@layout) || ncol(object@layout) != 2)
{
errors <- c(errors, "Slot layout must be a numeric matrix with two columns")
}
if(length(errors... | /R/pedigreeGraph-class.R | no_license | rohan-shah/mpMap2 | R | false | false | 973 | r | checkPedigreeGraph <- function(object)
{
errors <- c()
if(class(object@graph) != "igraph")
{
errors <- c(errors, "Slot graph must have class igraph")
}
if(!is.numeric(object@layout) || ncol(object@layout) != 2)
{
errors <- c(errors, "Slot layout must be a numeric matrix with two columns")
}
if(length(errors... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dataFilter.R
\name{dataFilter}
\alias{dataFilter}
\alias{dataFilterUI}
\alias{dataFilterServer}
\title{Shiny module for filtering data}
\usage{
dataFilterUI(id)
dataFilterServer(id, data = reactive(NULL), hide = FALSE, hover_text = NULL)
}
\... | /man/dataFilter.Rd | no_license | echukwuka/DataEditR | R | false | true | 1,701 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dataFilter.R
\name{dataFilter}
\alias{dataFilter}
\alias{dataFilterUI}
\alias{dataFilterServer}
\title{Shiny module for filtering data}
\usage{
dataFilterUI(id)
dataFilterServer(id, data = reactive(NULL), hide = FALSE, hover_text = NULL)
}
\... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/protobi.R
\name{protobi_get_data}
\alias{protobi_get_data}
\title{Get Data Function}
\usage{
protobi_get_data(
projectid,
tablekey,
apikey,
host = "https://app.protobi.com",
formats = FALSE,
titles = FALSE
)
}
\arguments{
\item{pr... | /man/protobi_get_data.Rd | permissive | protobi/protobi-r | R | false | true | 945 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/protobi.R
\name{protobi_get_data}
\alias{protobi_get_data}
\title{Get Data Function}
\usage{
protobi_get_data(
projectid,
tablekey,
apikey,
host = "https://app.protobi.com",
formats = FALSE,
titles = FALSE
)
}
\arguments{
\item{pr... |
source("./Scripts/sak_file_var/getMeta.R")
soFar <- getMeta(pathToData = "../../taler/id_taler_meta.csv",
sakfolderPath = "/media/martigso/Data/referat_raw/stortinget.no/no/Saker-og-publikasjoner/Publikasjoner/Referater/Stortinget/",
session = "2001-2002")
save(soFar, file = paste0("... | /R/Scripts/sak_file_var/s0102.R | no_license | emanlapponi/storting | R | false | false | 396 | r | source("./Scripts/sak_file_var/getMeta.R")
soFar <- getMeta(pathToData = "../../taler/id_taler_meta.csv",
sakfolderPath = "/media/martigso/Data/referat_raw/stortinget.no/no/Saker-og-publikasjoner/Publikasjoner/Referater/Stortinget/",
session = "2001-2002")
save(soFar, file = paste0("... |
\name{Angeville}
\Rdversion{1.1}
\alias{Angeville}
\docType{data}
\title{
Data from d'Angeville (1836) on the population of France
}
\description{
Adolph d'Angeville (1836) presented a comprehensive statistical
summary of nearly every known measurable characteristic of the French
population (by department) in... | /man/Angeville.Rd | no_license | friendly/Guerry | R | false | false | 4,455 | rd | \name{Angeville}
\Rdversion{1.1}
\alias{Angeville}
\docType{data}
\title{
Data from d'Angeville (1836) on the population of France
}
\description{
Adolph d'Angeville (1836) presented a comprehensive statistical
summary of nearly every known measurable characteristic of the French
population (by department) in... |
## ----setup, include=FALSE------------------------------------------------
knitr::opts_chunk$set(echo = TRUE, eval = FALSE)
## ------------------------------------------------------------------------
# input <- input_fn(mtcars,
# features = c("drat", "mpg", "am"),
# response = "... | /data/genthat_extracted_code/tfestimators/vignettes/estimator_basics.R | no_license | surayaaramli/typeRrh | R | false | false | 2,540 | r | ## ----setup, include=FALSE------------------------------------------------
knitr::opts_chunk$set(echo = TRUE, eval = FALSE)
## ------------------------------------------------------------------------
# input <- input_fn(mtcars,
# features = c("drat", "mpg", "am"),
# response = "... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mutate_if.r
\name{mutate_if}
\alias{mutate_if}
\title{mutate selected rows}
\usage{
mutate_if(.data, .if, ...)
}
\arguments{
\item{.data}{the data}
\item{.if}{a logical condition that selects rows, e.g. a=="B"}
\item{...}{the command to mut... | /man/mutate_if.Rd | no_license | 3wen/dplyrExtras | R | false | true | 1,928 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mutate_if.r
\name{mutate_if}
\alias{mutate_if}
\title{mutate selected rows}
\usage{
mutate_if(.data, .if, ...)
}
\arguments{
\item{.data}{the data}
\item{.if}{a logical condition that selects rows, e.g. a=="B"}
\item{...}{the command to mut... |
###
# Teemu Daniel Laajala
# February 2016
# Confounder simulations - Supplementary Figure 9 draft
###
.simurun <- function(...){
# Number of simulations per each parameter combination
nsim <- 1000
# Combination grid of parameters
grid <- expand.grid(q=c(1,3,10,20), p=c(1,3,10,20), s=c(0,0.4,0.7), n=c(5,10,15), diffe... | /R/simurun.R | no_license | Syksy/hamlet | R | false | false | 8,122 | r | ###
# Teemu Daniel Laajala
# February 2016
# Confounder simulations - Supplementary Figure 9 draft
###
.simurun <- function(...){
# Number of simulations per each parameter combination
nsim <- 1000
# Combination grid of parameters
grid <- expand.grid(q=c(1,3,10,20), p=c(1,3,10,20), s=c(0,0.4,0.7), n=c(5,10,15), diffe... |
temp <- read.csv("Phenotype.csv",header = T)
find_top <- function(x=5, min_select = 4){
for(i in 1:nrow(temp)){
y <- 10
x <- x:y
if(i == 1){
a <- NA
}
b <- match(temp[i,2:ncol(temp)], x)
a <-rbind(a, b)
}
aaaaa <- cbind(temp$SampleID, a[2:nrow(a),])
rownames(aaaaa) <- 1:nrow(aaaaa)
vvv <- rowSums(is.n... | /Row_vise_filter.R | no_license | ggarpanchal/R_Play | R | false | false | 880 | r | temp <- read.csv("Phenotype.csv",header = T)
find_top <- function(x=5, min_select = 4){
for(i in 1:nrow(temp)){
y <- 10
x <- x:y
if(i == 1){
a <- NA
}
b <- match(temp[i,2:ncol(temp)], x)
a <-rbind(a, b)
}
aaaaa <- cbind(temp$SampleID, a[2:nrow(a),])
rownames(aaaaa) <- 1:nrow(aaaaa)
vvv <- rowSums(is.n... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/DistanceComputations.R
\name{pdcDistOneTSList}
\alias{pdcDistOneTSList}
\title{Permutation Distribution Distance for One List of Time Series}
\usage{
pdcDistOneTSList(tsList, subSequenceLength = NULL)
}
\arguments{
\item{tsList}{A li... | /man/pdcDistOneTSList.Rd | permissive | vishalbelsare/FastTSDistances | R | false | true | 824 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/DistanceComputations.R
\name{pdcDistOneTSList}
\alias{pdcDistOneTSList}
\title{Permutation Distribution Distance for One List of Time Series}
\usage{
pdcDistOneTSList(tsList, subSequenceLength = NULL)
}
\arguments{
\item{tsList}{A li... |
## plot 3
# Reading, naming and subsetting power consumption data
p3 <- read.table("household_power_consumption.txt",skip=1,sep=";")
names(p3) <- c("Date","Time","Global_active_power","Global_reactive_power","Voltage","Global_intensity","Sub_metering_1","Sub_metering_2","Sub_metering_3")
subp3 <- subset(p3,p3$Date=="1/... | /plot3.R | no_license | danna1118/ExData_Plotting1 | R | false | false | 1,225 | r | ## plot 3
# Reading, naming and subsetting power consumption data
p3 <- read.table("household_power_consumption.txt",skip=1,sep=";")
names(p3) <- c("Date","Time","Global_active_power","Global_reactive_power","Voltage","Global_intensity","Sub_metering_1","Sub_metering_2","Sub_metering_3")
subp3 <- subset(p3,p3$Date=="1/... |
#' do a test
#'
#' lalalalalala
#'
#' @author Shang Ju
#' @param x int
#' @return a vector of random numbers
#' @details
#' lalalalalalalallalalalala
#' @export
#' @importFrom stats rnorm
test <- function(x) {
rnorm(x)
}
| /9 - Developing Data Products/week 3/topten/R/hello.R | no_license | findshawn/Data-Science-Spec----Coursera | R | false | false | 226 | r | #' do a test
#'
#' lalalalalala
#'
#' @author Shang Ju
#' @param x int
#' @return a vector of random numbers
#' @details
#' lalalalalalalallalalalala
#' @export
#' @importFrom stats rnorm
test <- function(x) {
rnorm(x)
}
|
#####################################################################################################
# All contents of this document were created by Mohamed Sihly for the sole purpose of #
# Team 1's term project in CIS / STA 3920 (PMWA) - Fall 2019. The dataset used in this #
# proj... | /HE.r | no_license | msihly/MEPS-Health-Expenditures | R | false | false | 59,756 | r | #####################################################################################################
# All contents of this document were created by Mohamed Sihly for the sole purpose of #
# Team 1's term project in CIS / STA 3920 (PMWA) - Fall 2019. The dataset used in this #
# proj... |
###############################################################################
# Model results
# Fleet dynamics
# IJmuiden, IMARES
# 20th October 2016
###############################################################################
#==============================================================================
# libra... | /Third version_SIGMA/code/model_results.R | no_license | JanJaapPoos/Nekane__BoB | R | false | false | 47,472 | r | ###############################################################################
# Model results
# Fleet dynamics
# IJmuiden, IMARES
# 20th October 2016
###############################################################################
#==============================================================================
# libra... |
rm(list=ls())
options(Warnings=F)
if(!requireNamespace('export')){
install.packages("export")
}else{
library(export)
}
setwd('C:\\Users\\R_study\\powerpoint_format')
library(ggplot2)
qplot(Sepal.Length, Petal.Length, data = iris, color = Species,
size = Petal.Width, alpha = I(0.7))
graph2ppt(file="ggplo... | /generate_ppt_plot.R | no_license | honghh2018/R_scripts_collected | R | false | false | 355 | r | rm(list=ls())
options(Warnings=F)
if(!requireNamespace('export')){
install.packages("export")
}else{
library(export)
}
setwd('C:\\Users\\R_study\\powerpoint_format')
library(ggplot2)
qplot(Sepal.Length, Petal.Length, data = iris, color = Species,
size = Petal.Width, alpha = I(0.7))
graph2ppt(file="ggplo... |
library(glmnet)
mydata = read.table("./TrainingSet/AvgRank/large_intestine.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.75,family="gaussian",standardize=TRUE)
sink('./Model/EN/AvgRank/large_intestine/large_in... | /Model/EN/AvgRank/large_intestine/large_intestine_079.R | no_license | leon1003/QSMART | R | false | false | 379 | r | library(glmnet)
mydata = read.table("./TrainingSet/AvgRank/large_intestine.csv",head=T,sep=",")
x = as.matrix(mydata[,4:ncol(mydata)])
y = as.matrix(mydata[,1])
set.seed(123)
glm = cv.glmnet(x,y,nfolds=10,type.measure="mae",alpha=0.75,family="gaussian",standardize=TRUE)
sink('./Model/EN/AvgRank/large_intestine/large_in... |
testlist <- list(Beta = 0, CVLinf = 5.87938118551083e-322, FM = 3.81959242373749e-313, L50 = 0, L95 = 0, LenBins = numeric(0), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), SL50 = 9.97941197291525e-316, SL95 = 2.12248160522076e-314, nage = 682962514L... | /DLMtool/inst/testfiles/LBSPRgen/AFL_LBSPRgen/LBSPRgen_valgrind_files/1615829447-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 420 | r | testlist <- list(Beta = 0, CVLinf = 5.87938118551083e-322, FM = 3.81959242373749e-313, L50 = 0, L95 = 0, LenBins = numeric(0), LenMids = numeric(0), Linf = 0, MK = 0, Ml = numeric(0), Prob = structure(0, .Dim = c(1L, 1L)), SL50 = 9.97941197291525e-316, SL95 = 2.12248160522076e-314, nage = 682962514L... |
pool_summary<-readRDS(file='Outputs/Pool8_RetentionEstimates.rds')
#Time series of Pool 8 NO3 retention and potential drivers
png("Figures/N_retention_Drivers_Intrapool.png", res=200, width=4.2,height=4, units="in")
cex=0.8
cexpt=1.5
par(cex=cex)
par(ps=12)
cex=0.8
par(cex=cex)
cexpt=1.5
ps=12
par(mfrow=c(2,2))
p... | /R/PlotRetentionPool8.R | no_license | lukeloken/MissRiver_Nitrogen | R | false | false | 1,975 | r |
pool_summary<-readRDS(file='Outputs/Pool8_RetentionEstimates.rds')
#Time series of Pool 8 NO3 retention and potential drivers
png("Figures/N_retention_Drivers_Intrapool.png", res=200, width=4.2,height=4, units="in")
cex=0.8
cexpt=1.5
par(cex=cex)
par(ps=12)
cex=0.8
par(cex=cex)
cexpt=1.5
ps=12
par(mfrow=c(2,2))
p... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vp.R
\name{c.vp}
\alias{c.vp}
\title{Concatenate vertical profiles (\code{vp}) into a list of vertical profiles}
\usage{
\method{c}{vp}(...)
}
\arguments{
\item{...}{objects of class \code{vp}}
}
\value{
an object of class \code{list}
}
\desc... | /man/c.vp.Rd | permissive | CeciliaNilsson709/bioRad | R | false | true | 406 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/vp.R
\name{c.vp}
\alias{c.vp}
\title{Concatenate vertical profiles (\code{vp}) into a list of vertical profiles}
\usage{
\method{c}{vp}(...)
}
\arguments{
\item{...}{objects of class \code{vp}}
}
\value{
an object of class \code{list}
}
\desc... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.regnet.R
\name{plot.regnet}
\alias{plot.regnet}
\title{plot a regnet object}
\usage{
\method{plot}{regnet}(x, subnetworks=FALSE, vsize=10, labelDist=2, minVertices=2, theta=1, \dots)
}
\arguments{
\item{x}{regnet object.}
\item{subnetwo... | /man/plot.regnet.Rd | no_license | cenwu/regnet | R | false | true | 1,427 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/plot.regnet.R
\name{plot.regnet}
\alias{plot.regnet}
\title{plot a regnet object}
\usage{
\method{plot}{regnet}(x, subnetworks=FALSE, vsize=10, labelDist=2, minVertices=2, theta=1, \dots)
}
\arguments{
\item{x}{regnet object.}
\item{subnetwo... |
timestamp <- Sys.time()
library(caret)
library(plyr)
library(recipes)
library(dplyr)
model <- "rfRules"
## In case the package or one of its dependencies uses random numbers
## on startup so we'll pre-load the required libraries:
for(i in getModelInfo(model)[[1]]$library)
do.call("require", list(package = i))
##... | /RegressionTests/Code/rfRules.R | no_license | Weekend-Warrior/caret | R | false | false | 7,006 | r | timestamp <- Sys.time()
library(caret)
library(plyr)
library(recipes)
library(dplyr)
model <- "rfRules"
## In case the package or one of its dependencies uses random numbers
## on startup so we'll pre-load the required libraries:
for(i in getModelInfo(model)[[1]]$library)
do.call("require", list(package = i))
##... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/histgram.R
\name{hist_smoothing}
\alias{hist_smoothing}
\title{Smoothing histgram sequence by using simple moving average method}
\usage{
hist_smoothing(hist.data, width)
}
\arguments{
\item{hist.data}{Histgram sequence}
\item{width}{Width o... | /man/hist_smoothing.Rd | permissive | hmito/hmRLib | R | false | true | 763 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/histgram.R
\name{hist_smoothing}
\alias{hist_smoothing}
\title{Smoothing histgram sequence by using simple moving average method}
\usage{
hist_smoothing(hist.data, width)
}
\arguments{
\item{hist.data}{Histgram sequence}
\item{width}{Width o... |
/Gibbs Sampling.R | no_license | xyw1/UndergraduateCourse-DataMining | R | false | false | 4,550 | r | ||
insert.driverphone <- function(input, output, session) {
datasetInput <- eventReactive(input$insert, {
stfid = input$stfid
hmphnn = input$hmphn
mobphn = input$mobphn
query <- insert.query('driverphones', parameters = c(stfid, hmphnn, mobphn))
tryCatch(
{
dbSendQuery(db.connection, qu... | /insert.driverphone.R | permissive | Naghipourfar/Snapp | R | false | false | 682 | r | insert.driverphone <- function(input, output, session) {
datasetInput <- eventReactive(input$insert, {
stfid = input$stfid
hmphnn = input$hmphn
mobphn = input$mobphn
query <- insert.query('driverphones', parameters = c(stfid, hmphnn, mobphn))
tryCatch(
{
dbSendQuery(db.connection, qu... |
\encoding{UTF-8}
\name{read.fh}
\alias{read.fh}
\title{ Read Heidelberg Format Ring Width File }
\description{
This function reads in a Heidelberg (block or column) format file of
ring widths (.fh).
}
\usage{
read.fh(fname, BC_correction = FALSE)
}
\arguments{
\item{fname}{ a \code{character} vector giving the fi... | /man/read.fh.Rd | no_license | AndyBunn/dplR | R | false | false | 1,595 | rd | \encoding{UTF-8}
\name{read.fh}
\alias{read.fh}
\title{ Read Heidelberg Format Ring Width File }
\description{
This function reads in a Heidelberg (block or column) format file of
ring widths (.fh).
}
\usage{
read.fh(fname, BC_correction = FALSE)
}
\arguments{
\item{fname}{ a \code{character} vector giving the fi... |
library(tidyverse)
library(biomaRt)
library(pheatmap)
sample_table <- read_tsv("data/tidyverse/obds_sampletable.tsv")
count_table <- read_tsv("data/tidyverse/obds_countstable.tsv.gz")
processed_countable <- count_table %>%
pivot_longer(-Geneid, names_to = "sample", values_to = "count")
# Join with gene info to get... | /project_tidyverse/data/tidyverse/tidyverse_ggplot.R | no_license | harryhutian/obds_training | R | false | false | 1,658 | r | library(tidyverse)
library(biomaRt)
library(pheatmap)
sample_table <- read_tsv("data/tidyverse/obds_sampletable.tsv")
count_table <- read_tsv("data/tidyverse/obds_countstable.tsv.gz")
processed_countable <- count_table %>%
pivot_longer(-Geneid, names_to = "sample", values_to = "count")
# Join with gene info to get... |
plotName <- "plot1.png"
# Names of the Variables in the data.
vars <- c("Date", "Time", "Global Active Power",
"Global Reactive Power", "Voltage",
"Global Intensity", "Sub Metering 1",
"Sub Metering 2", "Sub Metering 3")
# Reads the data into a data frame.
fileName = "household_power_consumption.txt"
colClass <- ... | /plot1.R | no_license | hosant/ExData_Plotting1 | R | false | false | 859 | r |
plotName <- "plot1.png"
# Names of the Variables in the data.
vars <- c("Date", "Time", "Global Active Power",
"Global Reactive Power", "Voltage",
"Global Intensity", "Sub Metering 1",
"Sub Metering 2", "Sub Metering 3")
# Reads the data into a data frame.
fileName = "household_power_consumption.txt"
colClass <- ... |
library(data.table)
library(ggplot2)
library(ISLR)
library(leaps)
library(e1071)
source("C:/MyStuff/DataScience/Projects/Kaggle/Titanic/Cleaning.R")
setwd("C:/MyStuff/DataScience/Projects/Kaggle/Titanic/SVM")
# Split the train data set into a train and test set
index <- sample(891, 600)
train <- dat[index]
test <... | /Titanic/SVM/svm.R | no_license | dheis1337/Kaggle | R | false | false | 8,910 | r | library(data.table)
library(ggplot2)
library(ISLR)
library(leaps)
library(e1071)
source("C:/MyStuff/DataScience/Projects/Kaggle/Titanic/Cleaning.R")
setwd("C:/MyStuff/DataScience/Projects/Kaggle/Titanic/SVM")
# Split the train data set into a train and test set
index <- sample(891, 600)
train <- dat[index]
test <... |
pausa = function(){
cat("Pulsa cualquier caracter")
ch= scan()
}
###########################################################################
# PARTE 1
###########################################################################
# EJERCICIO 1 ----------------------------------------------------------... | /P2/Ejercicios.R | no_license | muscraziest/AA | R | false | false | 14,381 | r | pausa = function(){
cat("Pulsa cualquier caracter")
ch= scan()
}
###########################################################################
# PARTE 1
###########################################################################
# EJERCICIO 1 ----------------------------------------------------------... |
library(dplyr)
### Read the data
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
### Calculate totalPM2.5 for each year for Baltimore city
BWI_pm25 <- NEI %>% filter(fips=="24510") %>%
with(tapply(Emissions, year, sum, ... | /project2/src/Plot2.R | no_license | rajendrans/ExData_Plotting1 | R | false | false | 726 | r | library(dplyr)
### Read the data
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
### Calculate totalPM2.5 for each year for Baltimore city
BWI_pm25 <- NEI %>% filter(fips=="24510") %>%
with(tapply(Emissions, year, sum, ... |
library(flam)
### Name: plot.flam
### Title: Plots Function Estimates for Fit of Class "flam"
### Aliases: plot.flam
### ** Examples
#See ?'flam-package' for a full example of how to use this package
#generate data
set.seed(1)
data <- sim.data(n = 50, scenario = 1, zerof = 10, noise = 1)
#fit model for a range of ... | /data/genthat_extracted_code/flam/examples/plot.flam.rd.R | no_license | surayaaramli/typeRrh | R | false | false | 916 | r | library(flam)
### Name: plot.flam
### Title: Plots Function Estimates for Fit of Class "flam"
### Aliases: plot.flam
### ** Examples
#See ?'flam-package' for a full example of how to use this package
#generate data
set.seed(1)
data <- sim.data(n = 50, scenario = 1, zerof = 10, noise = 1)
#fit model for a range of ... |
\name{bootstrap_rows_list}
\alias{bootstrap_rows_list}
\title{Bootstrap rows from a list of data frames}
\usage{bootstrap_rows_list(popdata, nrows, nsims, pfx)}
\arguments{
\item{popdata}{List of data frames from which rows are to be
bootstrapped}
\item{nrows}{Number of rows to bootstrap}
\item{nsims}{... | /man/bootstrap_rows_list.Rd | no_license | netterie/cantrance | R | false | false | 595 | rd | \name{bootstrap_rows_list}
\alias{bootstrap_rows_list}
\title{Bootstrap rows from a list of data frames}
\usage{bootstrap_rows_list(popdata, nrows, nsims, pfx)}
\arguments{
\item{popdata}{List of data frames from which rows are to be
bootstrapped}
\item{nrows}{Number of rows to bootstrap}
\item{nsims}{... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/countPaths.R
\name{countPaths}
\alias{countPaths}
\title{count paths between all pairs}
\usage{
countPaths(conf, maxLength = 2)
}
\arguments{
\item{conf}{a matrix of conf.mat class.
An N-by-N conflict matrix whose \code{(i,j)}th element is t... | /man/countPaths.Rd | no_license | jianjinucdavis/Perc | R | false | true | 980 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/countPaths.R
\name{countPaths}
\alias{countPaths}
\title{count paths between all pairs}
\usage{
countPaths(conf, maxLength = 2)
}
\arguments{
\item{conf}{a matrix of conf.mat class.
An N-by-N conflict matrix whose \code{(i,j)}th element is t... |
rm(list = ls())
library(dplyr)
# library(mpr)
# library(betareg)
library(survey)
library(foreach)
library(doParallel)
library(ggplot2) #split dataset into equal sized subgroups (weight 4)
###generate data
set.seed(1)
N = 50000
nsim = 5000
ncore = 20
scenario = 2
####################1 Generate the Po... | /p1_simulation_2_distribution.R | no_license | wennaxi/prob_nonprob_samples | R | false | false | 9,187 | r |
rm(list = ls())
library(dplyr)
# library(mpr)
# library(betareg)
library(survey)
library(foreach)
library(doParallel)
library(ggplot2) #split dataset into equal sized subgroups (weight 4)
###generate data
set.seed(1)
N = 50000
nsim = 5000
ncore = 20
scenario = 2
####################1 Generate the Po... |
\name{marks.tess}
\alias{marks.tess}
\alias{marks<-.tess}
\alias{unmark.tess}
\title{Marks of a Tessellation}
\description{
Extract or change the marks attached to
the tiles of a tessellation.
}
\usage{
\method{marks}{tess}(x, \dots)
\method{marks}{tess}(x, \dots) <- value
\method{unmark}{tess}(X)
}
\a... | /man/marks.tess.Rd | no_license | chenjiaxun9/spatstat | R | false | false | 2,248 | rd | \name{marks.tess}
\alias{marks.tess}
\alias{marks<-.tess}
\alias{unmark.tess}
\title{Marks of a Tessellation}
\description{
Extract or change the marks attached to
the tiles of a tessellation.
}
\usage{
\method{marks}{tess}(x, \dots)
\method{marks}{tess}(x, \dots) <- value
\method{unmark}{tess}(X)
}
\a... |
# source: https://pedroconcejero.wordpress.com/2016/03/23/mosaicplots-para-saber-como-son-los-erreros-de-r-hispano/
# Cargamos los datos
setwd("Z:/Personales/Raul/R/data")
erreros <- read.table("R_logo_surveymonkey_data.txt",
sep = "\t",
header = T)
dim(erreros)
... | /mosaicplots-para-saber-como-son-los-erreros-de-r-hispano.R | no_license | raulacejo/codebox | R | false | false | 1,933 | r | # source: https://pedroconcejero.wordpress.com/2016/03/23/mosaicplots-para-saber-como-son-los-erreros-de-r-hispano/
# Cargamos los datos
setwd("Z:/Personales/Raul/R/data")
erreros <- read.table("R_logo_surveymonkey_data.txt",
sep = "\t",
header = T)
dim(erreros)
... |
# Data Licensing Info
# Davide Anguita, Alessandro Ghio, Luca Oneto, Xavier Parra and Jorge L. Reyes-Ortiz. Human Activity Recognition on Smartphones using a Multiclass Hardware-Friendly Support Vector Machine. International Workshop of Ambient Assisted Living (IWAAL 2012). Vitoria-Gasteiz, Spain. Dec 2012
#-------... | /run_analysis.R | no_license | wanv1171/Getting-and-Cleaning-Data-Course-Project | R | false | false | 4,516 | r | # Data Licensing Info
# Davide Anguita, Alessandro Ghio, Luca Oneto, Xavier Parra and Jorge L. Reyes-Ortiz. Human Activity Recognition on Smartphones using a Multiclass Hardware-Friendly Support Vector Machine. International Workshop of Ambient Assisted Living (IWAAL 2012). Vitoria-Gasteiz, Spain. Dec 2012
#-------... |
library(jsonlite)
setwd("~/Yelp")
business <- stream_in(file("business.json"))
extract <- function(data,attribute){
if(!is.character(attribute) | is.null(data[[attribute]])) return("Error:check ur att input")
else
table <- cbind(data[["business_id"]], data[[attribute]])
table <- as.data.frame(table)
... | /relational_database.R | no_license | jtliao/yelp-dataset-challenge | R | false | false | 1,131 | r | library(jsonlite)
setwd("~/Yelp")
business <- stream_in(file("business.json"))
extract <- function(data,attribute){
if(!is.character(attribute) | is.null(data[[attribute]])) return("Error:check ur att input")
else
table <- cbind(data[["business_id"]], data[[attribute]])
table <- as.data.frame(table)
... |
context("Test file readers and splitters")
test_that("Common Log Format files can be read, and split_clf can split the requests",{
data <- read_clf(system.file("extdata/log.clf", package = "webreadr"))
expect_equal(ncol(data), 7)
expect_equal(nrow(data), 2)
expect_equal(class(data$timestamp), c("POSIXct","POSI... | /tests/testthat/test_readers.R | permissive | rOpenSec/webreadr | R | false | false | 1,465 | r | context("Test file readers and splitters")
test_that("Common Log Format files can be read, and split_clf can split the requests",{
data <- read_clf(system.file("extdata/log.clf", package = "webreadr"))
expect_equal(ncol(data), 7)
expect_equal(nrow(data), 2)
expect_equal(class(data$timestamp), c("POSIXct","POSI... |
# Plot2
# Reading data into table
data <- read.table("household_power_consumption.txt", sep=";", header=TRUE, na.strings="?",
colClasses=c("character","character",rep("numeric",7)))
plot2data <- subset(data,Date=="1/2/2007"|Date=="2/2/2007")
head(plot2data)
# Convert time into R type
combine <- with(... | /plot2.R | no_license | ajay-achilles/ExData_Plotting1 | R | false | false | 614 | r | # Plot2
# Reading data into table
data <- read.table("household_power_consumption.txt", sep=";", header=TRUE, na.strings="?",
colClasses=c("character","character",rep("numeric",7)))
plot2data <- subset(data,Date=="1/2/2007"|Date=="2/2/2007")
head(plot2data)
# Convert time into R type
combine <- with(... |
#' Get neighboring nodes based on node attribute
#' similarity
#' @description With a graph a single node serving as
#' the starting point, get those nodes in a potential
#' neighborhood of nodes (adjacent to the starting
#' node) that have a common or similar (within
#' threshold values) node attribute to the starting... | /R/get_similar_nbrs.R | no_license | timelyportfolio/DiagrammeR | R | false | false | 7,345 | r | #' Get neighboring nodes based on node attribute
#' similarity
#' @description With a graph a single node serving as
#' the starting point, get those nodes in a potential
#' neighborhood of nodes (adjacent to the starting
#' node) that have a common or similar (within
#' threshold values) node attribute to the starting... |
gradient_G <- function(lambda_G1, lambda_G2, prior, info){
# sufficient stats
n_ij <- 2*info$stat$n_ij
s_j <- prior$Q$Sg_cond %>%
rep(info$stat$I) %>% matrix(nrow = info$stat$J)
cond_mu <- info$stat$cond_mu
TxSigma <- info$stat$TxSigma
#
grad_G1 <-
(2 * n_ij + 1 - lambda_G1) * trigamm... | /Archive/func/sampler/MFVI/gradient.R | no_license | jereliu/BELA | R | false | false | 1,780 | r | gradient_G <- function(lambda_G1, lambda_G2, prior, info){
# sufficient stats
n_ij <- 2*info$stat$n_ij
s_j <- prior$Q$Sg_cond %>%
rep(info$stat$I) %>% matrix(nrow = info$stat$J)
cond_mu <- info$stat$cond_mu
TxSigma <- info$stat$TxSigma
#
grad_G1 <-
(2 * n_ij + 1 - lambda_G1) * trigamm... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bison_brm.R
\name{bison_brm}
\alias{bison_brm}
\title{Fit a brms model on BISoN network data}
\usage{
bison_brm(
formula,
edgemodel_list,
data_list,
num_draws = 100,
z_score = FALSE,
cores = 4,
chains = 2,
...
)
}
\arguments{
... | /man/bison_brm.Rd | permissive | JHart96/bisonR | R | false | true | 963 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/bison_brm.R
\name{bison_brm}
\alias{bison_brm}
\title{Fit a brms model on BISoN network data}
\usage{
bison_brm(
formula,
edgemodel_list,
data_list,
num_draws = 100,
z_score = FALSE,
cores = 4,
chains = 2,
...
)
}
\arguments{
... |
testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307274727e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(CNull:::communities_individual_... | /CNull/inst/testfiles/communities_individual_based_sampling_alpha/AFL_communities_individual_based_sampling_alpha/communities_individual_based_sampling_alpha_valgrind_files/1615769634-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 362 | r | testlist <- list(m = NULL, repetitions = 0L, in_m = structure(c(2.31584307274727e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(5L, 7L)))
result <- do.call(CNull:::communities_individual_... |
\name{get_osm}
\alias{get_osm}
\title{Get OSM data}
\usage{
get_osm(x, source = osmsource_api(), ...)
}
\arguments{
\item{x}{Data identifier, e.g., bounding box or specific
element; see the help page of the used OSM source for a
detailed list on the supported identifiers}
\item{source}{OSM source, e.g.,
\c... | /man/get_osm.Rd | no_license | TomatoSalat/osmar | R | false | false | 1,013 | rd | \name{get_osm}
\alias{get_osm}
\title{Get OSM data}
\usage{
get_osm(x, source = osmsource_api(), ...)
}
\arguments{
\item{x}{Data identifier, e.g., bounding box or specific
element; see the help page of the used OSM source for a
detailed list on the supported identifiers}
\item{source}{OSM source, e.g.,
\c... |
#' @rdname clusterAnnotation
#' @title Integration of manual cluster annotations
#'
#' @description
#' \code{clusterAnnotation} takes both an SCE object returned by
#' \code{clusterPropagation} and a data.frame of annotations as inputs.
#'
#' @param sce A \code{\link[SingleCellExperiment]{SingleCellExperiment}} ... | /R/clusterAnnotation.R | permissive | jaredmychal/iMUBAC | R | false | false | 1,078 | r | #' @rdname clusterAnnotation
#' @title Integration of manual cluster annotations
#'
#' @description
#' \code{clusterAnnotation} takes both an SCE object returned by
#' \code{clusterPropagation} and a data.frame of annotations as inputs.
#'
#' @param sce A \code{\link[SingleCellExperiment]{SingleCellExperiment}} ... |
## dnm_list.R
## Author: Daniel P. Howrigan (daniel.howrigan@gmail.com)
## Last Modified: January 2019
## ----- DESCRIPTION:
## Interactive Script to generate simple DNM lists for gene set enrichment analysis
## ----- NOTES:
## Does not require trio count as gene set enrichment is relative to total DNM count
##... | /geneset_enrichment/dnm_list.R | no_license | weizhousjtu/trio_sequence_analysis | R | false | false | 897 | r | ## dnm_list.R
## Author: Daniel P. Howrigan (daniel.howrigan@gmail.com)
## Last Modified: January 2019
## ----- DESCRIPTION:
## Interactive Script to generate simple DNM lists for gene set enrichment analysis
## ----- NOTES:
## Does not require trio count as gene set enrichment is relative to total DNM count
##... |
library(dplyr)
library(tibble)
library(stringr)
library(readr)
library(tidyr)
library(rvest)
url <- "https://www.adelaide.edu.au/course-outlines/"
# somehow this does not require any dynamic javascript coding
course_types <- read_html(url) %>%
html_nodes("[class='subsections']") %>%
html_nodes("a") %>%
html_attr... | /06-adelaide.R | no_license | rexarski/AUSSIE | R | false | false | 1,647 | r | library(dplyr)
library(tibble)
library(stringr)
library(readr)
library(tidyr)
library(rvest)
url <- "https://www.adelaide.edu.au/course-outlines/"
# somehow this does not require any dynamic javascript coding
course_types <- read_html(url) %>%
html_nodes("[class='subsections']") %>%
html_nodes("a") %>%
html_attr... |
# person -----------------------------------------
person_th_TH = R6Class(
"person_th_TH",
inherit = person_init,
cloneable = FALSE,
private = list(
formats = c(
'{first_name} {last_name}', '{first_name} {last_name}',
'{first_name} {last_name}',
'{first_name} {last_name}',
'{first_na... | /R/th_TH.R | no_license | LuYang19/faker | R | false | false | 67,668 | r | # person -----------------------------------------
person_th_TH = R6Class(
"person_th_TH",
inherit = person_init,
cloneable = FALSE,
private = list(
formats = c(
'{first_name} {last_name}', '{first_name} {last_name}',
'{first_name} {last_name}',
'{first_name} {last_name}',
'{first_na... |
#----Vectors----
# A vector is a one-dimensional array.
# We can create a vector with all the basic data type
# The simplest way to build a vector is to use the c command.
# Creating a Numerical Vector:
vec_num <- c(1, 10, 49)
vec_num
class(vec_num)
# Creating a Character Vector:
vec_chr <- c("a", "b", "c")... | /vectors.R | no_license | pallavi050998/Pallavi_Analytics | R | false | false | 1,946 | r | #----Vectors----
# A vector is a one-dimensional array.
# We can create a vector with all the basic data type
# The simplest way to build a vector is to use the c command.
# Creating a Numerical Vector:
vec_num <- c(1, 10, 49)
vec_num
class(vec_num)
# Creating a Character Vector:
vec_chr <- c("a", "b", "c")... |
#do not edit, edit noweb/qmrparser.nw
streamParserFromString <- function(string) {
stringIn <- paste(string,collapse="\n")
nchars <- nchar(stringIn)
## One at a time character processing multiplies space by 8 (in 64 bits OS) but reduces time /40
stringIn <- strsplit(stringIn,split=character(0))[[1]]
s... | /R/streamParserFromString.R | no_license | cran/qmrparser | R | false | false | 2,721 | r | #do not edit, edit noweb/qmrparser.nw
streamParserFromString <- function(string) {
stringIn <- paste(string,collapse="\n")
nchars <- nchar(stringIn)
## One at a time character processing multiplies space by 8 (in 64 bits OS) but reduces time /40
stringIn <- strsplit(stringIn,split=character(0))[[1]]
s... |
library(tidyverse)
library(extrafont)
library(patchwork)
font_import()
font_import(pattern = "KOMIKAX.ttf")
loadfonts(device="win")
loadfonts()
fonts()
comercio_hispanoamerica_mundo <- readr::read_csv("https://raw.githubusercontent.com/BESTDATASCIENCE/manos-a-la-data/master/data/2020/2020-04-01/comercio_hispanoameri... | /data/2020/2020-04-01/ejemplo.R | no_license | BESTDATASCIENCE/manos-a-la-data | R | false | false | 8,216 | r | library(tidyverse)
library(extrafont)
library(patchwork)
font_import()
font_import(pattern = "KOMIKAX.ttf")
loadfonts(device="win")
loadfonts()
fonts()
comercio_hispanoamerica_mundo <- readr::read_csv("https://raw.githubusercontent.com/BESTDATASCIENCE/manos-a-la-data/master/data/2020/2020-04-01/comercio_hispanoameri... |
library(Matrix)
N<-5000 # length of the chain
burn<-1000 # burn in length
X<-rnorm (100, mean=200, sd= sqrt(2))
theta<-matrix(0,N,2) # the chain, theta1=mu, theta2=phi
n<-100
mu0<-0
phi0<-5
theta[1,]<-c(mu0,phi0)
for (i in 2:N){
theta[i,1]<-rnorm(1,mean=mean(X), sd=1/sqrt(n*theta[i-1,2]))
theta[i,2]<-rgamma(1,sh... | /R/hw3_problem6.R | no_license | tonycao/CodeSnippets | R | false | false | 806 | r | library(Matrix)
N<-5000 # length of the chain
burn<-1000 # burn in length
X<-rnorm (100, mean=200, sd= sqrt(2))
theta<-matrix(0,N,2) # the chain, theta1=mu, theta2=phi
n<-100
mu0<-0
phi0<-5
theta[1,]<-c(mu0,phi0)
for (i in 2:N){
theta[i,1]<-rnorm(1,mean=mean(X), sd=1/sqrt(n*theta[i-1,2]))
theta[i,2]<-rgamma(1,sh... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/core-opn-dct.R
\name{dfourier}
\alias{dfourier}
\alias{dfourier.Opn}
\alias{dfourier.default}
\title{Discrete cosinus transform}
\usage{
dfourier(coo, nb.h, verbose = TRUE)
\method{dfourier}{default}(coo, nb.h, verbose = TRUE)
\meth... | /man/dfourier.Rd | no_license | lrocax/Momocs | R | false | false | 2,177 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/core-opn-dct.R
\name{dfourier}
\alias{dfourier}
\alias{dfourier.Opn}
\alias{dfourier.default}
\title{Discrete cosinus transform}
\usage{
dfourier(coo, nb.h, verbose = TRUE)
\method{dfourier}{default}(coo, nb.h, verbose = TRUE)
\meth... |
`signrank.shape` <- function(X, fixed.loc=FALSE, location=NULL, init=NULL, steps=Inf, eps=1e-6, maxiter=100, na.action=na.fail)
{
X <- na.action(X)
X<-as.matrix(X)
p<-dim(X)[2]
if(p==1) return(diag(1))
if (is.null(init)) {V<-covshape(X)
}else{ if(is.function(init)) init<-init(X)
V<-to.shape(init)
... | /R/signrank.shape.R | no_license | cran/SpatialNP | R | false | false | 1,444 | r | `signrank.shape` <- function(X, fixed.loc=FALSE, location=NULL, init=NULL, steps=Inf, eps=1e-6, maxiter=100, na.action=na.fail)
{
X <- na.action(X)
X<-as.matrix(X)
p<-dim(X)[2]
if(p==1) return(diag(1))
if (is.null(init)) {V<-covshape(X)
}else{ if(is.function(init)) init<-init(X)
V<-to.shape(init)
... |
## Assignment 2
## Cache the inverse of a matrix
## Creates a "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix())
{
# Get matrix dimension
r <- nrow(x)
c <- ncol(x)
# Create inverse matrix
i <- matrix(nrow = r, ncol = c)
set <- function(y) {
x ... | /cachematrix.R | no_license | lexraider/ProgrammingAssignment2 | R | false | false | 1,221 | r | ## Assignment 2
## Cache the inverse of a matrix
## Creates a "matrix" object that can cache its inverse.
makeCacheMatrix <- function(x = matrix())
{
# Get matrix dimension
r <- nrow(x)
c <- ncol(x)
# Create inverse matrix
i <- matrix(nrow = r, ncol = c)
set <- function(y) {
x ... |
# User Interface for Wordcloud dashboard
fluidPage(
# Application title
titlePanel("Word Cloud"),
sidebarLayout(
# Sidebar with a slider and selection inputs
sidebarPanel(
selectInput("selection", "Choose a Marque:",
choices = marques),
actionButton("update", "Change"),
... | /UI.R | no_license | eightsixtwo/shinyTests | R | false | false | 658 | r | # User Interface for Wordcloud dashboard
fluidPage(
# Application title
titlePanel("Word Cloud"),
sidebarLayout(
# Sidebar with a slider and selection inputs
sidebarPanel(
selectInput("selection", "Choose a Marque:",
choices = marques),
actionButton("update", "Change"),
... |
# File src/library/stats/R/fisher.test.R
# Part of the R package, https://www.R-project.org
#
# Copyright (C) 1995-2017 The R Core Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; ei... | /bin/R-3.5.1/src/library/stats/R/fisher.test.R | permissive | lifebit-ai/exomedepth | R | false | false | 10,395 | r | # File src/library/stats/R/fisher.test.R
# Part of the R package, https://www.R-project.org
#
# Copyright (C) 1995-2017 The R Core Team
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; ei... |
#' @title
#' Make a significant indicator
#'
#' @description
#' Adds asterisks next to p-values like `summary` does with regression output in
#' R.
#'
#' @param p_value A numeric or numeric vector
#' @param format Doesn't do anything right now. Place holder for later. Default
#' is "html".
#'
#' @importF... | /R/calc-sig-ind.R | permissive | emilelatour/purposeful | R | false | false | 730 | r |
#' @title
#' Make a significant indicator
#'
#' @description
#' Adds asterisks next to p-values like `summary` does with regression output in
#' R.
#'
#' @param p_value A numeric or numeric vector
#' @param format Doesn't do anything right now. Place holder for later. Default
#' is "html".
#'
#' @importF... |
\name{flipListStruct}
\alias{flipListStruct}
\title{Internal mGSZ function}
\description{Internal mGSZ function not to be called by the users}
\author{Pashupati Mishra, Petri Toronen}
\keyword{ ~kwd1 }
\keyword{ ~kwd2 }% __ONLY ONE__ keyword per line
| /man/flipListStruct_int.Rd | no_license | cran/mGSZ | R | false | false | 251 | rd | \name{flipListStruct}
\alias{flipListStruct}
\title{Internal mGSZ function}
\description{Internal mGSZ function not to be called by the users}
\author{Pashupati Mishra, Petri Toronen}
\keyword{ ~kwd1 }
\keyword{ ~kwd2 }% __ONLY ONE__ keyword per line
|
Plot1 <- function()
{
data <- read.table("household_power_consumption.txt", header = T, sep=";")
data$Date <- as.Date(data$Date, format="%d/%m/%Y")
data_new <- subset(data, subset=(Date >= "2007-02-01" & Date <= "2007-02-02"))
datetime <- paste(as.Date(data_new$Date), data_new$Time)
data_new$Datetime <- as.P... | /Plot1.R | no_license | jainavinash/ExploratoryData-Week1 | R | false | false | 569 | r | Plot1 <- function()
{
data <- read.table("household_power_consumption.txt", header = T, sep=";")
data$Date <- as.Date(data$Date, format="%d/%m/%Y")
data_new <- subset(data, subset=(Date >= "2007-02-01" & Date <= "2007-02-02"))
datetime <- paste(as.Date(data_new$Date), data_new$Time)
data_new$Datetime <- as.P... |
source("helper.R")
source("pesame.R")
library(stringr)
# load data
data <- read.csv2("../testdata/mvdata_g.csv", header = TRUE)
metadata <- read.csv2("../testdata/metadata_g.csv", header = TRUE)
#fix data - set rowname from the first column and remove that column
rownames(data) = data[, 1]
data <- data[, -1]
# sele... | /examples/scenario.R | no_license | tamilyn/shiny-pesame | R | false | false | 688 | r | source("helper.R")
source("pesame.R")
library(stringr)
# load data
data <- read.csv2("../testdata/mvdata_g.csv", header = TRUE)
metadata <- read.csv2("../testdata/metadata_g.csv", header = TRUE)
#fix data - set rowname from the first column and remove that column
rownames(data) = data[, 1]
data <- data[, -1]
# sele... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/orientation.R
\name{portrait}
\alias{portrait}
\title{Force a data structure into portrait orientation}
\usage{
portrait(x, ...)
}
\arguments{
\item{x}{A matrix or data frame}
}
\value{
The input (\code{x}) in portrait orientation
}
\descript... | /man/portrait.Rd | no_license | pteetor/tutils | R | false | true | 422 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/orientation.R
\name{portrait}
\alias{portrait}
\title{Force a data structure into portrait orientation}
\usage{
portrait(x, ...)
}
\arguments{
\item{x}{A matrix or data frame}
}
\value{
The input (\code{x}) in portrait orientation
}
\descript... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/eval_functions.R
\name{plot_sisal_eval}
\alias{plot_sisal_eval}
\title{Heatmap plot of the evaluated SISAL chronology.}
\usage{
plot_sisal_eval(sisal_eval)
}
\arguments{
\item{sisal_eval}{Evaluation for each entity and age model}
}
\value{
Pl... | /man/plot_sisal_eval.Rd | no_license | paleovar/SISAL.AM | R | false | true | 385 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/eval_functions.R
\name{plot_sisal_eval}
\alias{plot_sisal_eval}
\title{Heatmap plot of the evaluated SISAL chronology.}
\usage{
plot_sisal_eval(sisal_eval)
}
\arguments{
\item{sisal_eval}{Evaluation for each entity and age model}
}
\value{
Pl... |
\name{PairwiseAlignments-class}
\docType{class}
% Classes
\alias{class:PairwiseAlignments}
\alias{PairwiseAlignments-class}
\alias{PairwiseAlignments}
\alias{class:PairwiseAlignmentsSingleSubject}
\alias{PairwiseAlignmentsSingleSubject-class}
\alias{PairwiseAlignmentsSingleSubject}
\alias{class:PairwiseAlignmentsSingl... | /man/PairwiseAlignments-class.Rd | no_license | stjordanis/Biostrings | R | false | false | 12,306 | rd | \name{PairwiseAlignments-class}
\docType{class}
% Classes
\alias{class:PairwiseAlignments}
\alias{PairwiseAlignments-class}
\alias{PairwiseAlignments}
\alias{class:PairwiseAlignmentsSingleSubject}
\alias{PairwiseAlignmentsSingleSubject-class}
\alias{PairwiseAlignmentsSingleSubject}
\alias{class:PairwiseAlignmentsSingl... |
library(ggplot2)
library(ggthemes)
library(scales)
library(dplyr)
library(mice)
library(randomForest)
train <- read.csv("../input/train.csv", stringsAsFactors = F)
test <- read.csv("../input/test.csv", stringsAsFactors = F)
full <- bind_rows(train, test)
full$Title <- gsub("(.*, )|(\\..*)", "", full$Name)
table(full$Se... | /src/r/kernels/libra202ma-exploring-survival-on-the-titanic/script/exploring-survival-on-the-titanic.R | no_license | PRL-PRG/trustworthy-titanic | R | false | false | 3,983 | r | library(ggplot2)
library(ggthemes)
library(scales)
library(dplyr)
library(mice)
library(randomForest)
train <- read.csv("../input/train.csv", stringsAsFactors = F)
test <- read.csv("../input/test.csv", stringsAsFactors = F)
full <- bind_rows(train, test)
full$Title <- gsub("(.*, )|(\\..*)", "", full$Name)
table(full$Se... |
# Test de Duncan
source("Code/Ejercicio3/Anovas.R",local = TRUE)
p_valor=Anv$`Pr(>F)`[1]
if(p_valor<0.05){
verif = "rechaza"
dun = duncan.test(aov(modelo),trt = 'Dieta')
}else{
verif = "no_rechaza"
}
| /Code/Ejercicio3/Duncan.R | no_license | CristianPachacama/DisenioExperimental | R | false | false | 207 | r | # Test de Duncan
source("Code/Ejercicio3/Anovas.R",local = TRUE)
p_valor=Anv$`Pr(>F)`[1]
if(p_valor<0.05){
verif = "rechaza"
dun = duncan.test(aov(modelo),trt = 'Dieta')
}else{
verif = "no_rechaza"
}
|
testlist <- list(AgeVector = c(2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, -Inf, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704e+230, 1.94114173595984e-186, 1.44833381... | /myTAI/inst/testfiles/cpp_bootMatrix/AFL_cpp_bootMatrix/cpp_bootMatrix_valgrind_files/1615764284-test.R | no_license | akhikolla/updatedatatype-list3 | R | false | false | 1,631 | r | testlist <- list(AgeVector = c(2.2262381097027e-76, -9.12990429452974e-204, 5.97087417427845e-79, -Inf, 6.58361441690132e-121, 3.58611068565168e-154, -2.94504776827523e-186, 2.62380314702636e-116, -6.78950518864266e+23, 6.99695749856012e-167, 86485.676793021, 1.11271562183704e+230, 1.94114173595984e-186, 1.44833381... |
ml <- function (x){
sum(x)/length(x)
}
mu <- function (x, var,media){
res<-1/(2*3.14*var)**(length(x)/2)
res<- res*exp(-1/(2*var)*sum(x-media)**2)
res<- res*1/(sqrt(2*3.14))*exp(-(media-1)**2/(2*3.14))
}
mn<- function(x, n,var){
(var)/(n+var)+(n*ml(x))/(n+var)
}
varn<- function(n,var){
1/(1+n/var)
}
p<- function... | /Cuarto/Simulacion/Ejercicio7/cosa.r | no_license | ZhijieQ/inf-uam | R | false | false | 478 | r | ml <- function (x){
sum(x)/length(x)
}
mu <- function (x, var,media){
res<-1/(2*3.14*var)**(length(x)/2)
res<- res*exp(-1/(2*var)*sum(x-media)**2)
res<- res*1/(sqrt(2*3.14))*exp(-(media-1)**2/(2*3.14))
}
mn<- function(x, n,var){
(var)/(n+var)+(n*ml(x))/(n+var)
}
varn<- function(n,var){
1/(1+n/var)
}
p<- function... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/assay.R
\name{count.AssayDetail}
\alias{count.AssayDetail}
\title{Returns the number of assays associated with a project}
\usage{
count.AssayDetail(project.accession)
}
\arguments{
\item{project.accession}{the project accession}
}
\va... | /vignettes/man/count.AssayDetail.Rd | no_license | gccong/ddiR-sirius | R | false | false | 462 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/assay.R
\name{count.AssayDetail}
\alias{count.AssayDetail}
\title{Returns the number of assays associated with a project}
\usage{
count.AssayDetail(project.accession)
}
\arguments{
\item{project.accession}{the project accession}
}
\va... |
## FUNCTION TO CREATE A RASTER OD SPECIFIC RANDOMS VALUES, DIMENSIONS AND EXTENTS. MYPATH <- () IS A WAY TO NAME THE RASTER AND writeRaster WILL SAVE THE RASTER
library(raster)
# set the working directory to where all the input rasters are
setwd("/home/chintan/documents/work/remote_sensing/analysis/dibang-landcover... | /R/randomrastersave.R | no_license | monsoonforest/scripts-forever | R | false | false | 1,281 | r | ## FUNCTION TO CREATE A RASTER OD SPECIFIC RANDOMS VALUES, DIMENSIONS AND EXTENTS. MYPATH <- () IS A WAY TO NAME THE RASTER AND writeRaster WILL SAVE THE RASTER
library(raster)
# set the working directory to where all the input rasters are
setwd("/home/chintan/documents/work/remote_sensing/analysis/dibang-landcover... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/coalescing-ops.R
\name{ifna}
\alias{ifna}
\title{Missingness Coalescing Operator}
\usage{
ifna(x, y)
}
\arguments{
\item{x}{An possibly containing \code{NA} values}
\item{y}{An object of equal length or a single value to be used in
substitut... | /man/ifna.Rd | no_license | coatless-rpkg/rops | R | false | true | 1,261 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/coalescing-ops.R
\name{ifna}
\alias{ifna}
\title{Missingness Coalescing Operator}
\usage{
ifna(x, y)
}
\arguments{
\item{x}{An possibly containing \code{NA} values}
\item{y}{An object of equal length or a single value to be used in
substitut... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ants_set_get.R
\name{antsImageGetSet}
\alias{antsImageGetSet}
\alias{antsGetSpacing}
\alias{antsSetSpacing}
\alias{antsGetOrigin}
\alias{antsSetOrigin}
\alias{antsGetDirection}
\alias{antsSetDirection}
\title{antsImageGetSet}
\usage{
antsGetS... | /man/antsImageGetSet.Rd | permissive | ANTsX/ANTsRCore | R | false | true | 2,047 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/ants_set_get.R
\name{antsImageGetSet}
\alias{antsImageGetSet}
\alias{antsGetSpacing}
\alias{antsSetSpacing}
\alias{antsGetOrigin}
\alias{antsSetOrigin}
\alias{antsGetDirection}
\alias{antsSetDirection}
\title{antsImageGetSet}
\usage{
antsGetS... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metadata_functions.R
\name{listCensusMetadata}
\alias{listCensusMetadata}
\title{Get variable or geography metadata for a given API as a data frame}
\usage{
listCensusMetadata(name, vintage = NULL, type = "variables",
group = NULL)
}
\argum... | /man/listCensusMetadata.Rd | no_license | hieuqtran/censusapi | R | false | true | 1,376 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/metadata_functions.R
\name{listCensusMetadata}
\alias{listCensusMetadata}
\title{Get variable or geography metadata for a given API as a data frame}
\usage{
listCensusMetadata(name, vintage = NULL, type = "variables",
group = NULL)
}
\argum... |
##Read into R the HPC data
inptab <-read.table("household_power_consumption.txt", header = TRUE, sep=";", stringsAsFactors=FALSE)
##Filter the two dates to be analyzed
filtered <- subset(inptab, Date=="1/2/2007" | Date=="2/2/2007")
##Change Local settings to EN
Sys.setlocale("LC_TIME", "en_US")
##Extract Weekday from ... | /Plot4.R | no_license | freviglio/ExData_Plotting1 | R | false | false | 1,655 | r | ##Read into R the HPC data
inptab <-read.table("household_power_consumption.txt", header = TRUE, sep=";", stringsAsFactors=FALSE)
##Filter the two dates to be analyzed
filtered <- subset(inptab, Date=="1/2/2007" | Date=="2/2/2007")
##Change Local settings to EN
Sys.setlocale("LC_TIME", "en_US")
##Extract Weekday from ... |
library(BayesDA)
### Name: factorial
### Title: Data From a Chemical Experiment
### Aliases: factorial
### Keywords: datasets
### ** Examples
data(factorial)
summary(factorial)
# non-Bayesian analysis:
fac.mod1 <- lm(conversion ~ temperature+ratio+contact+
I(temperature*ratio)+I(temperat... | /data/genthat_extracted_code/BayesDA/examples/factorial.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 477 | r | library(BayesDA)
### Name: factorial
### Title: Data From a Chemical Experiment
### Aliases: factorial
### Keywords: datasets
### ** Examples
data(factorial)
summary(factorial)
# non-Bayesian analysis:
fac.mod1 <- lm(conversion ~ temperature+ratio+contact+
I(temperature*ratio)+I(temperat... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.