Skip to content

Commit

Permalink
v0.0.9
Browse files Browse the repository at this point in the history
  • Loading branch information
2005m committed Sep 12, 2021
1 parent 7a04da8 commit 4354338
Show file tree
Hide file tree
Showing 6 changed files with 28 additions and 19 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: kit
Type: Package
Title: Data Manipulation Functions Implemented in C
Version: 0.0.8
Date: 2021-08-21
Version: 0.0.9
Date: 2021-09-12
Authors@R: c(person("Morgan", "Jacob", role = c("aut", "cre", "cph"), email = "[email protected]"))
Author: Morgan Jacob [aut, cre, cph]
Maintainer: Morgan Jacob <[email protected]>
Expand Down
8 changes: 4 additions & 4 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
6071edd604dbeb75308cfbedc7790398 *cleanup
66d4daddd0163539f19e2cb783fc3bb9 *configure
25392607154756ce2d58afb07245efaf *DESCRIPTION
c5b117f07a0df5d90d1c66c5390ec626 *inst/NEWS.Rd
032f497563062c67c360f2cbbabad526 *DESCRIPTION
5c267ba48bdd845348c286ec3b08f5c1 *inst/NEWS.Rd
a87b0f223435ed35607e8514562b8bfe *LICENSE
6375b9e30533e0495b98f4b5b829706b *man/charToFact.Rd
8f19a2c9feb2f352580fd4892650f285 *man/count.Rd
Expand All @@ -16,14 +16,14 @@ a137f7855b41b074e2babaf8a1562551 *man/shareData.Rd
54f91d543a10f8c9aef7082da2b86de7 *man/topn.Rd
3c628c2a27764ec5df2b4980921c310f *man/vswitch.Rd
640100c58f36cf06c14aacd7ff7a946a *NAMESPACE
350a6c4fcd103db180ab34375cb04bcc *R/call.R
a93eb67d15da2c12dde6b9a6de93e10b *R/call.R
34ba4d931a5bd0ba120ddef7e5327313 *README.md
4826023c3ffe528db5e2af5db2a84b5a *src/dup.c
e86a1960c335e7d534a4683b52d8b70c *src/dupLen.c
84dc17b4330566e5beb69626ad9d268e *src/fpos.c
c362509861cd6835c1d8adbb0dce02b4 *src/iif.c
253a8c2c729dc6e0557dd70cf6e7f530 *src/init.c
791ba8c72656c5dc163fb9b5dfae6004 *src/kit.h
4f0b51d262c28db77550bca462b21ffa *src/kit.h
a52426250b954a335b1121948e057ee7 *src/Makevars.in
95e3011e37d9dde0d75f3a3819b2acd3 *src/Makevars.win
8e997b5d5d44af5cea7eafb48a4b9745 *src/nswitch.c
Expand Down
2 changes: 1 addition & 1 deletion R/call.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ topn = function(vec, n=6L, decreasing=TRUE, hasna=TRUE,index=TRUE) if(ind
uniqLen = function(x) .Call(CdupLenR, x)
vswitch = function(x, values, outputs, default=NULL, nThread=getOption("kit.nThread"), checkEnc = TRUE) .Call(CvswitchR, x, values, outputs, default, nThread, checkEnc)

.onAttach = function(libname, pkgname) packageStartupMessage(paste0("Attaching kit 0.0.8 (OPENMP ",if(.Call(CompEnabledR)) "enabled" else "disabled"," using 1 thread)"))
.onAttach = function(libname, pkgname) packageStartupMessage(paste0("Attaching kit 0.0.9 (OPENMP ",if(.Call(CompEnabledR)) "enabled" else "disabled"," using 1 thread)"))
.onLoad = function(libname, pkgname) options("kit.nThread"=1L) #nocov
.onUnload = function(libpath) library.dynam.unload("kit", libpath) #nocov

Expand Down
8 changes: 8 additions & 0 deletions inst/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@

\newcommand{\CRANpkg}{\href{https://CRAN.R-project.org/package=#1}{\pkg{#1}}}

\section{version 0.0.9 (2021-09-12)}{
\subsection{Notes}{
\itemize{
\item Re-organise header to prevent compilation errors with new version of Clang due to conflicts between R C headers and OpenMP.
}
}
}

\section{version 0.0.8 (2021-08-21)}{
\subsection{New Features}{
\itemize{
Expand Down
23 changes: 12 additions & 11 deletions src/kit.h
Original file line number Diff line number Diff line change
@@ -1,14 +1,3 @@
#include <R.h>
#include <R_ext/Rdynload.h>
#include <Rversion.h>
#if !defined(R_VERSION) || R_VERSION < R_Version(3, 5, 0)
#define USE_RINTERNALS
#define DATAPTR_RO(x) ((const void *)DATAPTR(x))
#endif
#include <Rinternals.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>
#ifdef _OPENMP
#include<omp.h>
#define omp_enabled true
Expand All @@ -23,6 +12,18 @@
#define OMP_PARALLEL_FOR(n)
#endif

#include <R.h>
#include <R_ext/Rdynload.h>
#include <Rversion.h>
#if !defined(R_VERSION) || R_VERSION < R_Version(3, 5, 0)
#define USE_RINTERNALS
#define DATAPTR_RO(x) ((const void *)DATAPTR(x))
#endif
#include <Rinternals.h>
#include <stdlib.h>
#include <stdint.h>
#include <stdbool.h>

#if !defined SSIZE_MAX
#define SSIZE_MAX LLONG_MAX
#endif
Expand Down
2 changes: 1 addition & 1 deletion tests/test_kit.Rout.save
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ Type 'q()' to quit R.
+ }
>
> library(kit); unloadNamespace("kit")
Attaching kit 0.0.8 (OPENMP enabled using 1 thread)
Attaching kit 0.0.9 (OPENMP enabled using 1 thread)
>
> topn = kit::topn
> setlevels = kit::setlevels
Expand Down

0 comments on commit 4354338

Please sign in to comment.