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 |
|---|---|---|---|---|---|---|---|---|---|
## 1. Merges the training and the test sets to create one data set.
## Read downloaded files into R
test1 <- read.table("/Users/elsahou/Documents/R Programming/data/UCI HAR Dataset/test/X_test.txt")
test2 <- read.table("/Users/elsahou/Documents/R Programming/data/UCI HAR Dataset/test/y_test.txt")
test3 <- read.table(... | /run_analysis.R | no_license | elsahou/getdata-031-project | R | false | false | 3,033 | r | ## 1. Merges the training and the test sets to create one data set.
## Read downloaded files into R
test1 <- read.table("/Users/elsahou/Documents/R Programming/data/UCI HAR Dataset/test/X_test.txt")
test2 <- read.table("/Users/elsahou/Documents/R Programming/data/UCI HAR Dataset/test/y_test.txt")
test3 <- read.table(... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dataload.R
\name{calcarea}
\alias{calcarea}
\title{calculate sphere volume}
\usage{
calcarea(x, y, type = "square")
}
\arguments{
\item{x}{widght of a tumour in mm.}
\item{y}{height of a tumour in mm.}
\item{type}{either "square" or "circle... | /man/calcarea.Rd | permissive | CJBgon/RVivo | R | false | true | 522 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/dataload.R
\name{calcarea}
\alias{calcarea}
\title{calculate sphere volume}
\usage{
calcarea(x, y, type = "square")
}
\arguments{
\item{x}{widght of a tumour in mm.}
\item{y}{height of a tumour in mm.}
\item{type}{either "square" or "circle... |
library(analysisPipelines)
### Name: getFeaturesForPyClassification
### Title: Extracts selected columns from a data frame as a Python array
### Aliases: getFeaturesForPyClassification
### ** Examples
## Not run:
##D getFeaturesForPyClassification(dataset = iris,
##D featureNames = c("Sepal.Length", "Sepal.Width... | /data/genthat_extracted_code/analysisPipelines/examples/getFeaturesForPyClassification.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 343 | r | library(analysisPipelines)
### Name: getFeaturesForPyClassification
### Title: Extracts selected columns from a data frame as a Python array
### Aliases: getFeaturesForPyClassification
### ** Examples
## Not run:
##D getFeaturesForPyClassification(dataset = iris,
##D featureNames = c("Sepal.Length", "Sepal.Width... |
library(ips)
### Name: pis
### Title: Number of Potentially-Informative Sites
### Aliases: pis
### ** Examples
# example data:
# -------------
data(ips.16S)
# number of potentially-informative sites:
# ----------------------------------------
pis(ips.16S, what = "abs")
# proportion of potentially-informative si... | /data/genthat_extracted_code/ips/examples/pis.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 522 | r | library(ips)
### Name: pis
### Title: Number of Potentially-Informative Sites
### Aliases: pis
### ** Examples
# example data:
# -------------
data(ips.16S)
# number of potentially-informative sites:
# ----------------------------------------
pis(ips.16S, what = "abs")
# proportion of potentially-informative si... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prior.R
\name{prior}
\alias{prior}
\alias{prior,}
\alias{ANY-method}
\title{Prior of a given theta}
\usage{
prior(theta)
}
\arguments{
\item{theta}{a proposed value of the theta paramter of the probability equation}
}
\value{
The height of a ... | /devtools.easyRasch/easyRasch/man/prior.Rd | no_license | benjaminschneider212/benjaminschneider.midterm | R | false | true | 738 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/prior.R
\name{prior}
\alias{prior}
\alias{prior,}
\alias{ANY-method}
\title{Prior of a given theta}
\usage{
prior(theta)
}
\arguments{
\item{theta}{a proposed value of the theta paramter of the probability equation}
}
\value{
The height of a ... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calcREF.R
\name{calcREF}
\alias{calcREF}
\title{\code{calcREF} calculates reference points}
\usage{
calcREF(SRouts)
}
\arguments{
\item{SRouts}{presumably spawner per recruit outs}
}
\value{
unclear
}
\description{
\code{calcREF} calculates r... | /simfish/man/calcREF.Rd | no_license | DanOvando/SimFish | R | false | true | 339 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/calcREF.R
\name{calcREF}
\alias{calcREF}
\title{\code{calcREF} calculates reference points}
\usage{
calcREF(SRouts)
}
\arguments{
\item{SRouts}{presumably spawner per recruit outs}
}
\value{
unclear
}
\description{
\code{calcREF} calculates r... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/input_RVP.R
\name{f_keepSource}
\alias{f_keepSource}
\title{Remove, or not, the column source.}
\usage{
f_keepSource(data, keepSource)
}
\arguments{
\item{data}{A dataframe}
\item{keepSource}{A boolean}
}
\value{
a dataframe.
}
\description{... | /man/f_keepSource.Rd | no_license | FabienNicol/suppliesdash | R | false | true | 471 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/input_RVP.R
\name{f_keepSource}
\alias{f_keepSource}
\title{Remove, or not, the column source.}
\usage{
f_keepSource(data, keepSource)
}
\arguments{
\item{data}{A dataframe}
\item{keepSource}{A boolean}
}
\value{
a dataframe.
}
\description{... |
if (!is.null(settings))
op$setPrintSettings(settings)
if (!is.null(page_setup))
op$setDefaultPageSetup(page_setup)
gSignalConnect(op, "begin-print", begin_print)
gSignalConnect(op, "draw-page", draw_page)
res <- op$run("print-dialog", parent)
if (res[[1]] == "error") {
error_dialog = gtkMessageDialog(pa... | /RGtk2/inst/examples/gtk-High-level-Printing-API-2.R | no_license | lawremi/RGtk2 | R | false | false | 565 | r | if (!is.null(settings))
op$setPrintSettings(settings)
if (!is.null(page_setup))
op$setDefaultPageSetup(page_setup)
gSignalConnect(op, "begin-print", begin_print)
gSignalConnect(op, "draw-page", draw_page)
res <- op$run("print-dialog", parent)
if (res[[1]] == "error") {
error_dialog = gtkMessageDialog(pa... |
library(CVD)
### Name: D15Foutch
### Title: Quantitatively analyzes of D15 color panel tests
### Aliases: D15Foutch
### Keywords: programming
### ** Examples
# 2 examples from VK-S
## Not run:
##D D15Foutch(userD15values=c(1:7,9,8,10:15))
##D D15Foutch(userD15values=c(1:7,9,8,10:13,15,14))
## End(Not run)
| /data/genthat_extracted_code/CVD/examples/D15Foutch.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 315 | r | library(CVD)
### Name: D15Foutch
### Title: Quantitatively analyzes of D15 color panel tests
### Aliases: D15Foutch
### Keywords: programming
### ** Examples
# 2 examples from VK-S
## Not run:
##D D15Foutch(userD15values=c(1:7,9,8,10:15))
##D D15Foutch(userD15values=c(1:7,9,8,10:13,15,14))
## End(Not run)
|
library(jsonlite)
library(fplr)
data <- fpl_get_bootstrap()$elements
data %>%
select(one_of('web_name', 'team_code', 'status', 'now_cost', 'selected_by_percent',
'total_points', 'points_per_game', 'minutes', 'influence', 'creativity',
'threat', 'element_type', 'code')) -> data
tea... | /fpl_api.R | no_license | michalcisek/FPL | R | false | false | 7,103 | r | library(jsonlite)
library(fplr)
data <- fpl_get_bootstrap()$elements
data %>%
select(one_of('web_name', 'team_code', 'status', 'now_cost', 'selected_by_percent',
'total_points', 'points_per_game', 'minutes', 'influence', 'creativity',
'threat', 'element_type', 'code')) -> data
tea... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/compute_NNT.R
\name{compute_NNT}
\alias{compute_NNT}
\title{Compute Number Needed to treat}
\usage{
compute_NNT(e, n, alpha)
}
\arguments{
\item{e}{a bivariate numeric vector of counts of events in the two treatment groups}
\item{n}{a bivari... | /man/compute_NNT.Rd | no_license | biostat-ipri/NNT | R | false | true | 650 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/compute_NNT.R
\name{compute_NNT}
\alias{compute_NNT}
\title{Compute Number Needed to treat}
\usage{
compute_NNT(e, n, alpha)
}
\arguments{
\item{e}{a bivariate numeric vector of counts of events in the two treatment groups}
\item{n}{a bivari... |
################################
#Plot-6
################################
library(ggplot2)
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
scc_motor_vehicle <- unique(subset(SCC, EI.Sector %in% c(
"Mobile - On-Road Diesel Heavy Duty Vehicles",
"Mobile - On-Road Diesel Light Duty ... | /plot6.R | no_license | jianwshen/ExData_Plotting2 | R | false | false | 1,222 | r | ################################
#Plot-6
################################
library(ggplot2)
NEI <- readRDS("summarySCC_PM25.rds")
SCC <- readRDS("Source_Classification_Code.rds")
scc_motor_vehicle <- unique(subset(SCC, EI.Sector %in% c(
"Mobile - On-Road Diesel Heavy Duty Vehicles",
"Mobile - On-Road Diesel Light Duty ... |
#### Preamble ####
# Purpose: Prepare and clean the survey data downloaded from https://www.voterstudygroup.org/downloads?key=dd05a560-c382-42f1-a3e4-7e5318f9781a
# (UCLA + Democracy Fund)
# Author: Lisa Oh, Saksham Ahluwalia, Labib Chowdhury, Eric Yuan
# Data: 2 November 2020
# Contact: ishmamlabib.chowdhury@mail.utor... | /data-cleaning/01-data_cleaning-survey1.R | no_license | labib-c/US-Presidential-Election-2020-Popular-Vote-Prediction | R | false | false | 5,301 | r | #### Preamble ####
# Purpose: Prepare and clean the survey data downloaded from https://www.voterstudygroup.org/downloads?key=dd05a560-c382-42f1-a3e4-7e5318f9781a
# (UCLA + Democracy Fund)
# Author: Lisa Oh, Saksham Ahluwalia, Labib Chowdhury, Eric Yuan
# Data: 2 November 2020
# Contact: ishmamlabib.chowdhury@mail.utor... |
.onLoad =
function(...)
{
.Call("R_GlobalParams_init")
}
| /R/onLoad.R | no_license | dsidavis/Rrawpoppler | R | false | false | 61 | r | .onLoad =
function(...)
{
.Call("R_GlobalParams_init")
}
|
library(EBImage)
setwd("~/SatelitPusat/code/")
rm(list = ls())
PAT = "../dependent/"
fn = dir(PAT,pattern = "A_tabel")
data_full = list()
for(i in 1:length(fn)){
load(file = sprintf("../dependent/%s",fn[i]))
data_full[[i]] = A_tabel
}
names(data_full) = fn
x11()
par(mfrow = c(1,3))
image(data_full[[1]]$Luas_bine... | /code/Tracking.R | no_license | yosiknorman/identifikasi_cluster | R | false | false | 1,061 | r | library(EBImage)
setwd("~/SatelitPusat/code/")
rm(list = ls())
PAT = "../dependent/"
fn = dir(PAT,pattern = "A_tabel")
data_full = list()
for(i in 1:length(fn)){
load(file = sprintf("../dependent/%s",fn[i]))
data_full[[i]] = A_tabel
}
names(data_full) = fn
x11()
par(mfrow = c(1,3))
image(data_full[[1]]$Luas_bine... |
library(quantmod)
setSymbolLookup(GZMT=list(name='600519.ss',src='yahoo'))
getSymbols("GZMT")
## [1] "GZMT"
head(GZMT)
## 600519.SS.Open 600519.SS.High 600519.SS.Low ... 600519.SS.Adjusted
## 2007-01-01 85.48999 92.10000 84.56003 ... 56.11134
## 2007-01-02 85.48999 ... | /Chapter 12/code.r | no_license | databasetable/Predictive-Practice-With-R | R | false | false | 3,823 | r | library(quantmod)
setSymbolLookup(GZMT=list(name='600519.ss',src='yahoo'))
getSymbols("GZMT")
## [1] "GZMT"
head(GZMT)
## 600519.SS.Open 600519.SS.High 600519.SS.Low ... 600519.SS.Adjusted
## 2007-01-01 85.48999 92.10000 84.56003 ... 56.11134
## 2007-01-02 85.48999 ... |
source("code/log_smk.R")
hp_perf <- readRDS(snakemake@input[["rds"]])
hp_plot_list <- lapply(hp_perf$params, function(param) {
mikropml::plot_hp_performance(
hp_perf$dat,
!!rlang::sym(param),
!!rlang::sym(hp_perf$metric)
) +
ggplot2::theme_classic() +
ggplot2::scale_color_brewer(palette = "Dark2... | /code/plot_hp_perf.R | permissive | SchlossLab/Barron_IBD-CDI_mBio_2022 | R | false | false | 560 | r | source("code/log_smk.R")
hp_perf <- readRDS(snakemake@input[["rds"]])
hp_plot_list <- lapply(hp_perf$params, function(param) {
mikropml::plot_hp_performance(
hp_perf$dat,
!!rlang::sym(param),
!!rlang::sym(hp_perf$metric)
) +
ggplot2::theme_classic() +
ggplot2::scale_color_brewer(palette = "Dark2... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/script_objects.R
\name{Operation.metadata}
\alias{Operation.metadata}
\title{Operation.metadata Object}
\usage{
Operation.metadata()
}
\value{
Operation.metadata object
}
\description{
Operation.metadata Object
}
\details{
Autogenerated via \... | /googlescriptv1.auto/man/Operation.metadata.Rd | permissive | Phippsy/autoGoogleAPI | R | false | true | 495 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/script_objects.R
\name{Operation.metadata}
\alias{Operation.metadata}
\title{Operation.metadata Object}
\usage{
Operation.metadata()
}
\value{
Operation.metadata object
}
\description{
Operation.metadata Object
}
\details{
Autogenerated via \... |
## Caching inverse of a Matrix
## Programming Assignment # 2, Week 3
## functions to save inverse of a matrix and calculate inverse
## Creates object to cache inverse of matrix
makeCacheMatrix <- function(x = matrix()) {
invM <- NULL
set <- function(y) {
x <<- y
invM <<- NULL
}
get <- function() x
s... | /cachematrix.R | no_license | k8andrews/ProgrammingAssignment2 | R | false | false | 917 | r | ## Caching inverse of a Matrix
## Programming Assignment # 2, Week 3
## functions to save inverse of a matrix and calculate inverse
## Creates object to cache inverse of matrix
makeCacheMatrix <- function(x = matrix()) {
invM <- NULL
set <- function(y) {
x <<- y
invM <<- NULL
}
get <- function() x
s... |
testlist <- list(lims = structure(0, .Dim = c(1L, 1L)), points = structure(c(0, 0, 0, 0, 0, 0, 0, 5.43164610119136e-312, 2.39844110096982e-191, 3.7897936700692e+132, 1.2136247081527e+132, 9.22196376732227e-240, 0, 0, 0, 0, 0, 0), .Dim = c(2L, 9L)))
result <- do.call(palm:::pbc_distances,testlist)
str(result) | /palm/inst/testfiles/pbc_distances/libFuzzer_pbc_distances/pbc_distances_valgrind_files/1612988713-test.R | no_license | akhikolla/updatedatatype-list2 | R | false | false | 312 | r | testlist <- list(lims = structure(0, .Dim = c(1L, 1L)), points = structure(c(0, 0, 0, 0, 0, 0, 0, 5.43164610119136e-312, 2.39844110096982e-191, 3.7897936700692e+132, 1.2136247081527e+132, 9.22196376732227e-240, 0, 0, 0, 0, 0, 0), .Dim = c(2L, 9L)))
result <- do.call(palm:::pbc_distances,testlist)
str(result) |
# metaphlan_bubbleplot.R
# R script to generate a bubbleplot using a NMDS formatted table as input
library(ggplot2)
library(reshape)
# Read data
setwd("C:/Users/lythl/Desktop/Honours 2016/Project_work/functional_analysis/metaphlan2/bubbleplot")
filename = "metaphlan2.class.nmds"
metaphlan.dat=read.delim(file... | /Bubbleplots/metaphlan_bubbleplot.R | no_license | anyone1985/Antarctica_scripts | R | false | false | 2,152 | r | # metaphlan_bubbleplot.R
# R script to generate a bubbleplot using a NMDS formatted table as input
library(ggplot2)
library(reshape)
# Read data
setwd("C:/Users/lythl/Desktop/Honours 2016/Project_work/functional_analysis/metaphlan2/bubbleplot")
filename = "metaphlan2.class.nmds"
metaphlan.dat=read.delim(file... |
#################################
#Examples of plots using ggplot2#
#################################
#Create data
n <- 1000
df <- data.frame(y = 1:n)
df$x <- df$y - 0.01*df$y^2 + rnorm(n, 0, 500)
#Import library
library(ggplot2)
##Scatter plot
p = ggplot(df,aes(x = x,y = y)) +
xlab("x") +
ylab("... | /DataScienceIntro/lecture-04_EDA and Ggplot/codealong/types-of-scatterplots.R | no_license | christianmconroy/Georgetown-Coursework | R | false | false | 1,452 | r | #################################
#Examples of plots using ggplot2#
#################################
#Create data
n <- 1000
df <- data.frame(y = 1:n)
df$x <- df$y - 0.01*df$y^2 + rnorm(n, 0, 500)
#Import library
library(ggplot2)
##Scatter plot
p = ggplot(df,aes(x = x,y = y)) +
xlab("x") +
ylab("... |
f <- function() NULL
g <- function() cat("!")
test_that("expect = NA checks for no output", {
expect_success(expect_output(f(), NA))
expect_failure(expect_output(g(), NA), "produced output")
})
test_that("expect = NULL checks for some output", {
expect_failure(expect_output(f(), NULL), "produced no output")
e... | /tests/testthat/test-expect-output.R | permissive | ianmcook/testthat | R | false | false | 1,511 | r | f <- function() NULL
g <- function() cat("!")
test_that("expect = NA checks for no output", {
expect_success(expect_output(f(), NA))
expect_failure(expect_output(g(), NA), "produced output")
})
test_that("expect = NULL checks for some output", {
expect_failure(expect_output(f(), NULL), "produced no output")
e... |
#required libs
library(caret)
library(pROC)
library(mlbench)
data <- read.csv(file.choose(), header = TRUE)
str(data)
set.seed(122)
ind<-sample(2,nrow(data),replace = TRUE,prob = c(0.7,0.3))
train<-data[ind==1,]
test<-data[ind==2,]
#kNN
trControl<-trainControl(method="repeatedcv",
number=5,
... | /KNN.R | no_license | laukikupadhye/PredictionStockMarket-Classification | R | false | false | 672 | r | #required libs
library(caret)
library(pROC)
library(mlbench)
data <- read.csv(file.choose(), header = TRUE)
str(data)
set.seed(122)
ind<-sample(2,nrow(data),replace = TRUE,prob = c(0.7,0.3))
train<-data[ind==1,]
test<-data[ind==2,]
#kNN
trControl<-trainControl(method="repeatedcv",
number=5,
... |
## remove outliers -----------------------------------------------------------
bond_data <- filter(bond_data, !pu_compra == 0)
bond_data <- filter(bond_data, !pu_venda == 0)
| /src/datapreparation/step_04_data_cleaning.R | permissive | RodriGonca/Tesouro-Direto-Explorer | R | false | false | 175 | r |
## remove outliers -----------------------------------------------------------
bond_data <- filter(bond_data, !pu_compra == 0)
bond_data <- filter(bond_data, !pu_venda == 0)
|
### PH250B ~ Week 11, Topic 1. Problem set, Problem 2
# step 1: put the numbers together.
?matrix
youngr_strata <-
matrix(c(20, 60, 6, 36), nrow = 2, byrow = T,
dimnames = list(c("Exposed", "Unexposed"),
c("Preterm", "Term")))
# View output
youngr_strata
View(youngr_strata)
old... | /PH250B_chisq_prob2.R | no_license | Averysaurus/epi_stuff | R | false | false | 4,131 | r | ### PH250B ~ Week 11, Topic 1. Problem set, Problem 2
# step 1: put the numbers together.
?matrix
youngr_strata <-
matrix(c(20, 60, 6, 36), nrow = 2, byrow = T,
dimnames = list(c("Exposed", "Unexposed"),
c("Preterm", "Term")))
# View output
youngr_strata
View(youngr_strata)
old... |
library(forecast)
library(readxl)
salesdata <- read_excel("C:/Users/User/Downloads/SalesData.xlsx", sheet=1, col_names = TRUE)
View(salesdata)
salest<-data.frame(salesdata$OrderDate,salesdata$Sales)
salests<-ts(salest[,-1],frequency =24,start=c(2014, 01),end=c(2018, 01))
head(salests)
plot(salests,xlab="Ye... | /master_project.R | no_license | singhals912/Time-series-forecasting | R | false | false | 1,508 | r | library(forecast)
library(readxl)
salesdata <- read_excel("C:/Users/User/Downloads/SalesData.xlsx", sheet=1, col_names = TRUE)
View(salesdata)
salest<-data.frame(salesdata$OrderDate,salesdata$Sales)
salests<-ts(salest[,-1],frequency =24,start=c(2014, 01),end=c(2018, 01))
head(salests)
plot(salests,xlab="Ye... |
# Rfun_rga2pwr
# 2020-04-11
#
#
#' @name rga2pwr
#' @title Power Analysis for Graphical Approaches and Reverse Graphical Approaches with Two Hypotheses
#' @description Power Analysis for Graphical Approaches and Reverse Graphical Approaches with Two Hypotheses
#' @param w a vector of initial weights
#' @param G a matri... | /R/Rfun_rga2pwr.R | no_license | cran/regrap | R | false | false | 2,913 | r | # Rfun_rga2pwr
# 2020-04-11
#
#
#' @name rga2pwr
#' @title Power Analysis for Graphical Approaches and Reverse Graphical Approaches with Two Hypotheses
#' @description Power Analysis for Graphical Approaches and Reverse Graphical Approaches with Two Hypotheses
#' @param w a vector of initial weights
#' @param G a matri... |
##########################################################
### ###
### number of nodes ###
### ###
##########################################################
########################... | /R/BCR/4.simulation.prior.R | no_license | bitmask/B-NEM | R | false | false | 25,842 | r | ##########################################################
### ###
### number of nodes ###
### ###
##########################################################
########################... |
library(glmnet)
mydata = read.table("./TrainingSet/Correlation/bone.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.85,family="gaussian",standardize=TRUE)
sink('./Model/EN/Correlation/bone/bone_087.txt',append=T... | /Model/EN/Correlation/bone/bone_087.R | no_license | leon1003/QSMART | R | false | false | 354 | r | library(glmnet)
mydata = read.table("./TrainingSet/Correlation/bone.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.85,family="gaussian",standardize=TRUE)
sink('./Model/EN/Correlation/bone/bone_087.txt',append=T... |
library(readxl)
#View the Data with tidyr::glimpse()
#The tidyverse offers a user-friendly way to view this data with the
#glimpse() function that is part of the tibble package.
#To use this package, we will need to load it for use in our current session.
#But rather than loading this package alone,
#we can lo... | /Explore data as in Excel.R | no_license | sivakumar-ssk/R-Programming-Basics | R | false | false | 1,336 | r | library(readxl)
#View the Data with tidyr::glimpse()
#The tidyverse offers a user-friendly way to view this data with the
#glimpse() function that is part of the tibble package.
#To use this package, we will need to load it for use in our current session.
#But rather than loading this package alone,
#we can lo... |
### coronavirus impacts
#### plotting instances of default in May####
pulse_data_weight <- read_csv("pulse2020_repwgt_puf_10.csv")
pulse_data <- read_csv("pulse2020_puf_10.csv")
pulse_data$EST_ST
# wether rent/mortgage was paid on due date. 1=yes, 2=no, remove -88 & -99
pulse_data$MORTLMTH
pulse_data_2 <- pulse_d... | /coronavirus_effects_update.R | no_license | cotrag/cor_eff | R | false | false | 7,895 | r | ### coronavirus impacts
#### plotting instances of default in May####
pulse_data_weight <- read_csv("pulse2020_repwgt_puf_10.csv")
pulse_data <- read_csv("pulse2020_puf_10.csv")
pulse_data$EST_ST
# wether rent/mortgage was paid on due date. 1=yes, 2=no, remove -88 & -99
pulse_data$MORTLMTH
pulse_data_2 <- pulse_d... |
library(graphkernels)
### Name: CalculateVertexEdgeHistGaussKernel
### Title: Gaussian RBF kernel between vertex-edge label histograms
### Aliases: CalculateVertexEdgeHistGaussKernel
### Keywords: graph kernel vertex-edge label histogram Gaussian kernel RBF
### kernel
### ** Examples
data(mutag)
K <- CalculateVer... | /data/genthat_extracted_code/graphkernels/examples/CalculateVertexEdgeHistGaussKernel.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 357 | r | library(graphkernels)
### Name: CalculateVertexEdgeHistGaussKernel
### Title: Gaussian RBF kernel between vertex-edge label histograms
### Aliases: CalculateVertexEdgeHistGaussKernel
### Keywords: graph kernel vertex-edge label histogram Gaussian kernel RBF
### kernel
### ** Examples
data(mutag)
K <- CalculateVer... |
map = function( xyz, cfa.regions=T, depthcontours=T, pts=NULL, colpts=F, annot=NULL, annot.cex=2.2,
leg = NULL, projection = "utm20", col.regions=F, at=0:1,
fn=paste("map", trunc(runif(1)*1e8), sep=""), loc=tempdir(),
corners=NULL, rez=c(1,1), spatial.domain="SS... | /spacetime/src/_Rfunctions/maps.lattice/map.r | no_license | fernandomayer/ecomod | R | false | false | 5,032 | r |
map = function( xyz, cfa.regions=T, depthcontours=T, pts=NULL, colpts=F, annot=NULL, annot.cex=2.2,
leg = NULL, projection = "utm20", col.regions=F, at=0:1,
fn=paste("map", trunc(runif(1)*1e8), sep=""), loc=tempdir(),
corners=NULL, rez=c(1,1), spatial.domain="SS... |
#Setting the working directory
#Change this to ping a github account perhaps?
setwd("C:/Users/Kyle/Desktop/Datathon/")
library(RCurl)
library(foreign)
#Loading data gfrom github
#Instructions from: http://www.r-bloggers.com/data-on-github-the-easy-way-to-make-your-data-available/
#url <- "https://raw.githubu... | /Asylum_Seeking_Acceptance_Rate.R | no_license | muc-fluechtlingsrat/data-visualization | R | false | false | 2,625 | r | #Setting the working directory
#Change this to ping a github account perhaps?
setwd("C:/Users/Kyle/Desktop/Datathon/")
library(RCurl)
library(foreign)
#Loading data gfrom github
#Instructions from: http://www.r-bloggers.com/data-on-github-the-easy-way-to-make-your-data-available/
#url <- "https://raw.githubu... |
library(tidyr)
library(dplyr)
library(lubridate)
library(reshape2)
library(ggplot2)
library(nortest)
library(lmtest)
library(cars)
library("e1071")
library(caret)
sales <- read.csv(file="sales.csv", header=TRUE, sep=",")
cp <- read.csv(file="comp_prices.csv", header=TRUE, sep=",")
str(sales)
str(cp)
... | /Trabalho1.R | no_license | Alexlgirao/Analise-preditiva | R | false | false | 5,279 | r | library(tidyr)
library(dplyr)
library(lubridate)
library(reshape2)
library(ggplot2)
library(nortest)
library(lmtest)
library(cars)
library("e1071")
library(caret)
sales <- read.csv(file="sales.csv", header=TRUE, sep=",")
cp <- read.csv(file="comp_prices.csv", header=TRUE, sep=",")
str(sales)
str(cp)
... |
corr <- function(directory, threshold = 0) {
alldir <- dir(directory)
result <- c()
for(i in alldir) {
data <- read.csv(file.path(directory, i))
cdata <- complete.cases(data)
allcdata <- sum(cdata)
gooddata <- na.omit(data)
if(allcdata > threshold){
output... | /corr.R | no_license | Ruoyangzou/datasciencecoursera | R | false | false | 454 | r | corr <- function(directory, threshold = 0) {
alldir <- dir(directory)
result <- c()
for(i in alldir) {
data <- read.csv(file.path(directory, i))
cdata <- complete.cases(data)
allcdata <- sum(cdata)
gooddata <- na.omit(data)
if(allcdata > threshold){
output... |
% Generated by roxygen2 (4.0.2): do not edit by hand
\name{test_feas_vec}
\alias{test_feas_vec}
\title{Test constraints violation (vectorized)}
\usage{
test_feas_vec(cst, equality = FALSE, tolConstraints = NULL)
}
\arguments{
\item{cst}{matrix of constraints (one column for each constraint function)}
\item{e... | /man/test_feas_vec.Rd | no_license | glaucogoncalves/DiceOptim | R | false | false | 862 | rd | % Generated by roxygen2 (4.0.2): do not edit by hand
\name{test_feas_vec}
\alias{test_feas_vec}
\title{Test constraints violation (vectorized)}
\usage{
test_feas_vec(cst, equality = FALSE, tolConstraints = NULL)
}
\arguments{
\item{cst}{matrix of constraints (one column for each constraint function)}
\item{e... |
#####Packages
install.packages("lme4")
install.packages("pbkrtest")
install.packages("MuMIn")
install.packages("nlme")
library(lme4)
library(tidyverse)
library(pbkrtest)
library(MuMIn)
library(nlme)
library(LMERConvenienceFunctions)
#####Input Data
glm.tempdata <- read.csv("cleaned data\\growthrate.tempdata.csv")
head... | /04-glmm_analysis.R | no_license | samhillman/sapro-analysis | R | false | false | 5,085 | r | #####Packages
install.packages("lme4")
install.packages("pbkrtest")
install.packages("MuMIn")
install.packages("nlme")
library(lme4)
library(tidyverse)
library(pbkrtest)
library(MuMIn)
library(nlme)
library(LMERConvenienceFunctions)
#####Input Data
glm.tempdata <- read.csv("cleaned data\\growthrate.tempdata.csv")
head... |
library(RColorBrewer)
library(plyr)
library(ggplot2)
parse_imen <- function(x) {
read.table(x, header=T)
}
## Make a data frame of locus missingness data
make_fpath <- function(base, basedir) {
fpath <- paste( basedir, base, '.imiss', sep = '' )
return(fpath)
}
## MAIN
proj.dir <- '/nas40t0/vasya/pgrn_seq/qc_r... | /scripts/sample.missingness.plot.R | no_license | v-a-s-a/pgrn-seq | R | false | false | 1,836 | r | library(RColorBrewer)
library(plyr)
library(ggplot2)
parse_imen <- function(x) {
read.table(x, header=T)
}
## Make a data frame of locus missingness data
make_fpath <- function(base, basedir) {
fpath <- paste( basedir, base, '.imiss', sep = '' )
return(fpath)
}
## MAIN
proj.dir <- '/nas40t0/vasya/pgrn_seq/qc_r... |
library(ggplot2)
library(tidyverse)
library(randomForest)
library(caret)
library(rpart)
library(rpart.plot)
library(RColorBrewer)
library(visdat)
library(naniar)
library(simputation)
library(VSURF)
library(zoo)
library(lubridate)
library(Hmisc)
library(ranger)
library(missRanger)
library(pdp)
library(doParallel)
libr... | /Assignment 1/korilium/study_claim_amount_in_dataset.r | no_license | PIPCE/Advanced-Analytics-in-Business | R | false | false | 6,673 | r |
library(ggplot2)
library(tidyverse)
library(randomForest)
library(caret)
library(rpart)
library(rpart.plot)
library(RColorBrewer)
library(visdat)
library(naniar)
library(simputation)
library(VSURF)
library(zoo)
library(lubridate)
library(Hmisc)
library(ranger)
library(missRanger)
library(pdp)
library(doParallel)
libr... |
library(shiny)
library(datasets)
mpgData <- mtcars
mpgData$am <- factor(mpgData$am, labels = c("Auto_trans", "Man_trans"))
shinyServer(function(input, output)
{
formulaText<-reactive( {paste("mpg ~", input$variable)} )
formulaTextPoint<-reactive( {paste("mpg ~", input$variable)} )
fit<-reactive... | /server.R | no_license | Mounik1707/Dev-data-prod-week4 | R | false | false | 718 | r | library(shiny)
library(datasets)
mpgData <- mtcars
mpgData$am <- factor(mpgData$am, labels = c("Auto_trans", "Man_trans"))
shinyServer(function(input, output)
{
formulaText<-reactive( {paste("mpg ~", input$variable)} )
formulaTextPoint<-reactive( {paste("mpg ~", input$variable)} )
fit<-reactive... |
\name{specials}
\alias{noSpecial}
\alias{tikzSpecial}
\title{
DVI specials handlers
}
\description{
These objects represent different handlers for processing
special operations within DVI output.
The \code{noSpecial} handler does nothing.
The \code{tikzSpecial} handler processes specials that
represent T... | /man/specials.Rd | no_license | pmur002/dvir | R | false | false | 474 | rd | \name{specials}
\alias{noSpecial}
\alias{tikzSpecial}
\title{
DVI specials handlers
}
\description{
These objects represent different handlers for processing
special operations within DVI output.
The \code{noSpecial} handler does nothing.
The \code{tikzSpecial} handler processes specials that
represent T... |
install.packages("dplyr")
# R Statistical Programming and Data Managment Language
library(dplyr)
sessionInfo()
mtcarsmtcars %>% head()
mtcars %>% dim()
mtcars %>% nrow()
mtcars %>% ncol()
mtcars %>% names()
mtcars %>% class()
mtcars %>% summary()
iris %>% summary()
iris %>% glimpse()
filter(iris,Species == "Setosa")
ir... | /Week1.R | no_license | JackCantillon/MA4128 | R | false | false | 862 | r | install.packages("dplyr")
# R Statistical Programming and Data Managment Language
library(dplyr)
sessionInfo()
mtcarsmtcars %>% head()
mtcars %>% dim()
mtcars %>% nrow()
mtcars %>% ncol()
mtcars %>% names()
mtcars %>% class()
mtcars %>% summary()
iris %>% summary()
iris %>% glimpse()
filter(iris,Species == "Setosa")
ir... |
\docType{data}
\name{SoAm_country}
\alias{SoAm_country}
\title{Country codes for all of SoAm}
\description{
Country codes for all of SoAm
}
\keyword{datasets}
| /man/SoAm_country.Rd | no_license | cran/rWBclimate | R | false | false | 160 | rd | \docType{data}
\name{SoAm_country}
\alias{SoAm_country}
\title{Country codes for all of SoAm}
\description{
Country codes for all of SoAm
}
\keyword{datasets}
|
#' Estimate the mRNA fraction differences for the pair of samples using
#' replicate data
#'
#' @param expDat list, contains input data and stores analysis results
#'
#' @export
#' @examples
#' # After running initDat to initialize the expDat list run the following
#' # command to estimate r_m
#' expDat <- est_r... | /archivedcode/20131216erccdashboard/R/est_r_m.R | no_license | munrosa/one-gene-two-gene | R | false | false | 6,356 | r | #' Estimate the mRNA fraction differences for the pair of samples using
#' replicate data
#'
#' @param expDat list, contains input data and stores analysis results
#'
#' @export
#' @examples
#' # After running initDat to initialize the expDat list run the following
#' # command to estimate r_m
#' expDat <- est_r... |
#cos
#whole qeue
#libaries
library(dplyr)
library(readr)
library(data.table) #for multimerge function
library(tidyr)
library(Metrics)
#setwd
setwd("~/data/cosmo/csv/")
pathcos="~/data/cosmo/csv/"
#Step 1
#merge the needed prediction hours for each run
#createpattern for filenameconditions
createpattern= function... | /scripts/model_qeues/daily/cosqeue.R | no_license | marikemau/RGust | R | false | false | 12,154 | r | #cos
#whole qeue
#libaries
library(dplyr)
library(readr)
library(data.table) #for multimerge function
library(tidyr)
library(Metrics)
#setwd
setwd("~/data/cosmo/csv/")
pathcos="~/data/cosmo/csv/"
#Step 1
#merge the needed prediction hours for each run
#createpattern for filenameconditions
createpattern= function... |
#'AcuityView
#'
#'This function provides a simple method for displaying a visual scene as it may appear to an animal with lower acuity.
#'@param photo The photo you wish to alter; if NULL then a pop up window allows you to navigate to your photo, otherwise include the file path here
#'@param distance The distance from ... | /R/AcuityView.R | no_license | joaoventuraoliveira/AcuityView | R | false | false | 14,543 | r | #'AcuityView
#'
#'This function provides a simple method for displaying a visual scene as it may appear to an animal with lower acuity.
#'@param photo The photo you wish to alter; if NULL then a pop up window allows you to navigate to your photo, otherwise include the file path here
#'@param distance The distance from ... |
# Load libraries
require(raster)
require(rgdal)
require(tidyverse)
require(foreign)
require(sf)
# Functions to use
tblToShp <- function(tbl, nm){
tbl <- as.tibble(tbl)
cnt <- unique(tbl$COUNTRY) %>% as.vector() %>% sort()
uga <- tbl %>% filter(COUNTRY == 'UGANDA')
crd <- uga %>% dplyr::select(LONG, LAT) %>% a... | /06_01_worldclimStations.R | no_license | fabiolexcastro/ugandaAnalysis | R | false | false | 809 | r |
# Load libraries
require(raster)
require(rgdal)
require(tidyverse)
require(foreign)
require(sf)
# Functions to use
tblToShp <- function(tbl, nm){
tbl <- as.tibble(tbl)
cnt <- unique(tbl$COUNTRY) %>% as.vector() %>% sort()
uga <- tbl %>% filter(COUNTRY == 'UGANDA')
crd <- uga %>% dplyr::select(LONG, LAT) %>% a... |
library(sqldf)
setwd("/Users/shrutijv/Shruti/Study/DataScience/datavisualization/")
mysql <- "SELECT * from file WHERE Date = '1/2/2007' OR Date = '2/2/2007'"
data <- read.csv2.sql("household_power_consumption.txt",mysql, sep= ";" ,na.strings = "?")
x <- strptime(paste(data$Date, data$Time), "%d/%m/%Y %H:%M:%S")... | /plot3.R | no_license | shrutijv/ExData_Plotting1 | R | false | false | 747 | r | library(sqldf)
setwd("/Users/shrutijv/Shruti/Study/DataScience/datavisualization/")
mysql <- "SELECT * from file WHERE Date = '1/2/2007' OR Date = '2/2/2007'"
data <- read.csv2.sql("household_power_consumption.txt",mysql, sep= ";" ,na.strings = "?")
x <- strptime(paste(data$Date, data$Time), "%d/%m/%Y %H:%M:%S")... |
library(testthat)
library(ezmmek)
test_that("make ezmmek object", {
expect_s3_class(test <- new_ezmmek_std_group("test_data/tyson_std_04172020.csv",
std_type,
site_name,
... | /tests/testthat/test_new_ezmmek_std_ibc_clean.R | no_license | cran/ezmmek | R | false | false | 500 | r | library(testthat)
library(ezmmek)
test_that("make ezmmek object", {
expect_s3_class(test <- new_ezmmek_std_group("test_data/tyson_std_04172020.csv",
std_type,
site_name,
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{get_from_list}
\alias{get_from_list}
\title{Get from list}
\usage{
get_from_list(lst, what)
}
\arguments{
\item{lst}{list}
\item{what}{object to retrieve (by name or index)}
}
\value{
Element of the list indicated... | /man/get_from_list.Rd | no_license | cran/dateutils | R | false | true | 460 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utils.R
\name{get_from_list}
\alias{get_from_list}
\title{Get from list}
\usage{
get_from_list(lst, what)
}
\arguments{
\item{lst}{list}
\item{what}{object to retrieve (by name or index)}
}
\value{
Element of the list indicated... |
## Beddington-DeAngelis Type-II curve
# X = Number of 'prey' (prey density / concentration)
# Y = Number of prey eaten / consumed / killed / absorbed
## Beddington-DeAngelis Type-II function ##
# Everything except 'X' should be provided.
bdaII <- function(X, a, h, P, T) {
if(is.list(a)){
coefs <- a
... | /R/fr_bdaII.R | no_license | Scopus86/frair | R | false | false | 3,219 | r | ## Beddington-DeAngelis Type-II curve
# X = Number of 'prey' (prey density / concentration)
# Y = Number of prey eaten / consumed / killed / absorbed
## Beddington-DeAngelis Type-II function ##
# Everything except 'X' should be provided.
bdaII <- function(X, a, h, P, T) {
if(is.list(a)){
coefs <- a
... |
\name{DegNorm-plot-functions}
\alias{plot_corr}
\alias{plot_heatmap}
\alias{plot_boxplot}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Degradation index (DI) score plot functions
}
\description{
DegNorm provides three functions for visualization gene-/sample-wise
degradation.
}
\usage{
plot_c... | /man/PlotFunctions.Rd | no_license | jipingw/DegNorm | R | false | false | 1,372 | rd | \name{DegNorm-plot-functions}
\alias{plot_corr}
\alias{plot_heatmap}
\alias{plot_boxplot}
%- Also NEED an '\alias' for EACH other topic documented here.
\title{
Degradation index (DI) score plot functions
}
\description{
DegNorm provides three functions for visualization gene-/sample-wise
degradation.
}
\usage{
plot_c... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/catplotmlx.R
\name{catplotmlx}
\alias{catplotmlx}
\title{Plot Categorical Longitudinal Data}
\usage{
catplotmlx(
r,
col = NULL,
breaks = NULL,
plot = TRUE,
color = "#194280",
group = NULL,
facet = TRUE,
labels = ... | /man/catplotmlx.Rd | no_license | cran/mlxR | R | false | true | 2,619 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/catplotmlx.R
\name{catplotmlx}
\alias{catplotmlx}
\title{Plot Categorical Longitudinal Data}
\usage{
catplotmlx(
r,
col = NULL,
breaks = NULL,
plot = TRUE,
color = "#194280",
group = NULL,
facet = TRUE,
labels = ... |
library(stats)
options(digits = 6)
d<-function(v,beta,mu,N) {
for (i in 1:10000){
x<-v-i*0.0001
ll<-function(delta)
{(((delta^2/(1/(1+exp(-x))^2*(1-1/(1+exp(-x)))^2)+(1-2*1/(1+exp(-x)))^2*delta^4/(4*1/(1+exp(-x))^4*(1-1/(1+exp(-x)))^4)+(1-2*1/(1+exp(-x)))*delta^3/(1/(1+exp(-x))^3*(1-1/(1+exp(-x)))^3... | /Table 1.R | no_license | m-hooshangi/statpaper | R | false | false | 3,403 | r | library(stats)
options(digits = 6)
d<-function(v,beta,mu,N) {
for (i in 1:10000){
x<-v-i*0.0001
ll<-function(delta)
{(((delta^2/(1/(1+exp(-x))^2*(1-1/(1+exp(-x)))^2)+(1-2*1/(1+exp(-x)))^2*delta^4/(4*1/(1+exp(-x))^4*(1-1/(1+exp(-x)))^4)+(1-2*1/(1+exp(-x)))*delta^3/(1/(1+exp(-x))^3*(1-1/(1+exp(-x)))^3... |
##STATEMENT:
# Does this change depending on what we store in an object? What is the class of the following object a <- seq(1, 10)
##ANSWER
# Store the sequence in the object a
a <- seq(1, 10)
# Determine the class of a
class(a)
| /01.DS-R Basics/S2-Vectors, Sorting/2.1 Vectors/10.Exercise.R | no_license | dgpaniagua/data-science-assessments | R | false | false | 232 | r | ##STATEMENT:
# Does this change depending on what we store in an object? What is the class of the following object a <- seq(1, 10)
##ANSWER
# Store the sequence in the object a
a <- seq(1, 10)
# Determine the class of a
class(a)
|
#' Load data from the "Highway Fatality Analysis Reporting System"
#'
#' This is a function that reads a data file from
#' the "US National Highway Traffic Safety Administration's Fatality Analysis Reporting System"
#'
#' @param filename A character string giving the file name/path to load the data from. This can b... | /R/fars_functions.R | no_license | tcoopermont/fars | R | false | false | 5,912 | r | #' Load data from the "Highway Fatality Analysis Reporting System"
#'
#' This is a function that reads a data file from
#' the "US National Highway Traffic Safety Administration's Fatality Analysis Reporting System"
#'
#' @param filename A character string giving the file name/path to load the data from. This can b... |
#' retrieve tbk headers
#'
#' @param tbk_fnames the tbk file names
#'
#' @return an S3 object of class tbk
#'
#' @export
tbk_hdrs <- function(tbk_fnames) {
lapply(tbk_fnames,
function(tbk_fname) {
tbk_file <- file(tbk_fname, "rb")
on.exit(close(tbk_file))
hdr <- tbk_hdr(t... | /R/tbk_hdrs.R | no_license | trichelab/tbmater | R | false | false | 360 | r | #' retrieve tbk headers
#'
#' @param tbk_fnames the tbk file names
#'
#' @return an S3 object of class tbk
#'
#' @export
tbk_hdrs <- function(tbk_fnames) {
lapply(tbk_fnames,
function(tbk_fname) {
tbk_file <- file(tbk_fname, "rb")
on.exit(close(tbk_file))
hdr <- tbk_hdr(t... |
#'nextGen
#'
#'Make the next generation
#'@param pop list, population
#'@param pSelect float, the worse part to remove from the population(default=0.2)
#'@param pMutate float, the probability used to decide number of mutation(default=0.01)
#'@param fitfunc method, model selection method(default is AIC)
#'@param ... | /GA-master/R/Next Generation.R | no_license | esther730/stat243 | R | false | false | 2,310 | r | #'nextGen
#'
#'Make the next generation
#'@param pop list, population
#'@param pSelect float, the worse part to remove from the population(default=0.2)
#'@param pMutate float, the probability used to decide number of mutation(default=0.01)
#'@param fitfunc method, model selection method(default is AIC)
#'@param ... |
#### Setting the working directory into 'UCI HAR Dataset directory' #####
setwd("E:/Coursera/Getting and Cleaning data course project/UCI HAR Dataset")
list.files()
list.dirs()
#### Getting Activity labels and Features ####
activity_labels <- read.table("./activity_labels.txt")
activity_labels[,2] <- as.character(acti... | /run_analysis.R | no_license | johnmutiso/Coursera-Getting-and-Cleaning-Data-project | R | false | false | 1,878 | r | #### Setting the working directory into 'UCI HAR Dataset directory' #####
setwd("E:/Coursera/Getting and Cleaning data course project/UCI HAR Dataset")
list.files()
list.dirs()
#### Getting Activity labels and Features ####
activity_labels <- read.table("./activity_labels.txt")
activity_labels[,2] <- as.character(acti... |
#Download and unzip the zip file
fileURL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip "
download.file(fileURL, destfile = 'dataset.zip',method='curl')
unzip('dataset.zip')
#load the activity and feature information
activities <- read.table("UCI HAR Dataset/activity... | /run_analysis.R | no_license | kbh0204/Getting-and-Cleaning-Data-Course-Project | R | false | false | 2,115 | r | #Download and unzip the zip file
fileURL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip "
download.file(fileURL, destfile = 'dataset.zip',method='curl')
unzip('dataset.zip')
#load the activity and feature information
activities <- read.table("UCI HAR Dataset/activity... |
library(data.table)
library(plotly)
library(dplyr)
library(ggplot2)
library(tidyr)
library(lubridate)
library(stringr)
library(scales)
# LOAD THE DATA
house.data <- fread(file = "./data/train.csv", stringsAsFactors = TRUE)
house.data %>% summary()
####### First look at THE TARGET VARIABLE ######
my.house.data %>%
... | /visualization_script.R | no_license | akay126/ML_housing | R | false | false | 7,191 | r | library(data.table)
library(plotly)
library(dplyr)
library(ggplot2)
library(tidyr)
library(lubridate)
library(stringr)
library(scales)
# LOAD THE DATA
house.data <- fread(file = "./data/train.csv", stringsAsFactors = TRUE)
house.data %>% summary()
####### First look at THE TARGET VARIABLE ######
my.house.data %>%
... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/priorPredictive.R
\name{priorPredictive}
\alias{priorPredictive}
\title{Prior Predictive Samples}
\usage{
priorPredictive(
prior,
eqnfile,
restrictions,
numItems,
level = "data",
N = 1,
M = 100,
nCPU = 4
)
}
\arguments{
\item{... | /man/priorPredictive.Rd | no_license | cran/TreeBUGS | R | false | true | 3,274 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/priorPredictive.R
\name{priorPredictive}
\alias{priorPredictive}
\title{Prior Predictive Samples}
\usage{
priorPredictive(
prior,
eqnfile,
restrictions,
numItems,
level = "data",
N = 1,
M = 100,
nCPU = 4
)
}
\arguments{
\item{... |
OCTOSM <- function(A0,A1,A2,A3,A4,A5,A6,A7,G0,G1,G2,G3,E4,E5,E6,E7)
{
D1=(A0*G0-A1*G1-A2*G2-A3*G3)-(E4*A4-(-1*E5)*A5-(-1*E6)*A6-(-1*E7)*A7)
D2=(A0*G1+A1*G0+A2*G3-A3*G2)-(E4*A5+(-1*E5)*A4+(-1*E6)*A7-(-1*E7)*A6)
D3=(A0*G2-A1*G3+A2*G0+A3*G1)-(E4*A6-(-1*E5)*A7+(-1*E6)*A4+(-1*E7)*A5)
D4=(A0*G3+A1*G2-A2*G1+A3*G0)-(... | /STRINGHYPERCOMP/SCRIPTS/RHYPERCOMPLEXSTRING.R | permissive | efaysal/efaysal.github.io | R | false | false | 9,013 | r | OCTOSM <- function(A0,A1,A2,A3,A4,A5,A6,A7,G0,G1,G2,G3,E4,E5,E6,E7)
{
D1=(A0*G0-A1*G1-A2*G2-A3*G3)-(E4*A4-(-1*E5)*A5-(-1*E6)*A6-(-1*E7)*A7)
D2=(A0*G1+A1*G0+A2*G3-A3*G2)-(E4*A5+(-1*E5)*A4+(-1*E6)*A7-(-1*E7)*A6)
D3=(A0*G2-A1*G3+A2*G0+A3*G1)-(E4*A6-(-1*E5)*A7+(-1*E6)*A4+(-1*E7)*A5)
D4=(A0*G3+A1*G2-A2*G1+A3*G0)-(... |
##
## Script requires the file "household_power_consumption.txt" has been downloaded from
## https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip
## and decompressed in the same directory where the script runs.
##
## Reads file loading in memory only rows having Date 1/2/2007 or 2/2/20... | /plot2.R | no_license | yusyus/ExData_Plotting1 | R | false | false | 1,156 | r | ##
## Script requires the file "household_power_consumption.txt" has been downloaded from
## https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip
## and decompressed in the same directory where the script runs.
##
## Reads file loading in memory only rows having Date 1/2/2007 or 2/2/20... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utilities-data-validation.R
\name{checkNValidity}
\alias{checkNValidity}
\title{Check validity of n}
\usage{
checkNValidity(n)
}
\arguments{
\item{n}{the input n from te user}
}
\value{
n, if n is a positive whole number
}
\description{
n sho... | /man/checkNValidity.Rd | no_license | privacytoolsproject/PSI-Library | R | false | true | 384 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/utilities-data-validation.R
\name{checkNValidity}
\alias{checkNValidity}
\title{Check validity of n}
\usage{
checkNValidity(n)
}
\arguments{
\item{n}{the input n from te user}
}
\value{
n, if n is a positive whole number
}
\description{
n sho... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Bicluster.R
\name{.runDiscretization}
\alias{.runDiscretization}
\title{run discretization}
\usage{
.runDiscretization(object = NULL, q = 0.06, LogTransformation = FALSE)
}
\arguments{
\item{q}{}
}
\description{
run discretization
}
| /man/dot-runDiscretization.Rd | no_license | BMEngineeR/IRISCEM | R | false | true | 311 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/Bicluster.R
\name{.runDiscretization}
\alias{.runDiscretization}
\title{run discretization}
\usage{
.runDiscretization(object = NULL, q = 0.06, LogTransformation = FALSE)
}
\arguments{
\item{q}{}
}
\description{
run discretization
}
|
library(tibble)
library(dplyr)
bd <- tibble(
empresas = c(rep("X", 500), rep("X", 30), rep("Y", 4500), rep("Y", 270),
rep("Z", 1500), rep("Z", 50)),
entregas = c(rep("normal", 500), rep("defeito", 30), rep("normal", 4500),
rep("defeito", 270), rep("normal", 1500), rep("defeito", 50)... | /2021/aula01.R | no_license | albnc/STT5898 | R | false | false | 805 | r | library(tibble)
library(dplyr)
bd <- tibble(
empresas = c(rep("X", 500), rep("X", 30), rep("Y", 4500), rep("Y", 270),
rep("Z", 1500), rep("Z", 50)),
entregas = c(rep("normal", 500), rep("defeito", 30), rep("normal", 4500),
rep("defeito", 270), rep("normal", 1500), rep("defeito", 50)... |
context("Data")
test_that("stringsAsFactors doesn't affect results", {
sAF <- getOption("stringsAsFactors")
dat.character <- data.frame(x = letters[5:1], y = 1:5, stringsAsFactors = FALSE)
dat.factor <- data.frame(x = letters[5:1], y = 1:5, stringsAsFactors = TRUE)
base <- ggplot(mapping = aes(x, y))... | /tests/testthat/test-data.r | no_license | bbolker/ggplot2 | R | false | false | 964 | r | context("Data")
test_that("stringsAsFactors doesn't affect results", {
sAF <- getOption("stringsAsFactors")
dat.character <- data.frame(x = letters[5:1], y = 1:5, stringsAsFactors = FALSE)
dat.factor <- data.frame(x = letters[5:1], y = 1:5, stringsAsFactors = TRUE)
base <- ggplot(mapping = aes(x, y))... |
#' Panel Wrapper Function
#' Wrapper function to specify a plot object for a panel for use in dplyr summarise()
#'
#' @param x a plot object
#' @examples
#' \dontrun{
#' library(rbokeh)
#' library(dplyr)
#' ggplot2::mpg %>%
#' group_by(manufacturer, class) %>%
#' summarise(
#' panel = panel(
#' figure(xl... | /R/helpers.R | no_license | andreaangeli/trelliscopejs | R | false | false | 10,110 | r |
#' Panel Wrapper Function
#' Wrapper function to specify a plot object for a panel for use in dplyr summarise()
#'
#' @param x a plot object
#' @examples
#' \dontrun{
#' library(rbokeh)
#' library(dplyr)
#' ggplot2::mpg %>%
#' group_by(manufacturer, class) %>%
#' summarise(
#' panel = panel(
#' figure(xl... |
#' @title BCa confidence interval
#' @useDynLib SC19009
#' @description A function calculating BCa confidence interval for population mean using R
#' @import Rcpp
#' @importFrom stats pnorm qnorm quantile
#' @param x a vector composed of random sample points
#' @param alpha confidence level
#' @param B number of bootst... | /R/Function_1.R | no_license | SC19009/SC19009 | R | false | false | 1,172 | r | #' @title BCa confidence interval
#' @useDynLib SC19009
#' @description A function calculating BCa confidence interval for population mean using R
#' @import Rcpp
#' @importFrom stats pnorm qnorm quantile
#' @param x a vector composed of random sample points
#' @param alpha confidence level
#' @param B number of bootst... |
ml.nbc <- function(formula, data, start = NULL, verbose = FALSE) {
mf <- model.frame(formula, data)
mt <- attr(mf, "terms")
y <- model.response(mf, "numeric")
nbcX <- model.matrix(formula, data = data)
nbc.reg.ml <- function(b.hat, X, y) {
a.hat <- b.hat[1]
xb.hat <- X %*% b.hat[-1]
mu.hat... | /inst/HILBE_SCRIPTS/ml.nbc.r | no_license | cran/COUNT | R | false | false | 1,373 | r | ml.nbc <- function(formula, data, start = NULL, verbose = FALSE) {
mf <- model.frame(formula, data)
mt <- attr(mf, "terms")
y <- model.response(mf, "numeric")
nbcX <- model.matrix(formula, data = data)
nbc.reg.ml <- function(b.hat, X, y) {
a.hat <- b.hat[1]
xb.hat <- X %*% b.hat[-1]
mu.hat... |
#### analysisFunctions #######
LiquidFun <- function(quantityLeft_vec,quantityTotal_vec,liquidity_vec,minUnitValue_vec){
numerator <- sum(quantityLeft_vec*liquidity_vec*minUnitValue_vec)
denominator <- sum(quantityTotal_vec*liquidity_vec*minUnitValue_vec)
ratio <- numerator/denominator
return(ratio)
}
CostDe... | /rscripts/generalFunctions.R | no_license | AcuoFS/acuo-allocation | R | false | false | 52,077 | r | #### analysisFunctions #######
LiquidFun <- function(quantityLeft_vec,quantityTotal_vec,liquidity_vec,minUnitValue_vec){
numerator <- sum(quantityLeft_vec*liquidity_vec*minUnitValue_vec)
denominator <- sum(quantityTotal_vec*liquidity_vec*minUnitValue_vec)
ratio <- numerator/denominator
return(ratio)
}
CostDe... |
############################# CUT KPI (out of scope) #################################
#CUT Function 1: For 1 threshold return KPI indicators
cut_predict_elnet3 <- function(PD,alpha_value,threshold,nb_var){
#Get optimized lambda value
initialize <- filter(PD_train, INC > threshold)
E_VAR <- as.matrix(initial... | /3_Cut.R | no_license | benoitfour07/Elastic_Net | R | false | false | 6,860 | r | ############################# CUT KPI (out of scope) #################################
#CUT Function 1: For 1 threshold return KPI indicators
cut_predict_elnet3 <- function(PD,alpha_value,threshold,nb_var){
#Get optimized lambda value
initialize <- filter(PD_train, INC > threshold)
E_VAR <- as.matrix(initial... |
/1. loadData.R | no_license | bieneSchwarze/BARTforNonresponse | R | false | false | 24,027 | r | ||
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/biglasso.R
\name{big_spLinReg}
\alias{big_spLinReg}
\title{Sparse linear regression}
\usage{
big_spLinReg(
X,
y.train,
ind.train = rows_along(X),
ind.col = cols_along(X),
covar.train = NULL,
base.train = NULL,
pf.X = NULL,
pf.... | /bigstatsr/man/big_spLinReg.Rd | no_license | akhikolla/ClusterTests | R | false | true | 7,463 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/biglasso.R
\name{big_spLinReg}
\alias{big_spLinReg}
\title{Sparse linear regression}
\usage{
big_spLinReg(
X,
y.train,
ind.train = rows_along(X),
ind.col = cols_along(X),
covar.train = NULL,
base.train = NULL,
pf.X = NULL,
pf.... |
# a function for cleaner, more comparable strings
clean_string <- . %>%
str_c(collapse = " ") %>%
# make sure sentences are ended
str_replace_all("\\t|\\\n", " ") %>%
#str_replace_all("\\.([A-z])", ". \\1") %>%
# remvove numbers and specials (keep only text and basic punctuation)
str_remove_all("\\\\") %... | /functions/clean_string.R | no_license | zoeang/rulemaking | R | false | false | 826 | r | # a function for cleaner, more comparable strings
clean_string <- . %>%
str_c(collapse = " ") %>%
# make sure sentences are ended
str_replace_all("\\t|\\\n", " ") %>%
#str_replace_all("\\.([A-z])", ". \\1") %>%
# remvove numbers and specials (keep only text and basic punctuation)
str_remove_all("\\\\") %... |
## Imports ----
library(tidyverse)
library(here)
library(ggsci)
source(here::here("code", "utils.R"))
source(here::here("code", "mk_nytimes.R"))
fs::dir_create("./output")
## Data ----
tract_df <- bind_rows(readRDS(here::here("data", "sensitivity_data_tract_all.RDS")),
readRDS(here::here("data",... | /code/91_sensitivity_fig1.R | no_license | mkiang/opioid_treatment_distance | R | false | false | 4,299 | r | ## Imports ----
library(tidyverse)
library(here)
library(ggsci)
source(here::here("code", "utils.R"))
source(here::here("code", "mk_nytimes.R"))
fs::dir_create("./output")
## Data ----
tract_df <- bind_rows(readRDS(here::here("data", "sensitivity_data_tract_all.RDS")),
readRDS(here::here("data",... |
#' @include roxygen.config.R
NULL
#' MStack
#' @export
MInstructionStack <- R6Class(
classname = "MInstructionStack",
inherit = MStack,
cloneable = F,
public = list(
add = function(data) {
stopifnot("Instruction" %in% class(data))
private$env[[length(private$env) + 1]] <- data
}
)
)
| /Mdata/R/MInstructionStack.R | no_license | pashkovds/mdlibs | R | false | false | 315 | r | #' @include roxygen.config.R
NULL
#' MStack
#' @export
MInstructionStack <- R6Class(
classname = "MInstructionStack",
inherit = MStack,
cloneable = F,
public = list(
add = function(data) {
stopifnot("Instruction" %in% class(data))
private$env[[length(private$env) + 1]] <- data
}
)
)
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/servicediscovery_operations.R
\name{servicediscovery_create_private_dns_namespace}
\alias{servicediscovery_create_private_dns_namespace}
\title{Creates a private namespace based on DNS, which will be visible only
inside a specified Amazon VPC... | /cran/paws.networking/man/servicediscovery_create_private_dns_namespace.Rd | permissive | johnnytommy/paws | R | false | true | 1,877 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/servicediscovery_operations.R
\name{servicediscovery_create_private_dns_namespace}
\alias{servicediscovery_create_private_dns_namespace}
\title{Creates a private namespace based on DNS, which will be visible only
inside a specified Amazon VPC... |
#' Build ggplot for rendering.
#'
#' \code{ggplot_build} takes the plot object, and performs all steps necessary
#' to produce an object that can be rendered. This function outputs two pieces:
#' a list of data frames (one for each layer), and a panel object, which
#' contain all information about axis limits, breaks ... | /R/plot-build.r | no_license | dakelkar/ggplot2 | R | false | false | 3,262 | r | #' Build ggplot for rendering.
#'
#' \code{ggplot_build} takes the plot object, and performs all steps necessary
#' to produce an object that can be rendered. This function outputs two pieces:
#' a list of data frames (one for each layer), and a panel object, which
#' contain all information about axis limits, breaks ... |
setwd("/Users/loey/Desktop/Research/FakeNews/Bullshitter/model/lauren/mleFits/")
source("ToMModelFunctions.R")
models.sources = paste0("models/",list.files("models/"))
sapply(models.sources, source)
library(tidyverse)
library(stats4)
bs.final <- read.csv("bsfinal_anon.csv")
humanLie <- bs.final %>%
filter(roleCurre... | /model/lauren/mleFits/optimizeModels_lies.R | no_license | la-oey/Bullshitter | R | false | false | 6,485 | r | setwd("/Users/loey/Desktop/Research/FakeNews/Bullshitter/model/lauren/mleFits/")
source("ToMModelFunctions.R")
models.sources = paste0("models/",list.files("models/"))
sapply(models.sources, source)
library(tidyverse)
library(stats4)
bs.final <- read.csv("bsfinal_anon.csv")
humanLie <- bs.final %>%
filter(roleCurre... |
## File Name: summary_sink.R
## File Version: 0.08
summary_sink <- function( object, file, append=FALSE, ...)
{
osink( file=file, suffix=".Rout", append=append )
summary(object=object, ... )
csink(file=file)
}
| /R/summary_sink.R | no_license | cran/CDM | R | false | false | 232 | r | ## File Name: summary_sink.R
## File Version: 0.08
summary_sink <- function( object, file, append=FALSE, ...)
{
osink( file=file, suffix=".Rout", append=append )
summary(object=object, ... )
csink(file=file)
}
|
# Set working directory to location of vert chemistry data .csv before reading in.
dat<-read.csv("Cleucas_chemistry_data.csv")
dat$Estuary<-factor(dat$Estuary,levels(dat$Estuary)[c(4,2,3,1)])
dat<-dat[,-14]
dat13<-dat[dat$Sampled.Year==2013,]
dat13<-dat13[dat13$Estuary!="Matagorda",]
dat13$Estuary<-droplevels(d... | /scr/M_ANOVA_script.R | no_license | sjoleary/CLE_GSI | R | false | false | 1,715 | r | # Set working directory to location of vert chemistry data .csv before reading in.
dat<-read.csv("Cleucas_chemistry_data.csv")
dat$Estuary<-factor(dat$Estuary,levels(dat$Estuary)[c(4,2,3,1)])
dat<-dat[,-14]
dat13<-dat[dat$Sampled.Year==2013,]
dat13<-dat13[dat13$Estuary!="Matagorda",]
dat13$Estuary<-droplevels(d... |
# Setup -------------------------------------------------------------------
# Load test data
test_results <- read_stats(system.file("test_data/BayesFactor.json",
package = "tidystats"))
# Set options
tolerance <- 0.001
# Load package
library(BayesFactor)
# Load data
data(puzzles)
data(attitude)
data(raceDolls)
... | /tests/testthat/test_BayesFactor.R | permissive | WillemSleegers/tidystats | R | false | false | 6,300 | r |
# Setup -------------------------------------------------------------------
# Load test data
test_results <- read_stats(system.file("test_data/BayesFactor.json",
package = "tidystats"))
# Set options
tolerance <- 0.001
# Load package
library(BayesFactor)
# Load data
data(puzzles)
data(attitude)
data(raceDolls)
... |
library(ellipse)
library(ggplot2)
fsb = function(PFS){
#compute bootstrap factor score from partial factore scores of the inital data
#with a random sequence B
#sample with replacement
B=sample(1:10, 10, replace=TRUE)
FS_B = matrix(data=0, nrow=12, ncol=ncol(PFS[[1]]))
for (i in 1:length(B)){
FS_B = FS... | /mfa/R/bootstrap.R | no_license | ucb243-fall16-mfa/juliet | R | false | false | 4,126 | r | library(ellipse)
library(ggplot2)
fsb = function(PFS){
#compute bootstrap factor score from partial factore scores of the inital data
#with a random sequence B
#sample with replacement
B=sample(1:10, 10, replace=TRUE)
FS_B = matrix(data=0, nrow=12, ncol=ncol(PFS[[1]]))
for (i in 1:length(B)){
FS_B = FS... |
library(MTurkR)
### Name: GetQualifications
### Title: Get Qualifications
### Aliases: GetQualifications getquals
### Keywords: Qualifications
### ** Examples
## Not run:
##D qual1 <-
##D AssignQualification(workers = "A1RO9UJNWXMU65",
##D name = "Worked for me before",
##D ... | /data/genthat_extracted_code/MTurkR/examples/GetQualifications.Rd.R | no_license | surayaaramli/typeRrh | R | false | false | 771 | r | library(MTurkR)
### Name: GetQualifications
### Title: Get Qualifications
### Aliases: GetQualifications getquals
### Keywords: Qualifications
### ** Examples
## Not run:
##D qual1 <-
##D AssignQualification(workers = "A1RO9UJNWXMU65",
##D name = "Worked for me before",
##D ... |
\name{RuleTest}
\alias{EITest}
\alias{RuleTest}
\alias{parseEITest}
\alias{parseRuleTest}
\alias{as.jlist,EITest,list-method}
\alias{as.jlist,RuleTest,list-method}
\title{Constructor for EITest or Rule Test.}
\description{
These are the constructors for the \code{\linkS4class{EITest}} and
\code{\linkS4class{RuleT... | /man/RuleTest.Rd | no_license | ralmond/EIEvent | R | false | false | 7,146 | rd | \name{RuleTest}
\alias{EITest}
\alias{RuleTest}
\alias{parseEITest}
\alias{parseRuleTest}
\alias{as.jlist,EITest,list-method}
\alias{as.jlist,RuleTest,list-method}
\title{Constructor for EITest or Rule Test.}
\description{
These are the constructors for the \code{\linkS4class{EITest}} and
\code{\linkS4class{RuleT... |
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/longformer-for-token-classification.R
\name{nlp_longformer_token_classification_pretrained}
\alias{nlp_longformer_token_classification_pretrained}
\title{Spark NLP LongformerForTokenClassification}
\usage{
nlp_longformer_token_classification_... | /man/nlp_longformer_token_classification_pretrained.Rd | permissive | r-spark/sparknlp | R | false | true | 1,960 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/longformer-for-token-classification.R
\name{nlp_longformer_token_classification_pretrained}
\alias{nlp_longformer_token_classification_pretrained}
\title{Spark NLP LongformerForTokenClassification}
\usage{
nlp_longformer_token_classification_... |
pollutantmean <- function(directory, pollutant, id = 1:332) {
## 'directory' is a character vector of lenth 1 indicating
## the location of the CSV files
## 'pollutant' is a character vector of length 1 indicating
## the name of the pollutant for which we will calculate the
## mea... | /pollutantmean.R | no_license | JD323/R-Programming | R | false | false | 989 | r | pollutantmean <- function(directory, pollutant, id = 1:332) {
## 'directory' is a character vector of lenth 1 indicating
## the location of the CSV files
## 'pollutant' is a character vector of length 1 indicating
## the name of the pollutant for which we will calculate the
## mea... |
% Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{ex25.16}
\alias{ex25.16}
\title{Data from Exercise 25.16}
\format{\Sexpr[results=rd]{bps5data:::doc_data("ex25.16") }}
\source{
\url{ http://bcs.whfreeman.com/bps5e/content/cat_030/PC-Text.zip }
}
\usage{
d... | /man/ex25.16.Rd | no_license | jrnold/bps5data | R | false | false | 1,456 | rd | % Generated by roxygen2 (4.1.0): do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{ex25.16}
\alias{ex25.16}
\title{Data from Exercise 25.16}
\format{\Sexpr[results=rd]{bps5data:::doc_data("ex25.16") }}
\source{
\url{ http://bcs.whfreeman.com/bps5e/content/cat_030/PC-Text.zip }
}
\usage{
d... |
StabPlotData <-
function(mGSZobj,rank.vector,sample.perm.data=FALSE){
# sample.perm.data: TRUE if sample perm data is to be plotted instead of gene data
########################################
## Testing that data sizes are correct #
########################################
gene.sets <- mGSZobj$gene.s... | /mGSZ/R/StabPlotData.R | no_license | ingted/R-Examples | R | false | false | 4,701 | r | StabPlotData <-
function(mGSZobj,rank.vector,sample.perm.data=FALSE){
# sample.perm.data: TRUE if sample perm data is to be plotted instead of gene data
########################################
## Testing that data sizes are correct #
########################################
gene.sets <- mGSZobj$gene.s... |
library(asbio)
### Name: ConDis.matrix
### Title: Calculation and display of concordant and discordant pairs
### Aliases: ConDis.matrix
### ** Examples
#Crab data from Sokal and Rohlf (1998)
crab<-data.frame(gill.wt=c(159,179,100,45,384,230,100,320,80,220,320,210),
body.wt=c(14.4,15.2,11.3,2.5,22.7,14.9,1.41,15.81,... | /data/genthat_extracted_code/asbio/examples/ConDis.matrix.rd.R | no_license | surayaaramli/typeRrh | R | false | false | 404 | r | library(asbio)
### Name: ConDis.matrix
### Title: Calculation and display of concordant and discordant pairs
### Aliases: ConDis.matrix
### ** Examples
#Crab data from Sokal and Rohlf (1998)
crab<-data.frame(gill.wt=c(159,179,100,45,384,230,100,320,80,220,320,210),
body.wt=c(14.4,15.2,11.3,2.5,22.7,14.9,1.41,15.81,... |
# This downloads all of the example files.
# NOTE: if a download breaks part way thorugh it
# leaves a corrupt file and when you try to
# download again, with the following message
# Error in load(path, envir = .GlobalEnv) :
# empty (zero-byte) input file
# You will have to delete the offending file ... | /DMC-MBN2019/.Rproj.user/21185750/sources/per/t/550B9419-contents | no_license | StevenM1/summerschool_mbn_2019 | R | false | false | 1,100 | # This downloads all of the example files.
# NOTE: if a download breaks part way thorugh it
# leaves a corrupt file and when you try to
# download again, with the following message
# Error in load(path, envir = .GlobalEnv) :
# empty (zero-byte) input file
# You will have to delete the offending file ... | |
source("load_data.R")
if (!("consumption" %in% ls())) consumption <- load_data()
png("plot3.png", width = 480, height = 480)
with(consumption, plot(Date, Sub_metering_1, xlab = "",
ylab = "Energy sub metering",
type = "l"))
with(consumption, lines(Date, Sub_metering_2, ... | /plot3.R | no_license | jwsnyderii/ExData_Plotting1 | R | false | false | 538 | r | source("load_data.R")
if (!("consumption" %in% ls())) consumption <- load_data()
png("plot3.png", width = 480, height = 480)
with(consumption, plot(Date, Sub_metering_1, xlab = "",
ylab = "Energy sub metering",
type = "l"))
with(consumption, lines(Date, Sub_metering_2, ... |
#!/usr/bin/env Rscript
# Title: FigS3_fitness_ES_ER.R
# Version: 0.2
# Author: Winka Le Clec'h <winkal@txbiomed.org>
# Created in: 2020
# Modified in: 2021-08-27
#-------------------
# Loading packages
#-------------------
suppressMessages({
library("gplots")
library("plotrix")
})
#------... | /scripts/FigS6_fitness_ES_ER.R | no_license | fdchevalier/PZQ-R_DNA-seq | R | false | false | 5,229 | r | #!/usr/bin/env Rscript
# Title: FigS3_fitness_ES_ER.R
# Version: 0.2
# Author: Winka Le Clec'h <winkal@txbiomed.org>
# Created in: 2020
# Modified in: 2021-08-27
#-------------------
# Loading packages
#-------------------
suppressMessages({
library("gplots")
library("plotrix")
})
#------... |
#check if lansat images are correct, both L5,L7 and L8 before using the other scripts
| /check_landsat_files.R | no_license | penico93/Landsat-analysis-in-R | R | false | false | 86 | r | #check if lansat images are correct, both L5,L7 and L8 before using the other scripts
|
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/projection.R
\name{latentProject}
\alias{latentProject}
\title{Project out latent variables}
\usage{
latentProject(graph, latent, v, only_directed = FALSE, sort = 1)
}
\arguments{
\item{graph}{an object of class \code{mixedgraph}}
\item{late... | /man/latentProject.Rd | no_license | rje42/ADMGs2 | R | false | true | 757 | rd | % Generated by roxygen2: do not edit by hand
% Please edit documentation in R/projection.R
\name{latentProject}
\alias{latentProject}
\title{Project out latent variables}
\usage{
latentProject(graph, latent, v, only_directed = FALSE, sort = 1)
}
\arguments{
\item{graph}{an object of class \code{mixedgraph}}
\item{late... |
library(ape)
testtree <- read.tree("12870_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="12870_0_unrooted.txt") | /codeml_files/newick_trees_processed/12870_0/rinput.R | no_license | DaniBoo/cyanobacteria_project | R | false | false | 137 | r | library(ape)
testtree <- read.tree("12870_0.txt")
unrooted_tr <- unroot(testtree)
write.tree(unrooted_tr, file="12870_0_unrooted.txt") |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.