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
filename <- "getdata_dataset.zip" ## Download and unzip the dataset: if (!file.exists(filename)){ fileURL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip " download.file(fileURL, filename) } if (!file.exists("UCI HAR Dataset")) { unzip(filename) } #Use reshape2 li...
/run_analysis.R
no_license
ietahamdan/Getting-and-Cleaning-Data-Course-Project
R
false
false
2,035
r
filename <- "getdata_dataset.zip" ## Download and unzip the dataset: if (!file.exists(filename)){ fileURL <- "https://d396qusza40orc.cloudfront.net/getdata%2Fprojectfiles%2FUCI%20HAR%20Dataset.zip " download.file(fileURL, filename) } if (!file.exists("UCI HAR Dataset")) { unzip(filename) } #Use reshape2 li...
## Sex determination of 4 samples that appears to be mis- phenotyped reavearled by PCA plots # Samples that phenotyped M, but appeared F : #X1415.0914 #X1415.0243 # Samples that phenotyped F, but appeared M : #X1415.1091 #X1415.1016 #Sex speficif gene expression to check sex #Jarid1c for X specific ENSMUSG00000025332 ...
/Xce_side_project/sex.determination.R
permissive
ytakemon/1415-Col4a5xDO-Project
R
false
false
4,205
r
## Sex determination of 4 samples that appears to be mis- phenotyped reavearled by PCA plots # Samples that phenotyped M, but appeared F : #X1415.0914 #X1415.0243 # Samples that phenotyped F, but appeared M : #X1415.1091 #X1415.1016 #Sex speficif gene expression to check sex #Jarid1c for X specific ENSMUSG00000025332 ...
##' QGIS Algorithm provided by GDAL Topographic Position Index (TPI) (gdal:tpitopographicpositionindex) ##' ##' @title QGIS algorithm Topographic Position Index (TPI) ##' ##' @param INPUT `raster` - Input layer. Path to a raster layer. ##' @param BAND `band` - Band number. Integer value representing an existing raster ...
/R/gdal_tpitopographicpositionindex.R
permissive
VB6Hobbyst7/r_package_qgis
R
false
false
1,741
r
##' QGIS Algorithm provided by GDAL Topographic Position Index (TPI) (gdal:tpitopographicpositionindex) ##' ##' @title QGIS algorithm Topographic Position Index (TPI) ##' ##' @param INPUT `raster` - Input layer. Path to a raster layer. ##' @param BAND `band` - Band number. Integer value representing an existing raster ...
library(sparkTable) ### Name: newSparkBar ### Title: Functions to create new Spark object ### Aliases: newSparkBar newSparkLine newSparkBox newSparkHist ### ** Examples ## Not run: ##D data(pop) ##D x <- pop[pop[,2]=="Insgesamt",3] ##D ##D ### SparkLine ##D a <- newSparkLine(values=x, pointWidth=8) ##D ...
/data/genthat_extracted_code/sparkTable/examples/newSparkBar.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
2,029
r
library(sparkTable) ### Name: newSparkBar ### Title: Functions to create new Spark object ### Aliases: newSparkBar newSparkLine newSparkBox newSparkHist ### ** Examples ## Not run: ##D data(pop) ##D x <- pop[pop[,2]=="Insgesamt",3] ##D ##D ### SparkLine ##D a <- newSparkLine(values=x, pointWidth=8) ##D ...
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/render_graph.R \name{render_graph} \alias{render_graph} \title{Render the graph or output in various formats} \usage{ render_graph(graph, output = "graph", layout = NULL, width = NULL, height = NULL) } \arguments{ \item{graph}{a \co...
/man/render_graph.Rd
no_license
imanojkumar/DiagrammeR
R
false
false
2,241
rd
% Generated by roxygen2 (4.1.1): do not edit by hand % Please edit documentation in R/render_graph.R \name{render_graph} \alias{render_graph} \title{Render the graph or output in various formats} \usage{ render_graph(graph, output = "graph", layout = NULL, width = NULL, height = NULL) } \arguments{ \item{graph}{a \co...
user ='root' password = 'StoneRanger12#' dbname = 'main_schema' host ='173.194.227.245'
/testShiny/config.R
no_license
GBelzoni/testshiny
R
false
false
90
r
user ='root' password = 'StoneRanger12#' dbname = 'main_schema' host ='173.194.227.245'
no <- 20 #1:5 is a vector 1:5 range <- 1:no for(i in range){ print("Hello to R") } for(i in 1:50){ print("Hello to R,again") }
/Diamond price prediction/ForLoop.R
no_license
deboshas/R-Handson
R
false
false
146
r
no <- 20 #1:5 is a vector 1:5 range <- 1:no for(i in range){ print("Hello to R") } for(i in 1:50){ print("Hello to R,again") }
\name{stackApply} \docType{methods} \alias{stackApply} \title{Apply a function on subsets of a RasterStack or RasterBrick} \description{ Apply a function on subsets of a RasterStack or RasterBrick. The layers to be combined are indicated with the vector \code{indices}. The function used should return a s...
/raster/man/stackApply.Rd
no_license
radfordneal/R-package-mods
R
false
false
1,907
rd
\name{stackApply} \docType{methods} \alias{stackApply} \title{Apply a function on subsets of a RasterStack or RasterBrick} \description{ Apply a function on subsets of a RasterStack or RasterBrick. The layers to be combined are indicated with the vector \code{indices}. The function used should return a s...
library(stringr) library(lubridate) # Reading the dataset dataset <- read.table('household_power_consumption.txt', sep = ';', header = T) # Validating the dimensions of the data frame dim(dataset) # Column of the dataset names(dataset) # Filtering the dataset for required dates dataset = dataset[dmy(da...
/plot2.R
no_license
vinit2107/ExData_Plotting1
R
false
false
1,150
r
library(stringr) library(lubridate) # Reading the dataset dataset <- read.table('household_power_consumption.txt', sep = ';', header = T) # Validating the dimensions of the data frame dim(dataset) # Column of the dataset names(dataset) # Filtering the dataset for required dates dataset = dataset[dmy(da...
\name{cerealsugar} \alias{cerealsugar} \docType{data} \title{Percentage of Sugar in Breakfast Cereal} \usage{cerealsugar} \description{ Measurements of sugar content in frosted flakes breakfast cereal. } \format{ A vector of 100 measurements. } \keyword{datasets}
/man/cerealsugar.Rd
no_license
cran/DAAG
R
false
false
266
rd
\name{cerealsugar} \alias{cerealsugar} \docType{data} \title{Percentage of Sugar in Breakfast Cereal} \usage{cerealsugar} \description{ Measurements of sugar content in frosted flakes breakfast cereal. } \format{ A vector of 100 measurements. } \keyword{datasets}
#' @title Build Spikes in the Data Distribution #' @description Builds spikes in the data distribution. For example, in retail industry transactions are generally higher during the holiday season such as December. This function is used to set the same. #' @param distr numeric vector. This is the input vector for whic...
/R/buildSpike.R
permissive
SidharthMacherla/conjurer
R
false
false
1,301
r
#' @title Build Spikes in the Data Distribution #' @description Builds spikes in the data distribution. For example, in retail industry transactions are generally higher during the holiday season such as December. This function is used to set the same. #' @param distr numeric vector. This is the input vector for whic...
#importing the data data <- read.table("./Data/household_power_consumption.txt", header=T, sep=";", stringsAsFactors=FALSE, dec=".") #subsetting the data subset <- data[data$Date %in% c("1/2/2007","2/2/2007") ,] #making the plot and saving the file globalActivePower <- as.numeric(subset$Global_active_power) png("plot...
/plot1.R
no_license
rcazzola/ExData_Plotting1
R
false
false
465
r
#importing the data data <- read.table("./Data/household_power_consumption.txt", header=T, sep=";", stringsAsFactors=FALSE, dec=".") #subsetting the data subset <- data[data$Date %in% c("1/2/2007","2/2/2007") ,] #making the plot and saving the file globalActivePower <- as.numeric(subset$Global_active_power) png("plot...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/saBayesFuns.R \name{sabayes_find_quantile} \alias{sabayes_find_quantile} \title{sabayes_find_quantile} \usage{ sabayes_find_quantile(y, p, sigma, tau, t, q) } \arguments{ \item{y}{value of y} \item{p}{prior probability of signal} \item{sigm...
/man/sabayes_find_quantile.Rd
no_license
spencerwoody/saFAB
R
false
true
758
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/saBayesFuns.R \name{sabayes_find_quantile} \alias{sabayes_find_quantile} \title{sabayes_find_quantile} \usage{ sabayes_find_quantile(y, p, sigma, tau, t, q) } \arguments{ \item{y}{value of y} \item{p}{prior probability of signal} \item{sigm...
#clear old data rm(list = ls()) #load libraries library(tidyverse) library(readxl) df<-NULL df_offers <- read_excel(file.choose(),1) colnames(df_offers) <- c("offer_id", "campaign", "varietal", "min_qty", "discount", "origin", "past_peak") glimpse(df_offers) df_transactions <- read_excel(file.choose(),2) colnames(d...
/R_analytics/wine_KMC/wineKMC.R
no_license
edimaudo/R-projects
R
false
false
464
r
#clear old data rm(list = ls()) #load libraries library(tidyverse) library(readxl) df<-NULL df_offers <- read_excel(file.choose(),1) colnames(df_offers) <- c("offer_id", "campaign", "varietal", "min_qty", "discount", "origin", "past_peak") glimpse(df_offers) df_transactions <- read_excel(file.choose(),2) colnames(d...
#' #' @title Function to resolve biodiveristy data based on taxonomic ranks. #' #' @param df (data.frame) Data frame containing biodiversity data. #' @return (data.frame) Returns a data frame containing resolved biodiversity data. #' #' @example #' occdat1 <- occ_data( #' country = "AU", # Country code for austr...
/R/bd_taxonomic_resolver.R
no_license
AshwinAgrawal16/bdclean
R
false
false
2,952
r
#' #' @title Function to resolve biodiveristy data based on taxonomic ranks. #' #' @param df (data.frame) Data frame containing biodiversity data. #' @return (data.frame) Returns a data frame containing resolved biodiversity data. #' #' @example #' occdat1 <- occ_data( #' country = "AU", # Country code for austr...
# SETUP ------------------------------------------------------------------- library(tidyverse) library(readxl) library(janitor) library(snakecase) g <- glimpse # LOAD DATA --------------------------------------------------------------- tract_data_filepath <- "data/source-files/2011thru2015-140-csv.zip" # Unzip ...
/R/tract-2015-recreate-exhibit-4and5.R
no_license
tiernanmartin/skyway-westhill-subarea-plan-2019
R
false
false
11,237
r
# SETUP ------------------------------------------------------------------- library(tidyverse) library(readxl) library(janitor) library(snakecase) g <- glimpse # LOAD DATA --------------------------------------------------------------- tract_data_filepath <- "data/source-files/2011thru2015-140-csv.zip" # Unzip ...
#!/usr/bin/env Rscript library(rEDM) library(dplyr) library(tidyr) library(RSQLite) library(parallel) N_CORES <- 1 N_SURROGATES <- 500 main <- function() { job_spec <- readRDS('job_spec.Rds') script_dir <- get_script_dir() df_in <- read.csv(file.path(script_dir, 'pnas.1607747113.sd01.txt')) %>% filt...
/run_job.R
no_license
cobeylab/ccm-letter
R
false
false
3,439
r
#!/usr/bin/env Rscript library(rEDM) library(dplyr) library(tidyr) library(RSQLite) library(parallel) N_CORES <- 1 N_SURROGATES <- 500 main <- function() { job_spec <- readRDS('job_spec.Rds') script_dir <- get_script_dir() df_in <- read.csv(file.path(script_dir, 'pnas.1607747113.sd01.txt')) %>% filt...
# input parameters # sigma2: 0 < value < 5 sig2 <- 2.5 # e.g. "anas_krystallinus" species.name <- "novus_species" # e.g. "red" color <- "blue" # tip: pick a color at using rstudio colour picker. Addins > Colour Picker
/params/novus_species.R
permissive
markrt/collaborative_github_exercise
R
false
false
243
r
# input parameters # sigma2: 0 < value < 5 sig2 <- 2.5 # e.g. "anas_krystallinus" species.name <- "novus_species" # e.g. "red" color <- "blue" # tip: pick a color at using rstudio colour picker. Addins > Colour Picker
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tutorial-format.R \name{tutorial} \alias{tutorial} \title{Tutorial document format} \usage{ tutorial(fig_width = 6.5, fig_height = 4, fig_retina = 2, fig_caption = TRUE, progressive = FALSE, allow_skip = FALSE, dev = "png", df_print = "pa...
/man/tutorial.Rd
permissive
STAT160/learnr
R
false
true
3,935
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tutorial-format.R \name{tutorial} \alias{tutorial} \title{Tutorial document format} \usage{ tutorial(fig_width = 6.5, fig_height = 4, fig_retina = 2, fig_caption = TRUE, progressive = FALSE, allow_skip = FALSE, dev = "png", df_print = "pa...
#' Download Landsat-7 or Landsat-8 images from a search list #' #' \code{lsDownload} downloads the results from \code{\link{ls7Search}} and #' \code{\link{ls8Search}} functions. The images are saved as GTiff files in the #' \code{AppRoot} directory. #' #' \code{lsDonwSearch} downloads the list of URLs provided by...
/R/lsDownload.R
no_license
cran/RGISTools
R
false
false
8,969
r
#' Download Landsat-7 or Landsat-8 images from a search list #' #' \code{lsDownload} downloads the results from \code{\link{ls7Search}} and #' \code{\link{ls8Search}} functions. The images are saved as GTiff files in the #' \code{AppRoot} directory. #' #' \code{lsDonwSearch} downloads the list of URLs provided by...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{kobo_time_parser} \alias{kobo_time_parser} \alias{kobo_time_parser_UTC} \title{Parses Dates from KoBo Into a More Usable Format} \usage{ kobo_time_parser_UTC(instring) kobo_time_parser(instring, timezone = Sys.timezone()) } \ar...
/man/kobo_time_parser.Rd
no_license
prabinrs/koboloadeR
R
false
true
1,140
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/utils.R \name{kobo_time_parser} \alias{kobo_time_parser} \alias{kobo_time_parser_UTC} \title{Parses Dates from KoBo Into a More Usable Format} \usage{ kobo_time_parser_UTC(instring) kobo_time_parser(instring, timezone = Sys.timezone()) } \ar...
##' EvaluateMyBAF: Evaluate B Allele Frequency (BAF). ##' ##' Specifically designed to handle noisy data from amplified DNA on phenylketonuria (PKU) cards. The function is a pipeline using many subfunctions. ##' @title EvaluateMyBAF ##' @param res: Unknown. ##' @param res2. Unknown. ##' @return Classification for BAF....
/R/EvaluateMyBAF.R
no_license
hilge/iPsychCNV
R
false
false
1,805
r
##' EvaluateMyBAF: Evaluate B Allele Frequency (BAF). ##' ##' Specifically designed to handle noisy data from amplified DNA on phenylketonuria (PKU) cards. The function is a pipeline using many subfunctions. ##' @title EvaluateMyBAF ##' @param res: Unknown. ##' @param res2. Unknown. ##' @return Classification for BAF....
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions.R \name{getComments} \alias{getComments} \title{Retrieve a corpus of all comments of the thread passed to getComments} \usage{ getComments(url) } \arguments{ \item{url}{Link to desired Reddit comment thread} } \value{ A corpus of al...
/man/getComments.Rd
no_license
DataCub/feelingreddit
R
false
true
522
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/functions.R \name{getComments} \alias{getComments} \title{Retrieve a corpus of all comments of the thread passed to getComments} \usage{ getComments(url) } \arguments{ \item{url}{Link to desired Reddit comment thread} } \value{ A corpus of al...
##Secante (y comparacion con Newton) #e^x + 2^-x + 2*cos(x) - 6 = 0 x E [1;2] ---- f1 = function(x){ x = exp(x) + 2^-x + 2*cos(x) - 6 } x = 1:2 x y = f1(x) y z = function(x) K = c(x,y) plot(x,y, lines(x,y)) abline(h=0) abline(v=0) Secante = function(p0,p1,Tol, N){ i=2 q0 = f1(p0) q1 = f1(...
/4 - Secante.R
no_license
micarosman/Analisis-num
R
false
false
11,536
r
##Secante (y comparacion con Newton) #e^x + 2^-x + 2*cos(x) - 6 = 0 x E [1;2] ---- f1 = function(x){ x = exp(x) + 2^-x + 2*cos(x) - 6 } x = 1:2 x y = f1(x) y z = function(x) K = c(x,y) plot(x,y, lines(x,y)) abline(h=0) abline(v=0) Secante = function(p0,p1,Tol, N){ i=2 q0 = f1(p0) q1 = f1(...
# STA 141A - Final Project # Due December 5, 2017 @ 5:00 PM # GROUP 52: Mitchell Layton, Caroline Mai, William Powell #--------------------------------------------------------- library(tidyverse) library(ggmosaic) library(plotly) library(scales) library(car) library(RColorBrewer) library(rio) library(readr)...
/Final Project R Script.R
no_license
wppowell84/STA141A-Project
R
false
false
2,867
r
# STA 141A - Final Project # Due December 5, 2017 @ 5:00 PM # GROUP 52: Mitchell Layton, Caroline Mai, William Powell #--------------------------------------------------------- library(tidyverse) library(ggmosaic) library(plotly) library(scales) library(car) library(RColorBrewer) library(rio) library(readr)...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/udf.R \name{list_udf_runtimes} \alias{list_udf_runtimes} \title{Lists the supported UDF runtimes} \usage{ list_udf_runtimes(con = NULL) } \arguments{ \item{con}{connected and authenticated openEO client object (optional) otherwise \code{\link...
/man/list_udf_runtimes.Rd
permissive
Open-EO/openeo-r-client
R
false
true
598
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/udf.R \name{list_udf_runtimes} \alias{list_udf_runtimes} \title{Lists the supported UDF runtimes} \usage{ list_udf_runtimes(con = NULL) } \arguments{ \item{con}{connected and authenticated openEO client object (optional) otherwise \code{\link...
context("boundary_matrix") test_that("SpatialPolygons (squares)", { # data x <- raster::rasterToPolygons(raster::raster(matrix(0:8, byrow = TRUE, ncol = 3), xmn = 0, xmx = 3, ymn = 0, ...
/tests/testthat/test_boundary_matrix.R
no_license
IsaakBM/prioritizr
R
false
false
5,874
r
context("boundary_matrix") test_that("SpatialPolygons (squares)", { # data x <- raster::rasterToPolygons(raster::raster(matrix(0:8, byrow = TRUE, ncol = 3), xmn = 0, xmx = 3, ymn = 0, ...
% Generated by roxygen2 (4.0.1): do not edit by hand \name{name_usage} \alias{name_usage} \title{Lookup details for specific names in all taxonomies in GBIF.} \usage{ name_usage(key = NULL, name = NULL, data = "all", language = NULL, datasetKey = NULL, uuid = NULL, sourceId = NULL, rank = NULL, shortname = NULL, st...
/man/name_usage.Rd
permissive
jarioksa/rgbif
R
false
false
3,355
rd
% Generated by roxygen2 (4.0.1): do not edit by hand \name{name_usage} \alias{name_usage} \title{Lookup details for specific names in all taxonomies in GBIF.} \usage{ name_usage(key = NULL, name = NULL, data = "all", language = NULL, datasetKey = NULL, uuid = NULL, sourceId = NULL, rank = NULL, shortname = NULL, st...
# A solver in R for the Hodgkin-Huxley equations in discrete time # Sean Caron (scaron@umich.edu) # Time step, mS dt <- 0.01 # Membrane capacitance, mF/cm^2 cm <- 1.0 # Potassium conductance, mS/cm^2 G_K_bar <- 36.0 # Sodium conductance, mS/cm^2 G_Na_bar <- 120.0 # Leak conductance, mS/cm^2 G_L_bar <- 0.3...
/HH.R
no_license
seantcaron/hhr
R
false
false
4,815
r
# A solver in R for the Hodgkin-Huxley equations in discrete time # Sean Caron (scaron@umich.edu) # Time step, mS dt <- 0.01 # Membrane capacitance, mF/cm^2 cm <- 1.0 # Potassium conductance, mS/cm^2 G_K_bar <- 36.0 # Sodium conductance, mS/cm^2 G_Na_bar <- 120.0 # Leak conductance, mS/cm^2 G_L_bar <- 0.3...
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function ## makeCacheMatrix creates a matrix object that can cache its inverse makeCacheMatrix <- function(x = matrix()) { m <-NULL set <-function(y){ x <<-y m <<-NULL } get <-fun...
/cachematrix.R
no_license
AmitNaik07/ProgrammingAssignment2
R
false
false
918
r
## Put comments here that give an overall description of what your ## functions do ## Write a short comment describing this function ## makeCacheMatrix creates a matrix object that can cache its inverse makeCacheMatrix <- function(x = matrix()) { m <-NULL set <-function(y){ x <<-y m <<-NULL } get <-fun...
testlist <- list(doy = -1.72131968218895e+83, latitude = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.80033518839696e+41, 2.6...
/meteor/inst/testfiles/ET0_ThornthwaiteWilmott/AFL_ET0_ThornthwaiteWilmott/ET0_ThornthwaiteWilmott_valgrind_files/1615827946-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
734
r
testlist <- list(doy = -1.72131968218895e+83, latitude = c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), temp = c(8.5728629954997e-312, 1.56898424065867e+82, 8.96970809549085e-158, -1.3258495253834e-113, 2.79620616433656e-119, -6.80033518839696e+41, 2.6...
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 equations_pSurvival_rateshift_CPP <- function(lambda, mu, rateChangeTimes, massExtinctionSurvivalProbabilities, samplingProbability, t_low, t_high, T, log) { .Call('_TESS_equations_pSurviva...
/fuzzedpackages/TESS/R/RcppExports.R
no_license
akhikolla/testpackages
R
false
false
773
r
# Generated by using Rcpp::compileAttributes() -> do not edit by hand # Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393 equations_pSurvival_rateshift_CPP <- function(lambda, mu, rateChangeTimes, massExtinctionSurvivalProbabilities, samplingProbability, t_low, t_high, T, log) { .Call('_TESS_equations_pSurviva...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/z_examples.R \docType{data} \name{example.biometrics} \alias{example.biometrics} \title{Example biometric data} \format{ A data frame with 60 rows and 7 variables: \describe{ \item{Release.date}{The date and time of release} \item{R...
/man/example.biometrics.Rd
no_license
cran/actel
R
false
true
806
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/z_examples.R \docType{data} \name{example.biometrics} \alias{example.biometrics} \title{Example biometric data} \format{ A data frame with 60 rows and 7 variables: \describe{ \item{Release.date}{The date and time of release} \item{R...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ellipse-functions.R \name{eigenEllipseHelper} \alias{eigenEllipseHelper} \title{Helper Function for other Ellipse-from-Eigendecomposition Functions} \usage{ eigenEllipseHelper(mu, lengths, angle, xl, yl, lim.adj, axes, center, ...) } \argumen...
/man/eigenEllipseHelper.Rd
no_license
douglaswhitaker/MVQuickGraphs
R
false
true
1,596
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/ellipse-functions.R \name{eigenEllipseHelper} \alias{eigenEllipseHelper} \title{Helper Function for other Ellipse-from-Eigendecomposition Functions} \usage{ eigenEllipseHelper(mu, lengths, angle, xl, yl, lim.adj, axes, center, ...) } \argumen...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/outputs.R \name{plot.msm} \alias{plot.msm} \title{Plots of multi-state models} \usage{ \method{plot}{msm}( x, from = NULL, to = NULL, range = NULL, covariates = "mean", legend.pos = NULL, xlab = "Time", ylab = "Fitted survival...
/man/plot.msm.Rd
no_license
chjackson/msm
R
false
true
2,054
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/outputs.R \name{plot.msm} \alias{plot.msm} \title{Plots of multi-state models} \usage{ \method{plot}{msm}( x, from = NULL, to = NULL, range = NULL, covariates = "mean", legend.pos = NULL, xlab = "Time", ylab = "Fitted survival...
#loading libraries library(tidyverse) library(ggplot2) library(hrbrthemes) library(writexl) library(lubridate) library(skimr) library(forcats) #Exploratory Data Analysis 20K games taken in 2018 from users from the top 100 teams on Lichess. #GLicko chess rating system used of players between 784 and 2723 rating games...
/Chess.R
no_license
carauz22/Data-Analysis-Practice
R
false
false
5,173
r
#loading libraries library(tidyverse) library(ggplot2) library(hrbrthemes) library(writexl) library(lubridate) library(skimr) library(forcats) #Exploratory Data Analysis 20K games taken in 2018 from users from the top 100 teams on Lichess. #GLicko chess rating system used of players between 784 and 2723 rating games...
# Hello, world! # # This is an example function named 'hello' # which prints 'Hello, world!'. # # You can learn more about package authoring with RStudio at: # # http://r-pkgs.had.co.nz/ # # Some useful keyboard shortcuts for package authoring: # # Install Package: 'Cmd + Shift + B' # Check Package: ...
/R/hello.R
no_license
moneykani/lab2
R
false
false
1,428
r
# Hello, world! # # This is an example function named 'hello' # which prints 'Hello, world!'. # # You can learn more about package authoring with RStudio at: # # http://r-pkgs.had.co.nz/ # # Some useful keyboard shortcuts for package authoring: # # Install Package: 'Cmd + Shift + B' # Check Package: ...
# Purpose: read in excel file and save as .csv # Date: March 6th, 2020 # load libs library(tidyverse) library(readxl) #set working dir setwd("~/git/esta/") # read in data df <- read_excel("./data/source/2020-02-11%20Voyage%20data%20for%20visualisation%20demo.xlsx") # names(df) # remove capitals from header names(df...
/scripts/voyage-data-xlsx2csv.R
no_license
IISH/esta
R
false
false
605
r
# Purpose: read in excel file and save as .csv # Date: March 6th, 2020 # load libs library(tidyverse) library(readxl) #set working dir setwd("~/git/esta/") # read in data df <- read_excel("./data/source/2020-02-11%20Voyage%20data%20for%20visualisation%20demo.xlsx") # names(df) # remove capitals from header names(df...
library(readtext) library(stringr) input <- readtext("day04/day04_input.txt")$text input <- str_split(input, "\n\n")[[1]] validPassport <- function (passport) { hasCID <- str_detect(passport, "cid") nFields <- str_count(passport, ":") if (nFields == 8) { return(T) } else if (!hasCID & nFields == ...
/day04/day04_1.R
no_license
quoctran98/Advent-of-Code-2020
R
false
false
475
r
library(readtext) library(stringr) input <- readtext("day04/day04_input.txt")$text input <- str_split(input, "\n\n")[[1]] validPassport <- function (passport) { hasCID <- str_detect(passport, "cid") nFields <- str_count(passport, ":") if (nFields == 8) { return(T) } else if (!hasCID & nFields == ...
gethicobjlist <- function(dir, species, chr, resolution, normethod, startcor=NULL, endcor=NULL) { switch(species, hg19= { chrlens = c(249250621, 243199373, 198022430, 191154276, 180915260, 171115067, 159138663, 146364022, 141213431, 135534747, 135006516, 133851895, 115169878, 10734954...
/scripts/ICEnorm/gethicobjlist.R
no_license
lhqxinghun/TADfit
R
false
false
7,634
r
gethicobjlist <- function(dir, species, chr, resolution, normethod, startcor=NULL, endcor=NULL) { switch(species, hg19= { chrlens = c(249250621, 243199373, 198022430, 191154276, 180915260, 171115067, 159138663, 146364022, 141213431, 135534747, 135006516, 133851895, 115169878, 10734954...
library(tidyverse) library(tidytext) library(stringr) library(fuzzyjoin) source("r_scripts/helper_functions.R") #chat log csv chat_df <- read_csv("data/m2k_chat_2017-03-19.csv", col_types="cccccT") #stuff for curse words problem_words_df <- read_csv("data/problem_words_fcc.csv",col_types = "c") fc...
/r_scripts/momo_mango.R
no_license
AdamSpannbauer/twitch_chat
R
false
false
3,920
r
library(tidyverse) library(tidytext) library(stringr) library(fuzzyjoin) source("r_scripts/helper_functions.R") #chat log csv chat_df <- read_csv("data/m2k_chat_2017-03-19.csv", col_types="cccccT") #stuff for curse words problem_words_df <- read_csv("data/problem_words_fcc.csv",col_types = "c") fc...
#'Calculate a tSNE over 3 dims using the variable genes only #'@param sco An scell S4 object #'@export CalcTSNE CalcTSNE <- function(sco){ var.data <- sco@data[sco@var.genes,] tsne.out <- Rtsne(var.data, dim=3) # make sure that in the description you have Rtsne, ensure that within the class you can create tsne (a...
/R/tSNE dim3.R
no_license
akonturek/MyFirstPackage
R
false
false
376
r
#'Calculate a tSNE over 3 dims using the variable genes only #'@param sco An scell S4 object #'@export CalcTSNE CalcTSNE <- function(sco){ var.data <- sco@data[sco@var.genes,] tsne.out <- Rtsne(var.data, dim=3) # make sure that in the description you have Rtsne, ensure that within the class you can create tsne (a...
/一下專討用.R
no_license
leeyaowen/spatial_pattern
R
false
false
14,516
r
#import files and libraries library(data.table) library(dplyr) #for each data set: # read in the data set # append the subject id and the activity code # add column indicating the data set it is from activitylabels <- "./data/activity_labels.txt" activitylabelstable <- fread(activitylabels, col.names = c("acti...
/run_analysis.R
no_license
Keegan-Evans/gettingandcleaningdataproject
R
false
false
2,834
r
#import files and libraries library(data.table) library(dplyr) #for each data set: # read in the data set # append the subject id and the activity code # add column indicating the data set it is from activitylabels <- "./data/activity_labels.txt" activitylabelstable <- fread(activitylabels, col.names = c("acti...
library(dplyr) library(tidyr) library(readr) #----- Format Landscape Characteristics Data ---- huc02_landscape <- read_csv("landscape_characteristics/HUC02_sites_landscape_characteristics.csv") # National Capitals Region, Shenandoah, and W MD reference streams huc05_landscape <- read_csv("landscape_characteristic...
/Code/format_landscape_data.R
permissive
jclbrooks/MD_Stream_Salamanders
R
false
false
5,100
r
library(dplyr) library(tidyr) library(readr) #----- Format Landscape Characteristics Data ---- huc02_landscape <- read_csv("landscape_characteristics/HUC02_sites_landscape_characteristics.csv") # National Capitals Region, Shenandoah, and W MD reference streams huc05_landscape <- read_csv("landscape_characteristic...
#' Compute predicted values from models. #' #' Compute predicted values from models. See the #' documentation for your model's class: #' \itemize{ #' \item{\link[=get_predicted.stanreg]{get_predicted.stanreg}} #' \item{\link[=get_predicted.merMod]{get_predicted.merMod}} #' \item{\link[=get_predicted.lm]{get_predicte...
/R/get_predicted.R
permissive
HugoNjb/psycho.R
R
false
false
631
r
#' Compute predicted values from models. #' #' Compute predicted values from models. See the #' documentation for your model's class: #' \itemize{ #' \item{\link[=get_predicted.stanreg]{get_predicted.stanreg}} #' \item{\link[=get_predicted.merMod]{get_predicted.merMod}} #' \item{\link[=get_predicted.lm]{get_predicte...
library(wholebrain) data("atlasIndex") data("EPSatlas") data("ontology") get_allen_brain_annotations <- function ( regi, xy, image.size.micron = 8705, image.size.pixel = 2000, spot.radius = 27.5 ) { # Define pixel size and radius pixels.per.um <- (image.size.pixel/image.size.micron) pixelsize <- 1/pixe...
/doc/global_functions.R
no_license
ludvigla/FFPE_analysis
R
false
false
8,011
r
library(wholebrain) data("atlasIndex") data("EPSatlas") data("ontology") get_allen_brain_annotations <- function ( regi, xy, image.size.micron = 8705, image.size.pixel = 2000, spot.radius = 27.5 ) { # Define pixel size and radius pixels.per.um <- (image.size.pixel/image.size.micron) pixelsize <- 1/pixe...
library(tidyverse) library(ggplot2) library(tweenr) library(gganimate) library(plotly) set.seed(234234) sd = 0.1 x.seq = seq(0, 1, length.out = 50) y.max = max(dnorm(x.seq, mean = 0, sd = sd)) y.seq = seq(0, y.max, length.out = 50) m.seq = seq(min(x.seq) + sd*2.8, max(x.seq) - sd*2.8, length....
/Point Plot Animation.R
no_license
ddsjoberg/ddsjoberg.github.io
R
false
false
2,853
r
library(tidyverse) library(ggplot2) library(tweenr) library(gganimate) library(plotly) set.seed(234234) sd = 0.1 x.seq = seq(0, 1, length.out = 50) y.max = max(dnorm(x.seq, mean = 0, sd = sd)) y.seq = seq(0, y.max, length.out = 50) m.seq = seq(min(x.seq) + sd*2.8, max(x.seq) - sd*2.8, length....
testlist <- list(A = structure(c(2.31584307392466e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0), .Dim = c(5L, 1L)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_rows,testlist) str(result)
/multivariance/inst/testfiles/match_rows/AFL_match_rows/match_rows_valgrind_files/1613112898-test.R
no_license
akhikolla/updatedatatype-list3
R
false
false
251
r
testlist <- list(A = structure(c(2.31584307392466e+77, 9.53818252170339e+295, 1.22810536108214e+146, 4.12396251261199e-221, 0), .Dim = c(5L, 1L)), B = structure(0, .Dim = c(1L, 1L))) result <- do.call(multivariance:::match_rows,testlist) str(result)
library(Sleuth2) ### Name: case0402 ### Title: Cognitive Load ### Aliases: case0402 ### Keywords: datasets ### ** Examples str(case0402) stem(subset(case0402, Treatmt=="Conventional", Time, drop=TRUE)) stem(subset(case0402, Treatmt=="Modified", Time, drop=TRUE)) wilcox.test(Time ~ Treatmt, case0402)
/data/genthat_extracted_code/Sleuth2/examples/case0402.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
308
r
library(Sleuth2) ### Name: case0402 ### Title: Cognitive Load ### Aliases: case0402 ### Keywords: datasets ### ** Examples str(case0402) stem(subset(case0402, Treatmt=="Conventional", Time, drop=TRUE)) stem(subset(case0402, Treatmt=="Modified", Time, drop=TRUE)) wilcox.test(Time ~ Treatmt, case0402)
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tests_for_ps.r \name{check.expr} \alias{check.expr} \title{Test: Compare the expression check.expr evaluated in the student's environment with the solution correct.expr} \usage{ check.expr( check.expr, correct.expr, failure.message = "{...
/man/check.expr.Rd
no_license
skranz/RTutor
R
false
true
1,210
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/tests_for_ps.r \name{check.expr} \alias{check.expr} \title{Test: Compare the expression check.expr evaluated in the student's environment with the solution correct.expr} \usage{ check.expr( check.expr, correct.expr, failure.message = "{...
library(shp2graph) library(RCurl) library(geosphere) library(lubridate) library(GISTools) library(rgdal) library(rjson) library(raster) library(sp) library(RCurl) library(jsonlite) library("aws.s3") IS_NEARBY_THRESHOLD = 20000 # 20 km LONGITUDE_INCREMENT = 0.0166651236 LOCAL_DIRECTORY_PATH <- Sys.getenv("LOCAL_DIRECTO...
/get_intersections.R
no_license
narroviz/data-around-the-world
R
false
false
11,541
r
library(shp2graph) library(RCurl) library(geosphere) library(lubridate) library(GISTools) library(rgdal) library(rjson) library(raster) library(sp) library(RCurl) library(jsonlite) library("aws.s3") IS_NEARBY_THRESHOLD = 20000 # 20 km LONGITUDE_INCREMENT = 0.0166651236 LOCAL_DIRECTORY_PATH <- Sys.getenv("LOCAL_DIRECTO...
#reading data train <- read.table("train/X_train.txt") subject_train <- read.table("train/subject_train.txt", col.names = "subject") activity_train <- read.table("train/y_train.txt", col.names = "activity") test <- read.table("test/X_test.txt") subject_test <- read.table("test/subject_test.txt", col.names = "subje...
/run_analysis.R
no_license
kerompa/getting-and-cleaning-data
R
false
false
2,694
r
#reading data train <- read.table("train/X_train.txt") subject_train <- read.table("train/subject_train.txt", col.names = "subject") activity_train <- read.table("train/y_train.txt", col.names = "activity") test <- read.table("test/X_test.txt") subject_test <- read.table("test/subject_test.txt", col.names = "subje...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/filter_out_bad_directions.R \name{filter_out_bad_directions} \alias{filter_out_bad_directions} \title{Returns a vector of directions that can be used given the word size, the demensions of the puzzle, and the proposed list of directions.} \us...
/man/filter_out_bad_directions.Rd
permissive
rmsharp/wordPuzzle
R
false
true
763
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/filter_out_bad_directions.R \name{filter_out_bad_directions} \alias{filter_out_bad_directions} \title{Returns a vector of directions that can be used given the word size, the demensions of the puzzle, and the proposed list of directions.} \us...
library(rvest);library(tidyverse);library(XML);library(RCurl) pages <- paste0("http://www.shezfy.com/page/sssw/index.html?lm=d0&pm=d0&data_p=",1:6379) court_2 <- data.frame(page = pages, stringsAsFactors = F) court_2$title <- NA court_2$number <- NA court_2$links <- NA for(i in 732:nrow(court_2)){ Sys.sleep(1)...
/crime/court2.R
no_license
xyangwu/whosesociety-data
R
false
false
2,207
r
library(rvest);library(tidyverse);library(XML);library(RCurl) pages <- paste0("http://www.shezfy.com/page/sssw/index.html?lm=d0&pm=d0&data_p=",1:6379) court_2 <- data.frame(page = pages, stringsAsFactors = F) court_2$title <- NA court_2$number <- NA court_2$links <- NA for(i in 732:nrow(court_2)){ Sys.sleep(1)...
# Load Libraries ---------------------------------------------------------- library(here) library(tidyverse) # Read in raw Data -------------------------------------------------------- df <- read_csv(here("2019", "2019-12-03", "parking_violations.csv")) small_df <- df %>% mutate(date = lubridate::date(issue_da...
/data/2019/2019-12-03/philly_parking.R
permissive
rfordatascience/tidytuesday
R
false
false
886
r
# Load Libraries ---------------------------------------------------------- library(here) library(tidyverse) # Read in raw Data -------------------------------------------------------- df <- read_csv(here("2019", "2019-12-03", "parking_violations.csv")) small_df <- df %>% mutate(date = lubridate::date(issue_da...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/forestplot.R \name{forestplot} \alias{forestplot} \alias{forestplot.default} \title{Draws a forest plot} \usage{ forestplot(...) \method{forestplot}{default}(labeltext, mean, lower, upper, align, is.summary = FALSE, graph.pos = "right", hr...
/man/forestplot.Rd
no_license
MetaEntropy/forestplot
R
false
true
14,804
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/forestplot.R \name{forestplot} \alias{forestplot} \alias{forestplot.default} \title{Draws a forest plot} \usage{ forestplot(...) \method{forestplot}{default}(labeltext, mean, lower, upper, align, is.summary = FALSE, graph.pos = "right", hr...
/refm/api/src/rdoc/markup/simple_markup.rd
no_license
wanabe/rubydoc
R
false
false
9,906
rd
############################################################################# # # XLConnect # Copyright (C) 2010-2021 Mirai Solutions GmbH # # 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...
/inst/unitTests/runit.workbook.writeWorksheet.R
no_license
harisxue/xlconnect
R
false
false
2,134
r
############################################################################# # # XLConnect # Copyright (C) 2010-2021 Mirai Solutions GmbH # # 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...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/servicecatalog_operations.R \name{servicecatalog_describe_tag_option} \alias{servicecatalog_describe_tag_option} \title{Gets information about the specified TagOption} \usage{ servicecatalog_describe_tag_option(Id) } \arguments{ \item{Id}{[re...
/cran/paws.management/man/servicecatalog_describe_tag_option.Rd
permissive
johnnytommy/paws
R
false
true
528
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/servicecatalog_operations.R \name{servicecatalog_describe_tag_option} \alias{servicecatalog_describe_tag_option} \title{Gets information about the specified TagOption} \usage{ servicecatalog_describe_tag_option(Id) } \arguments{ \item{Id}{[re...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/summarize_model.R \name{summarize_model} \alias{summarize_model} \alias{summarise_model} \title{Summarize a mixed model} \usage{ summarize_model( model, ci = TRUE, cor_re = FALSE, cor_fe = FALSE, exponentiate = FALSE, digits = 2, ...
/man/summarize_model.Rd
permissive
shaoyoucheng/mixedup
R
false
true
2,063
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/summarize_model.R \name{summarize_model} \alias{summarize_model} \alias{summarise_model} \title{Summarize a mixed model} \usage{ summarize_model( model, ci = TRUE, cor_re = FALSE, cor_fe = FALSE, exponentiate = FALSE, digits = 2, ...
library(tidyverse) library(tidytext) library(igraph) # 1. data ---- dataMentah = read_csv(file = "https://raw.githubusercontent.com/eppofahmi/belajaR/master/99-BankData/tweet_save_monas.csv") # 2. data username dengan username ---- dataMentahNetwork1 = dataMentah %>% select(user_name, full_text) %>% filter(!dup...
/06-SNA-Tambahan/script/day04.R
permissive
eppofahmi/belajaR
R
false
false
1,411
r
library(tidyverse) library(tidytext) library(igraph) # 1. data ---- dataMentah = read_csv(file = "https://raw.githubusercontent.com/eppofahmi/belajaR/master/99-BankData/tweet_save_monas.csv") # 2. data username dengan username ---- dataMentahNetwork1 = dataMentah %>% select(user_name, full_text) %>% filter(!dup...
# FIGURE 1: barplot # TADs, # signif. TADs, # signif. TADs and FDR options(scipen=100) setDir = "" # Rscript report_figure1.R # script_name <- "report_figure1.R" startTime <- Sys.time() cat("> START ", script_name, "\n") SSHFS <- FALSE require(ggplot2) require(ggpubr) require(ggforce) require(ggsci) require(...
/report_figure1.R
no_license
marzuf/v2_Yuanlong_Cancer_HiC_data_TAD_DA
R
false
false
15,032
r
# FIGURE 1: barplot # TADs, # signif. TADs, # signif. TADs and FDR options(scipen=100) setDir = "" # Rscript report_figure1.R # script_name <- "report_figure1.R" startTime <- Sys.time() cat("> START ", script_name, "\n") SSHFS <- FALSE require(ggplot2) require(ggpubr) require(ggforce) require(ggsci) require(...
r=359.95 https://sandbox.dams.library.ucdavis.edu/fcrepo/rest/collection/sherry-lehmann/catalogs/d7zk5j/media/images/d7zk5j-001/svc:tesseract/full/full/359.95/default.jpg Accept:application/hocr+xml
/tesseract/rotate/d7zk5j-001.r
permissive
ucd-library/wine-price-extraction
R
false
false
199
r
r=359.95 https://sandbox.dams.library.ucdavis.edu/fcrepo/rest/collection/sherry-lehmann/catalogs/d7zk5j/media/images/d7zk5j-001/svc:tesseract/full/full/359.95/default.jpg Accept:application/hocr+xml
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/latency_one_threshold.R \name{latency_one_threshold} \alias{latency_one_threshold} \title{Calculate latency and status for meeting threshold} \usage{ latency_one_threshold(dataset, object, identifier = UID, time = age, group = group, size_t...
/man/latency_one_threshold.Rd
no_license
benostendorf/thresholdr
R
false
true
1,062
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/latency_one_threshold.R \name{latency_one_threshold} \alias{latency_one_threshold} \title{Calculate latency and status for meeting threshold} \usage{ latency_one_threshold(dataset, object, identifier = UID, time = age, group = group, size_t...
#' fucntion for cleaning PERCH data #' #' @param clean_options The list of options for cleaning PERCH data. The specific #' elements are as follows. #' \code{case_def}: the variable name that is used for case definition. #' \code{case_def_val}: The value of the case-definition variable. #' \code{X_strat}: A vector of s...
/R/perch_data_clean.R
no_license
dengdetian0603/PERCH.nplcm
R
false
false
7,937
r
#' fucntion for cleaning PERCH data #' #' @param clean_options The list of options for cleaning PERCH data. The specific #' elements are as follows. #' \code{case_def}: the variable name that is used for case definition. #' \code{case_def_val}: The value of the case-definition variable. #' \code{X_strat}: A vector of s...
library(datasets) library(ggplot2) DT<-data.frame(mtcars) head(DT) summary(DT) DT$am <- factor(DT$am,levels=c(0,1),labels=c("Automatic","Manual")) DT$cyl <- factor(DT$cyl,levels=c(4,6,8),labels=c("4cyl","6cyl","8cyl")) qplot(mpg, data=DT, geom="density", fill=am, alpha=I(.5), main="Distribution of Gas Milage...
/motor_trend.R
permissive
jungjung917/Motor-Trend
R
false
false
514
r
library(datasets) library(ggplot2) DT<-data.frame(mtcars) head(DT) summary(DT) DT$am <- factor(DT$am,levels=c(0,1),labels=c("Automatic","Manual")) DT$cyl <- factor(DT$cyl,levels=c(4,6,8),labels=c("4cyl","6cyl","8cyl")) qplot(mpg, data=DT, geom="density", fill=am, alpha=I(.5), main="Distribution of Gas Milage...
library(curl) library(plyr) require(xlsx) library(purrr) #Exploratory Data Analysis dcData<-read.csv("DC_Demand_New.csv") dcData<-na.omit(dcData) dcData_temp<-data.frame(dcData$ORIGIN_BLOCK_LATITUDE,dcData$ORIGIN_BLOCK_LONGITUDE) pickupCluster<-kmeans(dcData_temp,centers = 5,nstart = 25) #choosing number...
/Exploratory Data Analysis.R
no_license
Kamaleshwar-Ravichandran/DC-Taxi-Driver-Schedule-Optimization
R
false
false
1,881
r
library(curl) library(plyr) require(xlsx) library(purrr) #Exploratory Data Analysis dcData<-read.csv("DC_Demand_New.csv") dcData<-na.omit(dcData) dcData_temp<-data.frame(dcData$ORIGIN_BLOCK_LATITUDE,dcData$ORIGIN_BLOCK_LONGITUDE) pickupCluster<-kmeans(dcData_temp,centers = 5,nstart = 25) #choosing number...
######################################################################################################### # SPL Project # ######################################################################################################### # Choropleth Map Small Multiples # Inspiration: https://stackoverflow.com/questions/9186529...
/Old/Ideas/ChoroplethMaps.R
no_license
phinguyen44/SPL_Project
R
false
false
4,180
r
######################################################################################################### # SPL Project # ######################################################################################################### # Choropleth Map Small Multiples # Inspiration: https://stackoverflow.com/questions/9186529...
## map a "citation" or "bibentry" R object into schema.org # bib <- citation(pkg) #' @importFrom stringi stri_trans_general parse_citation <- function(bib){ cm <- parse_people(bib$author, new_codemeta()) authors <- cm$author bibtype <- bib$bibtype bibtype <- stringi::stri_trans_general(bibtype, id = "Title") ...
/R/parse_citation.R
permissive
annakrystalli/codemetar
R
false
false
2,484
r
## map a "citation" or "bibentry" R object into schema.org # bib <- citation(pkg) #' @importFrom stringi stri_trans_general parse_citation <- function(bib){ cm <- parse_people(bib$author, new_codemeta()) authors <- cm$author bibtype <- bib$bibtype bibtype <- stringi::stri_trans_general(bibtype, id = "Title") ...
t_nsah_srank_summary_df <- na.omit(t_nsah_srank_summary_df) for(name in names(t_nsah_srank_summary_df)) { if(name=="node_label"){ next } t_nsah_srank_summary_df[[name]] <- as.character(t_nsah_srank_summary_df[[name]]) t_nsah_srank_summary_df[[name]] <- as.numeric(t_nsah_srank_summary_df[[name]]) } rm(cols_to_c...
/t_nsah/clean_t_nsah_srank_df.R
permissive
samuelcg/thesis-data-scripts
R
false
false
379
r
t_nsah_srank_summary_df <- na.omit(t_nsah_srank_summary_df) for(name in names(t_nsah_srank_summary_df)) { if(name=="node_label"){ next } t_nsah_srank_summary_df[[name]] <- as.character(t_nsah_srank_summary_df[[name]]) t_nsah_srank_summary_df[[name]] <- as.numeric(t_nsah_srank_summary_df[[name]]) } rm(cols_to_c...
#' Create ITEMOverlapSet class #' #' Create ITEMDataSet class #' @param results.list list of results from ITEM() #' @return ITEMOverlapSet object #' @examples #' ITEMOverlapSet(results.list) #' @export ITEMOverlapSet <- function(results.list){ names(results.list) <- c("overlaps", "cor...
/R/ITEMOverlapSet.R
permissive
nickilott/PSC_UC_Host_Microbiome
R
false
false
457
r
#' Create ITEMOverlapSet class #' #' Create ITEMDataSet class #' @param results.list list of results from ITEM() #' @return ITEMOverlapSet object #' @examples #' ITEMOverlapSet(results.list) #' @export ITEMOverlapSet <- function(results.list){ names(results.list) <- c("overlaps", "cor...
### renser deadline ### ### DATABEHANDLING ### ### Henter data ---- library(dplyr) data("taet_paa_doden") data <- taet_paa_doden ### Renser data ---- output <- remove_additional_whitespaces(data) output <- swap_to_capital(output, c("[?!:]|[\\.\\!\\?:]{2,}")) output <- sentence_in_parentheses(output) #output <- gsu...
/dev/Rens af data/Bøger/taet_paa_doden_rens.R
no_license
Gulde91/KommaModel
R
false
false
2,161
r
### renser deadline ### ### DATABEHANDLING ### ### Henter data ---- library(dplyr) data("taet_paa_doden") data <- taet_paa_doden ### Renser data ---- output <- remove_additional_whitespaces(data) output <- swap_to_capital(output, c("[?!:]|[\\.\\!\\?:]{2,}")) output <- sentence_in_parentheses(output) #output <- gsu...
#Problem 1 library(VGAM) #Create data GSS = data.frame( Gender = c(rep("Male",2),rep("Female",2)), Race = c(rep(c("White","Black"),2)), Party = c(rep("D",4),rep("R",4),rep("I",4)), Count = c(132,42,172,56,176,6,129,4,127,12,130,15) ) GSS #Organize data gss = reshape(GSS, v.names = "Count", timevar = "Party",...
/Aaron/STAT426/STAT426 HW7.R
no_license
Achan40/STATclasses
R
false
false
1,969
r
#Problem 1 library(VGAM) #Create data GSS = data.frame( Gender = c(rep("Male",2),rep("Female",2)), Race = c(rep(c("White","Black"),2)), Party = c(rep("D",4),rep("R",4),rep("I",4)), Count = c(132,42,172,56,176,6,129,4,127,12,130,15) ) GSS #Organize data gss = reshape(GSS, v.names = "Count", timevar = "Party",...
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/app.r \name{getAppSession} \alias{getAppSession} \title{Get the session associated with the app object} \usage{ getAppSession(app = NULL) } \description{ Get the session associated with the app object }
/man/getAppSession.Rd
no_license
skranz/shinyEvents
R
false
true
282
rd
% Generated by roxygen2: do not edit by hand % Please edit documentation in R/app.r \name{getAppSession} \alias{getAppSession} \title{Get the session associated with the app object} \usage{ getAppSession(app = NULL) } \description{ Get the session associated with the app object }
######################## ## ## Annotate a list of yeast proteins with rna-binding domains (from Tuschel's census) ## ######################## library(rMQanalysis) library(biomaRt) library(WriteXLS) bg1 <- filterIdentifiedProteins(filterWholeDataset(read.delim("./analysis/MQ/proteinGroups_reference_lysate.txt"))) bg2 <...
/analysis/db/rbd.R
no_license
ssayols/rnafold_interactome_casas_vila_et_al
R
false
false
1,411
r
######################## ## ## Annotate a list of yeast proteins with rna-binding domains (from Tuschel's census) ## ######################## library(rMQanalysis) library(biomaRt) library(WriteXLS) bg1 <- filterIdentifiedProteins(filterWholeDataset(read.delim("./analysis/MQ/proteinGroups_reference_lysate.txt"))) bg2 <...
library(gdata) ### Name: ls.funs ### Title: List function objects ### Aliases: ls.funs ### Keywords: misc environment ### ** Examples ## List functions defined in the global environment: ls.funs() ## List functions available in the base package: ls.funs("package:base")
/data/genthat_extracted_code/gdata/examples/ls.funs.Rd.R
no_license
surayaaramli/typeRrh
R
false
false
278
r
library(gdata) ### Name: ls.funs ### Title: List function objects ### Aliases: ls.funs ### Keywords: misc environment ### ** Examples ## List functions defined in the global environment: ls.funs() ## List functions available in the base package: ls.funs("package:base")
data(iris) library(rpart) arvore <- rpart(Species ~ ., method="class", data=iris) install.packages("rattle") library(rattle) fancyRpartPlot(arvore)
/fancyRpartPlot.R
no_license
felipejsoares/Useful_Small_R_Codes
R
false
false
164
r
data(iris) library(rpart) arvore <- rpart(Species ~ ., method="class", data=iris) install.packages("rattle") library(rattle) fancyRpartPlot(arvore)
#' #' @title Performs the optimization of a model to estimate parameters #' @description This function is similar to OpenMx function \code{mxRun}. #' @details See details of the OpenMx function 'mxRun' in the package \code{OpenMx}. #' @param model an mxModel object to be optimized. #' @param intervals a boolean indic...
/R/mxRunDS.R
no_license
datashield/dsMx
R
false
false
2,248
r
#' #' @title Performs the optimization of a model to estimate parameters #' @description This function is similar to OpenMx function \code{mxRun}. #' @details See details of the OpenMx function 'mxRun' in the package \code{OpenMx}. #' @param model an mxModel object to be optimized. #' @param intervals a boolean indic...
<?xml version="1.0" encoding="utf-8"?> <serviceModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ConvertIO" generation="1" functional="0" release="0" Id="de56c0da-bc29-49bb-b38d-d32a322e4282" dslVersion="1.2.0.0" xmlns="http://schemas.microsoft.com/dsltools/...
/ConvertIO/csx/Debug/ServiceDefinition.rd
no_license
eldrad294/ConvertIO
R
false
false
7,241
rd
<?xml version="1.0" encoding="utf-8"?> <serviceModel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="ConvertIO" generation="1" functional="0" release="0" Id="de56c0da-bc29-49bb-b38d-d32a322e4282" dslVersion="1.2.0.0" xmlns="http://schemas.microsoft.com/dsltools/...
####################################################### # Source code ####################################################### library(LaplacesDemon) library(BioGeoBEARS) source('/Dropbox/_njm/__packages/BioGeoBEARS_setup/BioGeoBEARS_basics_v1.R', chdir = TRUE) source('/Dropbox/_njm/__packages/BioGeoBEARS_setup/BioGeoB...
/inst/extdata/examples/area_colors_v01.R
no_license
pedroreys/BioGeoBEARS
R
false
false
3,286
r
####################################################### # Source code ####################################################### library(LaplacesDemon) library(BioGeoBEARS) source('/Dropbox/_njm/__packages/BioGeoBEARS_setup/BioGeoBEARS_basics_v1.R', chdir = TRUE) source('/Dropbox/_njm/__packages/BioGeoBEARS_setup/BioGeoB...
## ui.R library(shiny) library(rCharts) shinyUI(fluidPage( conditionalPanel( titlePanel("Przykład rCharts")), sidebarLayout( sidebarPanel( sliderInput("Szerokość wykresu", inputId = 'szerokosc', min = 200, max = 1000, value=600) ), mainPanel( showOutput("dekompo...
/magisterskie/5_rok/1_semestr/TWDwR/laboratoria/RCharts/ui.R
no_license
sommermarta/studia
R
false
false
383
r
## ui.R library(shiny) library(rCharts) shinyUI(fluidPage( conditionalPanel( titlePanel("Przykład rCharts")), sidebarLayout( sidebarPanel( sliderInput("Szerokość wykresu", inputId = 'szerokosc', min = 200, max = 1000, value=600) ), mainPanel( showOutput("dekompo...
\alias{gtkTipsQueryStopQuery} \name{gtkTipsQueryStopQuery} \title{gtkTipsQueryStopQuery} \description{ Stops a query. \strong{WARNING: \code{gtk_tips_query_stop_query} is deprecated and should not be used in newly-written code.} } \usage{gtkTipsQueryStopQuery(object)} \arguments{\item{\code{object}}{[\code{\link{GtkTip...
/man/gtkTipsQueryStopQuery.Rd
no_license
cran/RGtk2.10
R
false
false
433
rd
\alias{gtkTipsQueryStopQuery} \name{gtkTipsQueryStopQuery} \title{gtkTipsQueryStopQuery} \description{ Stops a query. \strong{WARNING: \code{gtk_tips_query_stop_query} is deprecated and should not be used in newly-written code.} } \usage{gtkTipsQueryStopQuery(object)} \arguments{\item{\code{object}}{[\code{\link{GtkTip...
testlist <- list(rates = numeric(0), thresholds = numeric(0), x = -8.52438965094343e+245) result <- do.call(grattan::IncomeTax,testlist) str(result)
/grattan/inst/testfiles/IncomeTax/libFuzzer_IncomeTax/IncomeTax_valgrind_files/1610383025-test.R
no_license
akhikolla/updated-only-Issues
R
false
false
148
r
testlist <- list(rates = numeric(0), thresholds = numeric(0), x = -8.52438965094343e+245) result <- do.call(grattan::IncomeTax,testlist) str(result)
fileurl <- 'https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip' # create a temporary directory td = tempdir() # create the placeholder file tf = tempfile(tmpdir=td, fileext=".zip") # download into the placeholder file download.file(fileurl, tf) # unzip the file to root directory unzip...
/plot4.R
no_license
sugarpeas79/ExData_Plotting1
R
false
false
2,388
r
fileurl <- 'https://d396qusza40orc.cloudfront.net/exdata%2Fdata%2Fhousehold_power_consumption.zip' # create a temporary directory td = tempdir() # create the placeholder file tf = tempfile(tmpdir=td, fileext=".zip") # download into the placeholder file download.file(fileurl, tf) # unzip the file to root directory unzip...
#' @title Metric: Repetitions #' #' @description Provides summuary statistics on the number of repetitions, at the level of activity types, traces, cases and the eventlog. #' #' @param eventlog The event log to be used. An object of class #' \code{eventlog}. #' #' @param level_of_analysis At which level the analysis...
/R/repetitions.R
no_license
bbrewington/edeaR
R
false
false
982
r
#' @title Metric: Repetitions #' #' @description Provides summuary statistics on the number of repetitions, at the level of activity types, traces, cases and the eventlog. #' #' @param eventlog The event log to be used. An object of class #' \code{eventlog}. #' #' @param level_of_analysis At which level the analysis...
lam = 0.3 samp1 = 100 #KL divergence kl = function(original , app){ return(original%*%log(original/app)) } # fisher information fish_info = function(ori_lam, n){ return((1/ori_lam)^2*n) } samples = rexp(samp1,0.3) eps1 <- rnorm(100,mean = 2,sd = 0.4) y = lam*(exp(lam*samples)) + e...
/CS6464/CS19M023_assn1/CODE/t2_last.R
no_license
kevaldodiya/CS6464-Concept-of-Stastical-Learning-Theory-
R
false
false
853
r
lam = 0.3 samp1 = 100 #KL divergence kl = function(original , app){ return(original%*%log(original/app)) } # fisher information fish_info = function(ori_lam, n){ return((1/ori_lam)^2*n) } samples = rexp(samp1,0.3) eps1 <- rnorm(100,mean = 2,sd = 0.4) y = lam*(exp(lam*samples)) + e...
library(spectrolab) library(tidyverse) ####Read in data as spectra yKDeltLib_spectra<-read_spectra("Original_data/Field_spec/YKDeltLib", format="sed") ##Remove eightmileflight1 scans yKDeltLib_spectra<-yKDeltLib_spectra[grep("site21clasticprobe",invert=TRUE,names(yKDeltLib_spectra))] ...
/Scripts/1_FieldSpec/1_By_site_PSR/YK_Spectral_Library2.R
no_license
bryophyter/Alaska_Spectral_Library
R
false
false
1,790
r
library(spectrolab) library(tidyverse) ####Read in data as spectra yKDeltLib_spectra<-read_spectra("Original_data/Field_spec/YKDeltLib", format="sed") ##Remove eightmileflight1 scans yKDeltLib_spectra<-yKDeltLib_spectra[grep("site21clasticprobe",invert=TRUE,names(yKDeltLib_spectra))] ...
#' Plot sex-ratio data and fits for two sex models #' #' Plot sex-ratio data and fits from Stock Synthesis output. Multi-figure #' plots depend on \code{make_multifig}. #' #' #' @param replist list created by \code{SSoutput} #' @param kind indicator of type of plot can be "LEN", "SIZE", "AGE", "cond", #' "GSTAGE", "L[...
/R/SSplotSexRatio.R
no_license
mkapur/r4ss
R
false
false
8,286
r
#' Plot sex-ratio data and fits for two sex models #' #' Plot sex-ratio data and fits from Stock Synthesis output. Multi-figure #' plots depend on \code{make_multifig}. #' #' #' @param replist list created by \code{SSoutput} #' @param kind indicator of type of plot can be "LEN", "SIZE", "AGE", "cond", #' "GSTAGE", "L[...
% Generated by roxygen2 (4.1.1.9000): do not edit by hand % Please edit documentation in R/theta.unlist.R \name{theta.unlist} \alias{theta.unlist} \title{M-step of the EM algorithm} \usage{ theta.unlist(theta) } \arguments{ \item{phat}{The array of normalized counts (sample proportions) of format (r[1],...,r[m])} \ite...
/man/theta.unlist.Rd
no_license
pzwiernik/LatentClass
R
false
false
565
rd
% Generated by roxygen2 (4.1.1.9000): do not edit by hand % Please edit documentation in R/theta.unlist.R \name{theta.unlist} \alias{theta.unlist} \title{M-step of the EM algorithm} \usage{ theta.unlist(theta) } \arguments{ \item{phat}{The array of normalized counts (sample proportions) of format (r[1],...,r[m])} \ite...
/refm/api/src/shell/error.rd
no_license
wanabe/rubydoc
R
false
false
738
rd
library(mlbench) library(ISLR) library(caret) library(DataExplorer) library(tidyverse) library(car) library(MASS) library(ROCR) library(polycor) library(corrplot) data("PimaIndiansDiabetes2") pima<-PimaIndiansDiabetes2 dim(pima) glimpse(pima) plot_missing(pima) glimpse(pima) #correlations <- cor(pima) #corrplot(correl...
/Logistic_diagnosis.R
no_license
jawyoonis/Data_Analytics-and-machine_learning-
R
false
false
2,762
r
library(mlbench) library(ISLR) library(caret) library(DataExplorer) library(tidyverse) library(car) library(MASS) library(ROCR) library(polycor) library(corrplot) data("PimaIndiansDiabetes2") pima<-PimaIndiansDiabetes2 dim(pima) glimpse(pima) plot_missing(pima) glimpse(pima) #correlations <- cor(pima) #corrplot(correl...
import_nexis_uk_html <- function(file, paragraph_separator){ #Convert format cat('Reading', file, '\n') line <- readLines(file, warn = FALSE, encoding = "UTF-8") html <- paste0(fix_nexis_uk_html(line), collapse = "\n") #Load as DOM object dom <- htmlParse(html, encoding = "UTF-8") data <-...
/R/nexis-uk.R
no_license
koheiw/newspapers
R
false
false
3,418
r
import_nexis_uk_html <- function(file, paragraph_separator){ #Convert format cat('Reading', file, '\n') line <- readLines(file, warn = FALSE, encoding = "UTF-8") html <- paste0(fix_nexis_uk_html(line), collapse = "\n") #Load as DOM object dom <- htmlParse(html, encoding = "UTF-8") data <-...
testlist <- list(lims = structure(c(1.25986739689518e-321, 1.39067107867781e-309, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(10L, 2L)), points = structure(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.7066692400184e-313, 7.29290188850906e-304), .Dim = c(6L, 2L))) result <- do.call(palm:::pbc_distances,testl...
/palm/inst/testfiles/pbc_distances/libFuzzer_pbc_distances/pbc_distances_valgrind_files/1612988159-test.R
no_license
akhikolla/updatedatatype-list2
R
false
false
336
r
testlist <- list(lims = structure(c(1.25986739689518e-321, 1.39067107867781e-309, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0), .Dim = c(10L, 2L)), points = structure(c(0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1.7066692400184e-313, 7.29290188850906e-304), .Dim = c(6L, 2L))) result <- do.call(palm:::pbc_distances,testl...
# Put custom tests in this file. # Uncommenting the following line of code will disable # auto-detection of new variables and thus prevent swirl from # executing every command twice, which can slow things down. # AUTO_DETECT_NEWVAR <- FALSE # However, this means that y...
/Quantifiers/customTests.R
permissive
erhard1/Regular_Expressions
R
false
false
2,121
r
# Put custom tests in this file. # Uncommenting the following line of code will disable # auto-detection of new variables and thus prevent swirl from # executing every command twice, which can slow things down. # AUTO_DETECT_NEWVAR <- FALSE # However, this means that y...
pi # 3.141593 print(pi, 15) # 3.14159265358979 round(pi, 5) # 3.14159 round(pi) # 3 round(-pi) # -3 floor(pi) # 3 floor(-pi) # -4 ceiling(pi) # 4 ceiling(-pi) # -3 trunc(pi) # 3 trunc(-pi) # -3
/r04-methods.R
no_license
juancsosap/rtraining
R
false
false
213
r
pi # 3.141593 print(pi, 15) # 3.14159265358979 round(pi, 5) # 3.14159 round(pi) # 3 round(-pi) # -3 floor(pi) # 3 floor(-pi) # -4 ceiling(pi) # 4 ceiling(-pi) # -3 trunc(pi) # 3 trunc(-pi) # -3
# 4. faza: Analiza podatkov library(ggplot2) nesrece$Row <- 1:nrow(nesrece) tabela_1 <- lapply(tabelaBDP$State, function(x) { r <- grep(x, nesrece$Lokacija) return(data.frame(State = rep(x, length(r)), Row = r)) }) %>% bind_rows() %>% as.data.frame() %>% inner_join(nesrece, by = "Row") %>% inner_join(tabelaBDP...
/analiza/analiza.r
permissive
valentina2pucer/APPR-2015-16
R
false
false
1,852
r
# 4. faza: Analiza podatkov library(ggplot2) nesrece$Row <- 1:nrow(nesrece) tabela_1 <- lapply(tabelaBDP$State, function(x) { r <- grep(x, nesrece$Lokacija) return(data.frame(State = rep(x, length(r)), Row = r)) }) %>% bind_rows() %>% as.data.frame() %>% inner_join(nesrece, by = "Row") %>% inner_join(tabelaBDP...
library(rgdal) library(ggplot2) library(wesanderson) library(RColorBrewer) library(maptools) library(rosm) library(prettymapr) library(rgeos) library(ggmap) library(viridis) library(ggsn) buurts = readOGR("buurten.shp") buurt_df = data.frame(buurts) #buurt_transform = spTransform(buurts, CRS("+proj=longlat +init=epsg:4...
/PolicyAnalysis/BoP/Furniture/Visualization/Visualization_fin.R
no_license
ruchik1504/ThesisCode
R
false
false
1,415
r
library(rgdal) library(ggplot2) library(wesanderson) library(RColorBrewer) library(maptools) library(rosm) library(prettymapr) library(rgeos) library(ggmap) library(viridis) library(ggsn) buurts = readOGR("buurten.shp") buurt_df = data.frame(buurts) #buurt_transform = spTransform(buurts, CRS("+proj=longlat +init=epsg:4...
#' @include allClasses.R NULL #' Obtaining the cutpoints and / or regroupments of a discretization. #' @name cutpoints #' @rdname cutpoints-method #' @aliases cutpoints,glmdisc-method #' @param glmdisc The trained glmdisc S4 object. #' @description This defines the method to provide the cutpoints of a trained glmdisc....
/fuzzedpackages/glmdisc/R/method_cutpoints.R
no_license
akhikolla/testpackages
R
false
false
1,885
r
#' @include allClasses.R NULL #' Obtaining the cutpoints and / or regroupments of a discretization. #' @name cutpoints #' @rdname cutpoints-method #' @aliases cutpoints,glmdisc-method #' @param glmdisc The trained glmdisc S4 object. #' @description This defines the method to provide the cutpoints of a trained glmdisc....
#문제1 exam1 <- function(){ alpha <- for(i in 1:24){cat(LETTERS[i],letters[i], sep = " ", "\t")} return(alpha) } exam1() #문제2 exam2 <- function(x){ sum <- 0 for(i in 1:x){ sum <- sum + i } return(sum) } exam2(4) #문제3 exam3 <- function(x,y){ if(x>=y){result = x-y} else{result = y-x} return(result) ...
/실습/lab5.R
no_license
cseoy73/R-DataAnalysis
R
false
false
1,402
r
#문제1 exam1 <- function(){ alpha <- for(i in 1:24){cat(LETTERS[i],letters[i], sep = " ", "\t")} return(alpha) } exam1() #문제2 exam2 <- function(x){ sum <- 0 for(i in 1:x){ sum <- sum + i } return(sum) } exam2(4) #문제3 exam3 <- function(x,y){ if(x>=y){result = x-y} else{result = y-x} return(result) ...