similar to: Returning a dataframe from a C function (How) ?

Displaying 20 results from an estimated 1100 matches similar to: "Returning a dataframe from a C function (How) ?"

2003 Mar 30
2
R-devel (1.7 to be) on windows XP
Hola! I'm trying to make r-devel on windows XP. I downloaded an hour ago R-1.7.0beta_2003-03-30.tar.gz make terminates without any error messages, with make check I get error messages from tests of internet and socket functions, surely because my modem was not connected (It doesn't say in the documentation (file INSTALL) that internet must be connected under make check.) But the file
2000 Aug 09
2
GenGC changes
As most R developers maybe are already aware of, R version 1.2.0 introduced a new `generational' garbage collector which means that strings and vectors (and language objects) are handled differently from the numerical atomic types. >From ``Writing R Extensions'': Earlier code was written in a style like. VECTOR(dimnames)[0] = getAttrib(x, R_NamesSymbol);
2013 Jan 11
1
Patch for setwd() to show path in error message
Below is a patch for setwd() to show path in error message. Current it just gives error messages such as: Error in setwd(libdir) : cannot change working directory with the patch it should (read untested) give: Error in setwd(libdir) : cannot change working directory to 'path/that/fails/' PATCH: % diff -u util.c "util,patch.c" --- util.c 2012-12-16 13:13:05.002249900
2000 Nov 19
3
Stataread + R-Devel fails for me
Hi, I have a problem with R-devel and Stataread 2.5. Stataread installs (compiles, at gives no error messages). But typing > library(stataread) Error in dyn.load(x, as.logical(local), as.logical(now)) : unable to load shared library "/usr/local/lib/R/library/stataread/libs/stataread.so": /usr/local/lib/R/library/stataread/libs/stataread.so: undefined symbol: errorcall Error in
2000 Mar 08
1
Coercing character to factor
I just downloaded version 1.0.0 and several binary libraries (VR, rpart, norm, stataread) - WinNT version. I then converted a file from Stata 6.0 to R format by using the stataread library. The file converts perfectly and I was able to use the VR function lda on the dataframe without difficulty. I then tried to use the same dataframe with RPART. The model statement:
2009 Mar 06
1
Fix for foreign package segfault on Solaris 10 Intel
Like a couple of other posters in the past year, I was seeing R 2.8.1 segfault in the foreign package on my Solaris 10 Intel system: > library(foreign) *** caught segfault *** address fe1d5c70, cause 'invalid permissions' Traceback: 1: .C("spss_init", PACKAGE = "foreign") 2: fun(...) This happened whether I
2010 Feb 22
1
shash in unique.c
Looking at shash in unique.c, from R-2.10.1 I'm wondering if it makes sense to hash the pointer itself rather than the string it points to? In other words could the SEXP pointer be cast to unsigned int and the usual scatter be called on that as if it were integer? shash would look like a slightly modified version of ihash like this : static int shash(SEXP x, int indx, HashData *d) {
2008 May 26
1
read.dta error
Greetings! I attempted to read a STATA 10 file using the following syntax: library(foreign) data <- read.dta("~/Documents/agestandard/analysis.dta") I got the following error: *** stack smashing detected ***: /usr/lib/R/bin/exec/R terminated ======= Backtrace: ========= /lib/tls/i686/cmov/libc.so.6(__fortify_fail+0x48)[0xb7c13138]
2007 Jul 23
1
CHAR(STRING_ELT( - OK but CHAR(asChar(STRING_ELT( - not, why?
Any idea why CHAR(asChar(STRING_ELT( produces NA whereas CHAR(STRING_ELT( gets a pointer to a string? It's generally expected that STRING_ELT should already be a character, but why the coercion does not work? Here is a simple example (consistent over R2.5.1-R2.6 rev 42284, I didn't check earlier versions, but it used to be different in 2.4): install.packages("inline")
2010 Jun 19
1
more powerful iconv
R community, As you may know, R's iconv doesn't work well converting to and from encodings that allow embedded nulls. For example > iconv("foo", to="UTF-16") Error in iconv("foo", to = "UTF-16") : embedded nul in string: '\xff\xfef\0o\0o\0' However, I don't believe embedded nulls are at issue here, but rather that R's iconv
2006 Jun 22
2
.Call and data frames
Hello, I'm trying to fetch a data frame through the C API, and have no problem doing this when all columns are numbers, but when there is a column of strings I have a problem. On the C-side the function looks like: SEXP myfunc(SEXP df), and it is called with a dataframe from the R side with: .Call("myfunc", somedataframe) On the C side (actually C++ side) I use code like this:
2024 Mar 01
2
dput(..., file = stderr())
Curious to know if this warning is expected behavior, and if so, what is the recommended way instead: > dput(letters, file = stderr()) c("a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p",
2007 Feb 20
2
Problem with types on 64-bit
Hi Everyone, I have a problem using some working 32-bit R code with 64-bit machine ( I am using version R-2.4.1 ). The problem occurs when I am trying to detect a NULL STRSXP type. ( Perhaps I am doing this detection in the wrong way? ) On 32-bit the following works, and correctly identifies if I am passing NULL or a valid string object: if ( v_dta_start != R_NilValue && STRING_ELT(
2003 Dec 17
1
Accessing row and col names of SEXP objects
Can someone lend me a hand with extracting the dimnames from a SEXP? I've looked through R-exts, but I couldn't find an example. Here is the code I'm using to grab the jth column name and print it, but the colnames I'm getting are garbage. None of the following are working. void printInfo(SEXP ts) { int j; for (j=0; j<col; j++) {
2012 Dec 08
2
file.link on Windows 7
Hello, A post to R-Help by Oliver Soong reports what seems to be a bug specific to Windows (I'm on Windows 7). The original post is as follows: ---------------------------------------------------------------- from: Oliver Soong <osoong+r at gmail.com> to: r-help <r-help at r-project.org> date: Fri, 7 Dec 2012 22:07:49 -0800 subject: [R] file.link fails on NTFS Windows 7 64-bit,
2019 Jun 06
4
Open a file which name contains a tilde
On Wed, 5 Jun 2019 18:07:15 +0200 Frank Schwidom <schwidom at gmx.net> wrote: > +> path.expand("a ~ b") > [1] "a /home/user b" > How can I switch off any file crippling activity? It doesn't seem to be possible if readline is enabled and works correctly. Calls to path.expand [1] end up [2] in R_ExpandFileName [3], which calls R_ExpandFileName_readline
2007 Sep 28
1
CHAR () and Rmpi
Hi. I am the maintainer of Rmpi package. Now I have a problem regarding the change of CHAR () in R 2.6.0. According to R 2.6.0 NEWS: ******* CHAR() now returns (const char *) since CHARSXPs should no longer be modified in place. This change allows compilers to warn or error about improper modification. Thanks to Herve Pages for the suggestion. ******* Unfortunately this
2019 Jun 05
6
Open a file which name contains a tilde
Hi, As I can see via path.expand a filename which contains a tilde anywhere gets automatically crippled. +> path.expand("a ~ b") [1] "a /home/user b" +> path.expand("a ~ b ~") [1] "a /home/user b /home/user" I want to open a file regardless whether its name contains any character unless 0. The unix filesystem allow the creation of such files, it
2019 Jun 05
6
Open a file which name contains a tilde
Hi, As I can see via path.expand a filename which contains a tilde anywhere gets automatically crippled. +> path.expand("a ~ b") [1] "a /home/user b" +> path.expand("a ~ b ~") [1] "a /home/user b /home/user" I want to open a file regardless whether its name contains any character unless 0. The unix filesystem allow the creation of such files, it
2006 Oct 17
1
Error: STRING_ELT() can only be applied to a 'character vector', not a 'builtin'
I have a daily job that attaches hundreds of pseudo-packages containing data as promise objects (DDP's, ref: g.data package), and plots the results to a multi-page pdf device. Sometimes it fails. Under R-2.2.1 it just gave segfaults. Under R-2.3.1 it gave this error message: *** caught segfault *** address (nil), cause 'memory not mapped' Traceback: 1: