Skip to content

Commit f9cfa1b

Browse files
author
Kieran Elmes
committed
separate R and utils build files
1 parent 2579cf6 commit f9cfa1b

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+60
-8717
lines changed

.Rbuildignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
^utils$

DESCRIPTION

+1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ Description: Performs lasso regression on pairwise combinations of the input mat
77
License: GPL (>= 2)
88
Encoding: UTF-8
99
LazyData: true
10+
NeedsCompilation: yes
1011
RoxygenNote: 6.1.1

Makefile.am

-3
This file was deleted.

NAMESPACE

+2-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
1-
# Generated by roxygen2: do not edit by hand
2-
3-
export()
1+
useDynLib("LassoTesting", .registration=TRUE)
2+
export(cyclic_lasso)

R/lasso.R

+5-4
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
11
#' @title Cyclic Lasso Function
22
#'
3+
#' @name cyclic_lasso
34
#' @description Performas a cyclic lasso
45
#' @param X_filename, Y_filename, lambda, n, p
56
#' @export
67
#' @examples
78
#' cyclic_lasso(xName = "X.csv", yName = "Y.csv", lambda = 20, n = 1000, p = 100)
9+
#' @useDynLib LassoTesting
810

9-
10-
dyn.load("build/src/.libs/liblassoPackage.so.0")
1111
cyclic_lasso <- function(xName = "X.csv", yName = "Y.csv", lambda = 20, n = 1000, p = 100) {
12-
Ret = .C("lasso", as.character(xName), as.character(yName), as.numeric(lambda), as.integer(n), as.integer(p))
12+
#dyn.load(LassoTesting)
13+
Ret = .Call(lasso_, as.character(xName), as.character(yName), as.numeric(lambda), as.integer(n), as.integer(p))
1314
#Ret = "test"
1415
return(Ret)
15-
}
16+
}

cleanup

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#! /bin/sh
2+
3+
rm -f config.* autom4te.cache src/Makevars src/config.h
4+
5+
exit 0

configure.ac

+12-9
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,17 @@
33

44
AC_PREREQ([2.69])
55
AC_INIT([FULL-PACKAGE-NAME], [VERSION], [BUG-REPORT-ADDRESS])
6-
AM_INIT_AUTOMAKE([-Wall -Werror foreign])
76
AC_CONFIG_SRCDIR([config.h.in])
87
AC_CONFIG_HEADERS([config.h])
98
AC_CONFIG_MACRO_DIRS([m4])
109
m4_ifdef([AM_PROG_AR], [AM_PROG_AR])
1110
LT_INIT
1211

12+
AC_PATH_PROG([PKG_CONFIG], [pkg-config])
13+
if test -z "${PKG_CONFIG}"; then
14+
AC_MSG_ERROR([cannot find pkg-config])
15+
fi
16+
1317
# Checks for programs.
1418
AC_PROG_CC
1519
AC_PROG_CXX
@@ -18,15 +22,17 @@ AC_PROG_INSTALL
1822
AC_PROG_MKDIR_P
1923

2024
# Checks for libraries.
21-
PKG_CHECK_MODULES(GLIB, glib-2.0)
22-
PKG_CHECK_MODULES(GSL, gsl)
23-
PKG_CHECK_MODULES(NCURSES, ncurses)
24-
PKG_CHECK_MODULES(R, libR)
2525
# FIXME: Replace `main' with a function in `-largeArrayDims':
2626
AC_CHECK_LIB([argeArrayDims], [main])
2727
# FIXME: Replace `main' with a function in `-lgomp':
2828
AC_CHECK_LIB([gomp], [main])
2929

30+
PKG_CFLAGS=`"${PKG_CONFIG}" --cflags glib-2.0 ncurses libR gsl`
31+
PKG_LIBS=`"${PKG_CONFIG}" --libs glib-2.0 ncurses libR gsl`
32+
33+
AC_SUBST(PKG_CFLAGS)
34+
AC_SUBST(PKG_LIBS)
35+
3036
# Checks for header files.
3137
AC_CHECK_HEADERS([locale.h memory.h stdlib.h string.h sys/time.h unistd.h])
3238

@@ -42,8 +48,5 @@ AC_FUNC_REALLOC
4248
AC_FUNC_STRTOD
4349
AC_CHECK_FUNCS([clock_gettime memset pow setlocale sqrt])
4450

45-
AC_CONFIG_LINKS([./src/LassoTesting.so:./src/.libs/LassoTesting.so])
46-
47-
AC_CONFIG_FILES([Makefile
48-
src/Makefile])
51+
AC_CONFIG_FILES([src/Makevars])
4952
AC_OUTPUT

meson.build

+1
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,4 @@ add_project_arguments([
66

77
subdir('src')
88
subdir('tests')
9+
subdir('utils')

shotgun/.gitignore

-13
This file was deleted.

shotgun/LICENSE

-191
This file was deleted.

0 commit comments

Comments
 (0)