diff --git a/DESCRIPTION b/DESCRIPTION index 809562945..c49c7537a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: xcms -Version: 4.5.0 +Version: 4.5.1 Title: LC-MS and GC-MS Data Analysis Description: Framework for processing and visualization of chromatographically separated and single-spectra mass spectral data. Imports from AIA/ANDI NetCDF, diff --git a/NEWS.md b/NEWS.md index 536bc58e5..c1eced596 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,3 +1,9 @@ +# xcms 4.5.1 + +## Changes in version 4.5.1 + +- Fix compile errors with R-4.5 + # xcms 4.3 ## Changes in version 4.3.4 diff --git a/src/massifquant/xcms_massifquant.cpp b/src/massifquant/xcms_massifquant.cpp index 086c40468..b43713756 100644 --- a/src/massifquant/xcms_massifquant.cpp +++ b/src/massifquant/xcms_massifquant.cpp @@ -59,7 +59,7 @@ extern "C" SEXP massifquant(SEXP mz, SEXP intensity, SEXP scanindex, } if ((scanrangeFrom < firstScan) || (scanrangeFrom > totalScanNums) || (scanrangeTo < firstScan) || (scanrangeTo > totalScanNums)) - error("Error in scanrange \n"); + Rf_error("Error in scanrange \n"); //show the progress please Rprintf("\n Detecting Kalman ROI's ... \n percent finished: "); @@ -112,17 +112,17 @@ extern "C" SEXP massifquant(SEXP mz, SEXP intensity, SEXP scanindex, Rprintf(" %d\n", 100); const char *names[N_NAMES] = {"mz", "mzmin", "mzmax", "scmin", "scmax", "length", "intensity"}; - PROTECT(list_names = allocVector(STRSXP, N_NAMES)); + PROTECT(list_names = Rf_allocVector(STRSXP, N_NAMES)); for(int j = 0; j < N_NAMES; j++) - SET_STRING_ELT(list_names, j, mkChar(names[j])); + SET_STRING_ELT(list_names, j, Rf_mkChar(names[j])); - PROTECT(peaklist = allocVector(VECSXP, busybody.getPicCounts())); + PROTECT(peaklist = Rf_allocVector(VECSXP, busybody.getPicCounts())); for (int i=0;i featInfo = busybody.iterOverFeatures(i, pscantime); //jo int scanLength = int(featInfo.at(5) - featInfo.at(4) + 1); - PROTECT(entrylist = allocVector(VECSXP, N_NAMES)); + PROTECT(entrylist = Rf_allocVector(VECSXP, N_NAMES)); //allow for new vars declared to be passed out PROTECT(vmz = NEW_NUMERIC(1)); @@ -153,7 +153,7 @@ extern "C" SEXP massifquant(SEXP mz, SEXP intensity, SEXP scanindex, SET_VECTOR_ELT(entrylist, 5, vlength); SET_VECTOR_ELT(entrylist, 6, vintensity); - setAttrib(entrylist, R_NamesSymbol, list_names); //attaching the vector names + Rf_setAttrib(entrylist, R_NamesSymbol, list_names); //attaching the vector names SET_VECTOR_ELT(peaklist, i, entrylist); UNPROTECT(N_NAMES + 1); //entrylist + values }