Skip to content

Commit

Permalink
Adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
2005m committed May 3, 2024
1 parent 66d5f3c commit c936005
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 13 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: kit
Type: Package
Title: Data Manipulation Functions Implemented in C
Version: 0.0.17
Date: 2024-04-25
Date: 2024-05-03
Authors@R: c(person("Morgan", "Jacob", role = c("aut", "cre", "cph"), email = "[email protected]"),
person("Sebastian", "Krantz", role = "ctb"))
Author: Morgan Jacob [aut, cre, cph], Sebastian Krantz [ctb]
Expand Down
10 changes: 5 additions & 5 deletions MD5
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
6071edd604dbeb75308cfbedc7790398 *cleanup
d2761d00effd7b096a5bea21bc38742e *configure
84c00d2038959aeab8360c78c40b4d98 *DESCRIPTION
1c23c84234162f70c2f2ad986476697e *inst/NEWS.Rd
19158cf849aa973c876999d7c349e5f6 *DESCRIPTION
579d6713a55c0d47166988596a7defe5 *inst/NEWS.Rd
a87b0f223435ed35607e8514562b8bfe *LICENSE
2ddfa8d8739668eedda260e6ddc935d4 *man/charToFact.Rd
8f19a2c9feb2f352580fd4892650f285 *man/count.Rd
Expand All @@ -18,7 +18,7 @@ a7f31cee15b9624dab8f4d13d3c66bad *man/vswitch.Rd
c797ca387dccc02751cfe85108fb0159 *NAMESPACE
1eb8bec6ee346933bfbff2acda381402 *R/call.R
2d6c06dfc570d456af125c160cf150d7 *README.md
4bd66ada38968d317edfb6f3dd95c947 *src/dup.c
f8a685dd117b590adaae0c0c6dfb8de2 *src/dup.c
e89fa490ca241429f9f7adbea3b931de *src/dupLen.c
5eaee76c99ff42679577592ae9c5a29f *src/fpos.c
2a47a4eb3de647b3d2e21775c95ede42 *src/iif.c
Expand All @@ -27,11 +27,11 @@ b929f70ab892f155eeead08c160ffc25 *src/kit.h
a52426250b954a335b1121948e057ee7 *src/Makevars.in
95e3011e37d9dde0d75f3a3819b2acd3 *src/Makevars.win
b13fc207b052914c3d078eb5759cecce *src/nswitch.c
26b7ca31f8c1b87e4d381c5a991daaae *src/psort.c
0f3d02f6281d978ffb89098311aa0305 *src/psort.c
1d70a2f6d6d5821039dd4ba0caab8a68 *src/psum.c
2c6e521b15f59e489cf31a53c1530b60 *src/share.c
ef9329d7e748c13b9526fca1788a1891 *src/topn.c
2cde70cd4cbf783f0b01a9dd70c01ac9 *src/utils.c
719ad7753149642df0dd7c0c38c57e28 *src/vswitch.c
746bdc5ecf3683dbdf4bb740e593c9f7 *src/vswitch.c
6af1b66c0c90f6809c960e2133c1b5e4 *tests/test_kit.R
0dce9bd953fe40b1c8fae3d01a597e7c *tests/test_kit.Rout.save
4 changes: 3 additions & 1 deletion inst/NEWS.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

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

\section{version 0.0.17 (2024-04-25)}{
\section{version 0.0.17 (2024-05-03)}{
\subsection{Bug Fixes}{
\itemize{
\item Fix \code{nswitch}. Thanks to Sebastian Krantz for raising an issue.
Expand All @@ -13,6 +13,8 @@
\subsection{Notes}{
\itemize{
\item Update copyright date in c files

\item Fix note on CRAN regarding SETLENGTH
}
}
}
Expand Down
6 changes: 4 additions & 2 deletions src/dup.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,8 @@ SEXP dupVecR(SEXP x, SEXP uniq, SEXP fromLast) {
}
}
if (j != len) {
SETLENGTH(ans, j);
ans = Rf_xlengthgets(ans, j);
copyMostAttrib(x, ans);
}
}
Free(count);
Expand Down Expand Up @@ -892,7 +893,8 @@ SEXP dupVecR(SEXP x, SEXP uniq, SEXP fromLast) {
}
}
if (j != 3) {
SETLENGTH(ans, j);
ans = Rf_xlengthgets(ans, j);
copyMostAttrib(x, ans);
}
}
Free(count);
Expand Down
11 changes: 7 additions & 4 deletions src/psort.c
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ SEXP cpsortR (SEXP x, SEXP decreasing, SEXP nthread, SEXP nalast, SEXP env, SEXP
}
}
if (ct > 0) {
SETLENGTH(valSorted, nlen-ct);
valSorted = Rf_xlengthgets(valSorted, nlen-ct);
}
}
UNPROTECT(2);
Expand Down Expand Up @@ -513,7 +513,7 @@ SEXP cpsortR (SEXP x, SEXP decreasing, SEXP nthread, SEXP nalast, SEXP env, SEXP
}
}
if (ct > 0) {
SETLENGTH(ans, xlen-ct);
ans = Rf_xlengthgets(ans, xlen-ct);
}
}
} else {*/
Expand All @@ -531,7 +531,10 @@ SEXP cpsortR (SEXP x, SEXP decreasing, SEXP nthread, SEXP nalast, SEXP env, SEXP
}
}
if (ct > 0) {
SETLENGTH(ans, xlen-ct);
ans = Rf_xlengthgets(ans, xlen-ct);
if (!cindex) {
copyMostAttrib(x, ans);
}
}
}
//}
Expand Down Expand Up @@ -610,7 +613,7 @@ SEXP charToFactR (SEXP x, SEXP decreasing, SEXP nthread, SEXP nalast, SEXP env,

free(lookupTable);
if (addNAv == 0) {
SETLENGTH(valSorted, LENGTH(valSorted)-1);
valSorted = Rf_xlengthgets(valSorted, LENGTH(valSorted)-1);
}
setAttrib(ans, R_LevelsSymbol, valSorted);
SEXP classV = PROTECT(allocVector(STRSXP,1));
Expand Down

0 comments on commit c936005

Please sign in to comment.