similar to: Can I ask for the C code inside an R function using .C?

Displaying 20 results from an estimated 10000 matches similar to: "Can I ask for the C code inside an R function using .C?"

2008 Aug 15
2
How to substitute special characters within a data frame?
Hello all, I have a data frame in R, imported from an excel file in Swedish. The original file contains several columns that have special characters, such as \¨{a}, \¨{o}, and so on. After import such special characters are represented in the data frame by "\\345", "\\366" etc (don't ask me why). For example, a word "Hårkan" becomes ''H\\345rkan".
2006 Aug 09
1
minimization a quadratic form with some coef fixed and some constrained
Hello, all, I had problems with an extension to a classic optimization problem. The target is to minimize a quadratic form a'Ma with respect to vector b, where vector a=(b',-1)', i.e., a is the expand of b, and M is a symmetric matrix (positive definite if needed). One more constrain on b is b'b=1. I want to solve b given M. I tried but it seems impossible to find an analytic
2012 May 08
3
Numerical integration of a two dimensional function over a disk
Hello, there!   Basically my problem is very clear. I would like to take a (numerical) integration of a function f(x,y) which can be quite complex of x and y, over a disk (x-a)^2+(y-b)^2<= r^2 (with r constant). However, after some search in R, I just cannot find a function in R that suits my purpose. Function Integrate applies to one dimensional, and adaptIntegrate to rectangle. In my case, it
2013 Jan 09
3
Sweave, Texshop, and sync with included Rnw file
Hello everyone. I am in the process of writing a book in Latex with Texshop, on Mac. This book contains a lot of R code, hence the need to use Sweave. I was able to compile Rnw files, and to sync back and forth from the pdf to the source Rnw. My problem now is that the book is divided in Chapters, and every chapter is in its own Rnw file. I can compile them from the main one (book.Rnw) using the
2007 Oct 15
2
clipping off words inside a vector of strings
Hi, I have a vector of strings (class character) with 6 elements (length 6). I call it 'names'. "Graham Chapman" "John Cleese" "Terry Gilliam" "Eric Idle" "Terry Jones" "Michael Palin" And I want to turn it into another vector of strings called 'shortnames' with the same length. The new vector should look like:
2011 Aug 16
2
Assignment working differently inside ifelse()
Hello all, I need to extract rows and columns from a data frame and put them in a matrix. In some cases, there are no rows in the data frame meeting the selection criteria. For those rows I want to put a row of 0's in the matrix. Here's my clumsy code: tab1.m1 <- matrix(0, nrow=2, ncol=4) tab1.m1[1,] <- ifelse(length(as.matrix(tab1[tab1$comp==the.comp & tab1$schlid==the.schl
2016 Oct 22
18
[PATCH 01/17] drm/nouveau/core: add missing header dependencies
We get 2 warnings when building kernel with W=1: drivers/gpu/drm/nouveau/nvkm/core/firmware.c:34:1: warning: no previous prototype for 'nvkm_firmware_get' [-Wmissing-prototypes] drivers/gpu/drm/nouveau/nvkm/core/firmware.c:58:1: warning: no previous prototype for 'nvkm_firmware_put' [-Wmissing-prototypes] In fact, these functions are declared in
2016 Oct 24
2
[PATCH 01/17] drm/nouveau/core: add missing header dependencies
On 23 October 2016 at 01:32, Karol Herbst <karolherbst at gmail.com> wrote: > I think it would be better to squash those commits: > 1. for the includes > 2. for static declerations > > OK, I have resent new patch that squash those commits. > 2016-10-22 11:41 GMT+02:00 Baoyou Xie <baoyou.xie at linaro.org>: > > We get 2 warnings when building kernel with W=1:
2015 Nov 03
3
SSH login between servers still asking for password, why?
I have two servers identified as `server-1 - 192.168.3.128` and `server-2 - 192.168.3.130`. I am setting up `capifony` for automatic deployment from server-1 to server-2 and this is what I have done so far: 1. In both servers I have created a user `deploy` without password since that's the user I will use for deployment. 2. In server-1 I setup a SSH keys by running the command:
2016 Aug 29
2
[PATCH v2] drm/nouveau/gr: mark gm107_grctx_generate_tpcid() static
We get 1 warning when build kernel with W=1: drivers/gpu/drm/nouveau/nvkm/engine/gr/ctxgm107.c:937:1: warning: no previous prototype for 'gm107_grctx_generate_tpcid' [-Wmissing-prototypes] In fact, this function is only used in the file in which it is declared and don't need a declaration, but can be made static. so this patch marks this function with 'static'. Signed-off-by:
2012 Jan 19
2
Sweave question - Setting Soutput code chunks to stay inside page margins?
Hello all, Sometimes I get to make an R code chunk (in Sweave) which is longer then the margins of the page. Is there a way to force it to "go to the next line" (in Sweave) once that happens? Here are two cases this happens in the resulting .tex file (one is a "hard" case, and the other is simpler) \begin{Schunk} \begin{Sinput} >
2004 Aug 11
0
always NaN after some running in R, but all fine in S-plus
Hello, S-plus and R helpers,(sorry for cross-post) I wrote some simple C code for one likelihood to be optimized (using optim(MASS)). I use same function, same data, same starting points and same DLL in R and S-plus for comparison. (I compiled it with 'Rcmd SHLIB likelihood.c' and the header files of it include only R.h and math.h). While it works quite fine in S-plus, it forever returns
2010 Mar 12
3
rmaxwell in C
Hi R useRs: How can I generate a random sample from Maxwell Distribution in C language? Since I know the function rmaxwell {VGAM}, I tried the function r2c {r2c}. But I still cannot find the source code. Thanks for your kind help. RegaRds, 2010-03-12 Randel [[alternative HTML version deleted]]
2012 Aug 21
2
Sweave: R chunk inside caption?
Hi Folks, I'm surprised, but I didn't find this question addressed anywhere. I'd like to generate a LaTeX caption with R code. I've tried the code below, but I get the following TeX error: ! Argument of \@caption has an extra }. <inserted text> \par l.21 } Any thoughts? Perhaps I'll have to write the "\caption{}" text with R? thanks!
2017 Feb 20
3
Replaying a recorded plot (mixed base and grid) from pdf() in cairo_pdf() crashes R
Hi, I wonder if this is expected or I'm doing a wrong thing. pdf() dev.control('enable') library("grid") plot(1) grid.text("A") res = recordPlot() dev.off() cairo_pdf() replayPlot(res) dev.off() *** caught segfault *** address 0x4, cause 'memory not mapped' > sessionInfo() R version 3.3.2 (2016-10-31) Platform: x86_64-apple-darwin13.4.0 (64-bit)
2013 Aug 14
2
[PATCH 0/5] Enable Drivers for Intel MIC X100 Coprocessors.
On Tue, 2013-08-13 at 14:43 +0200, Pavel Machek wrote: > Hi! > > > Since it is a PCIe card, it does not have the ability to host hardware > > devices for networking, storage and console. We provide these devices > > on X100 coprocessors thus enabling a self-bootable equivalent environment > > for applications. A key benefit of our solution is that it leverages >
2013 Aug 14
2
[PATCH 0/5] Enable Drivers for Intel MIC X100 Coprocessors.
On Tue, 2013-08-13 at 14:43 +0200, Pavel Machek wrote: > Hi! > > > Since it is a PCIe card, it does not have the ability to host hardware > > devices for networking, storage and console. We provide these devices > > on X100 coprocessors thus enabling a self-bootable equivalent environment > > for applications. A key benefit of our solution is that it leverages >
2013 Aug 08
1
[PATCH v2 7/7] Sample Implementation of Intel MIC User Space Daemon.
On Wed, Aug 07, 2013 at 08:04:13PM -0700, Sudeep Dutt wrote: > From: Caz Yokoyama <Caz.Yokoyama at intel.com> > > This patch introduces a sample user space daemon which > implements the virtio device backends on the host. The daemon > creates/removes/configures virtio device backends by communicating with > the Intel MIC Host Driver. The virtio devices currently supported
2013 Aug 08
1
[PATCH v2 7/7] Sample Implementation of Intel MIC User Space Daemon.
On Wed, Aug 07, 2013 at 08:04:13PM -0700, Sudeep Dutt wrote: > From: Caz Yokoyama <Caz.Yokoyama at intel.com> > > This patch introduces a sample user space daemon which > implements the virtio device backends on the host. The daemon > creates/removes/configures virtio device backends by communicating with > the Intel MIC Host Driver. The virtio devices currently supported
2009 Jun 20
2
Special characters in Rd example section will cause errors
Hi (Duncan?), The other day I noticed some characters will cause errors in R CMD CHECK because of parse_Rd(), and AFAIK, these chars include '%', '{' and '}'. For example, note the comments in the example section: %~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~% \name{testfun} \Rdversion{1.1} \alias{testfun} \title{ A Test } \description{ A test } \usage{ testfun() } \value{ NULL }