similar to: Anything like associative arrays in R?

Displaying 20 results from an estimated 2000 matches similar to: "Anything like associative arrays in R?"

2007 Jan 27
1
Conditional Selection of Columns for Tables
Dear Wizards - Thank you so much for your help. That was exactly what I was looking for. Now, I have been working on conditional selection of columns in a data frame. My goal is to calculate the total revenue per sales representative per status in a table. I have come to a complete stop: Let's say, we have a data.frame called df with several columns and a number of rows: df <-
2007 Jan 10
2
select subsets in data frame
Dear WizaRds! A trivial question indeed on selecting subsets in data frames. I am sorry. Unfortunately, I did not find any helpful information on the introduction, searched the help archive and read in introductory books. Please help: I want to select column "KB" which is read via read.csv2 as a data.frame into d. I checked that it is indeed a data.frame object and included the
1999 Mar 25
1
Y-limits of barplots
Hello everybody, I frequently have to produce barplots from variables the natural variation of which is far away from zero. A typical range would be, say from -16 to -28. So, the following example should give an "honest" presentation: x<-c(-20,-22,-21,-28) barplot(x,beside=T,ylim=c(-18,-30)) But using anything else but "0" for the first element of ylim leads to strange
2005 Oct 17
4
ISO R-programming docs/refs
In my job I write custom computer programs for data analysis, which are used in our company's consulting business. Whenever I've needed statistical analyses I've coded the algorithms myself, but my boss wants me to start learning and using R, to speed up development. I am very reluctuant to do this because I can't find adequate *programming* documentation for R (though I can find
2016 Oct 03
4
On implementing zero-overhead code reuse
Hi Frederick, I described what I meant in the post I sent to R-help (https://stat.ethz.ch/pipermail/r-help/2016-September/442174.html), but in brief, by "zero overhead" I mean that the only thing needed for library code to be accessible to client code is for it to be located in designed directory. No additional meta-files, packaging/compiling, etc. are required. Best, G. On Sun, Oct
2016 Oct 03
3
On implementing zero-overhead code reuse
On Mon, Oct 3, 2016 at 10:18 AM, <frederik at ofb.net> wrote: > Hi Kynn, > > Thanks for expanding. > > I wrote a function like yours when I first started using R. It's > basically the same up to your "new.env()" line, I don't do anything > with environmentns. I just called my function "mysource" and it's > essentially a "source
2009 May 22
2
how to insert NULLs in lists?
I'm an experienced programmer, but learning R is making me lose the little hair I have left... > list(NULL) [[1]] NULL > length(list(NULL)) [1] 1 > x <- list() > x[[1]] <- NULL > x list() > length(x) [1] 0 >From the above experiment, it is clear that, although one can create a one-element list consisting of a NULL element, one can't get the same result by
2016 Oct 02
5
On implementing zero-overhead code reuse
I'm looking for a way to approximate the "zero-overhead" model of code reuse available in languages like Python, Perl, etc. I've described this idea in more detail, and the motivation for this question in an earlier post to R-help (https://stat.ethz.ch/pipermail/r-help/2016-September/442174.html). (One of the responses I got advised that I post my question here instead.) The
2008 Jul 15
1
softdepflush bad block error has led to negative blocks in free inode and handle_workitem_freeblocks: block count
Hi, The problem started when i installed a kodicom 4400 card and started to run zoneminder. Prior to that no problems with my machine, which now runs FreeBSD panix.internal.net 7.0-RELEASE-p3 FreeBSD 7.0-RELEASE-p3 #3: Mon Jul 14 16:35:37 EEST 2008 doroot@panix.internal.net:/usr/obj/usr/src/sys/GENERIC i386 This hardware change happened in Sunday Jul 13. The next day (Jul 14) morning
2009 Jun 25
1
R data inspection under gdb?
Hi, everyone. I'm trying to debug an R-module, written in C, and I'm using gdb for this. How can I print "standard" R objects from within C code? BTW, I'm familiar with the advice to use R_PV given in Writing R Extensions, but it's not working for me. E.g., I get (gdb) p R_PV(x) $1 = void and yet (gdb) p *x $2 = {sxpinfo = {type = 16, obj = 0, named = 0, gp = 0,
2009 May 20
10
How to google for R stuff?
Hi! I'm new to R programming, though I've been programming in other languages for years. One thing I find most frustrating about R is how difficult it is to use Google (or any other search tool) to look for answers to my R-related questions. With languages with even slightly more distinctive names like Perl, Java, Python, Matlab, OCaml, etc., usually including the name of the language
2010 Feb 22
4
Alternatives to linear regression with multiple variables
I wonder if someone can give some pointers on alternatives to linear regression (e.g. Loess) when dealing with multiple variables. Taking any simple table with three variables, you can very easily get the intercept and coefficients with: summary(lm(read_table)) For obvious reasons, the coefficients in a multiple regression are quite different from what you get if you calculate regressions for
2011 Jan 05
11
[Bug 32855] New: Incorrect image stretching with Render in RepeatPad mode, NV50
https://bugs.freedesktop.org/show_bug.cgi?id=32855 Summary: Incorrect image stretching with Render in RepeatPad mode, NV50 Product: xorg Version: git Platform: x86-64 (AMD64) OS/Version: Linux (All) Status: NEW Severity: normal Priority: medium Component: Driver/nouveau
2015 Aug 20
10
[Bug 91705] New: [NVE7] GPU crash (read fault) on boot w/ DMI+HDMI outputs
https://bugs.freedesktop.org/show_bug.cgi?id=91705 Bug ID: 91705 Summary: [NVE7] GPU crash (read fault) on boot w/ DMI+HDMI outputs Product: xorg Version: unspecified Hardware: x86-64 (AMD64) OS: Linux (All) Status: NEW Severity: normal Priority: medium Component:
2009 Jun 13
1
conditional dependencies & loading
Hi! I'm working on a package that must convert data to and from JSON. For this, it can use either the rjson package, or preferably, the faster RJSONIO package. I have two related questions about this. First, how can I specify that the package depends on *either* RJSONIO *or* rjson? (I.e. both are not required.) Second, what's the best-practice R idiom for such conditional loading?
2009 Jun 12
1
Fast JSON <-> R converter?
Is there a *fast* converter between JSON and R? I'm aware of the rjson package, but it is implemented in R, and it is too slow for my purposes. TIA! kynn [[alternative HTML version deleted]]
2009 Jun 02
1
How to generate R objects in C?
I'm in the process of coding a parser (in C) to generate R entities (vectors, lists, etc.) from a text description (different from R). The basic parser works, and now I need to tell it how to create R entities. I need to be able to create character vectors (for unicode strings), integers, floats, unnamed lists, named lists, boolean values, and NA. With the exception of the two types of lists
2009 Jun 12
1
Issues converting from JSON to R
When converting from JSON to R it seems logical that a JSON array would correspond to an "unnamed" R list, while a JSON object would correspond to a "named" R list. E.g. JSON: [1, 3.1415927, "foo", false, null] => R: list(1, 3.1415927, "foo", FALSE, NA); and JSON { "int": 1, "float": 3.1415927, "string": "foo",
2009 Jun 26
1
bug in Rf_PrintValue ?
I'm very green with R, so maybe this is not a bug, but it looks like one to me. The following program segfaults at the second call to Rf_PrintValue(). To failure depends on the value of the y-string. E.g., if I change it from "coverage" to, say, "COVERAGE", the segfault does not occur. /* bug.c */ #include <stdio.h> #include <Rinternals.h> #include
2009 May 23
1
Can a function know what other function called it?
Suppose function foo calls function bar. Is there any way in which bar can find out the name of the function that called it, "foo"? There are two generalization to this question that interest me. First, can this query go farther up the call stack? I.e. if bar now calls baz, can baz find out the name of the function that called the function that called it, i.e. "foo"?