similar to: Pretty-printer for R data

Displaying 20 results from an estimated 1000 matches similar to: "Pretty-printer for R data"

2005 Mar 28
2
Generating list of vector coordinates
Hi. Can anyone suggest a simple way to obtain in R a list of vector coordinates of the following form? The code below is Mathematica. In[5]:= Flatten[Table[{i,j,k},{i,3},{j,4},{k,5}], 2] Out[5]= {{1,1,1},{1,1,2},{1,1,3},{1,1,4},{1,1,5},{1,2,1},{1,2,2},{1,2,3},{1 ,2,4},{1,2, 5},{1,3,1},{1,3,2},{1,3,3},{1,3,4},{1,3,5},{1,4,1},{1,4,2},{1,4,3}, {1,4,
1999 Sep 29
2
avoiding loops, gaining generality
Hi, all. Given an array, I'd like to add elements whose location vectors are permutations of one another. For example, in a 3-dimensional array, I'd add the elements in positions (1,2,3), (1,3,2), (2,1,3), (2,3,1), (3,1,2) and (3,2,1); those in positions (1,2,4), (1,4,2), (2,1,4), (2,4,1), (4,1,2), and (4,2,1); and so on. Elements with repeated positions -- (1,1,2) or (1,4,4), for
2010 Sep 02
2
lower triangle of the correlation matrix with xtable
Dear all, mydata<-data.frame(x1=c(1,4,6),x2=c(3,1,2),x3=c(2,1,3)) cor(mydata) x1 x2 x3 x1 1.0000000 -0.5960396 0.3973597 x2 -0.5960396 1.0000000 0.5000000 x3 0.3973597 0.5000000 1.0000000 I wonder if it is possible to fill only lower triangle of this correlation matrix? Using 'dist' doesn't seem to be useful as it doesnt allow to convert this table
2008 Nov 21
1
Bug in Kendall for n<4?
> library(Kendall) > Kendall(1:3,1:3) WARNING: Error exit, tauk2. IFAULT = 12 <<<<<< tau = 1, 2-sided pvalue =1 I believe Kendall tau is well-defined for this case and the reported value is correct; isn't it a bug to give a warning? (And if, e.g., the pvalue is not well-defined in this case, wouldn't it be better to return NA or NaN or something?) Also,
2009 Jan 19
0
prettyprint problem in CentOS 5.2
I'd like to ask for help with a problem in CentOS 5.2 when printing from the command line with the prettyprint option selected. Program students print out their code with the command: lpr -P<printer_name> -o prettyprint -o job-sheets=none <filename_to_be_printed> The prettyprint option, as you know, puts a banner with file name and date at the top, and uses a small font, and
2002 Feb 20
3
Feature Request: "matrix[1:10,1:10, block=F] <- 1:10"
Hi Guys, I've again been surprised when something like > m <- matrix("", nrow=3,ncol=3) > index_i <- c(2,1,3) > index_j <- c(1,3,2) > vals <- c("a","b","c") > m[ index_i, index_j ] <- vals > m gives block-wise application of the assignment: [,1] [,2] [,3] [1,] "b" "b" "b" [2,]
2009 Jun 26
3
Automatically placing a legend in an area with the most white space...
At one point I believe I heard of an R package that would automatically find the most empty space in a plot, and then that answer could then be used to intelligently place a legend. I would like to try to apply that R package to the contrived example shown below, so thank you for any hints or tips that can be provided. x = seq(0, 1000, by = 1) y1_vals<-rnorm(1000, mean = 0, sd = 50)
2016 Dec 16
2
GDB pretty printers for LLVM ADTs
I've added a few LLVM GDB pretty printers a while back (& just added llvm::Optional earlier today) & thought people might be interested in how to use them, etc. I use them by adding the following to my .gdbinit: source /path/to/llvm/src/utils/gdb-scripts/prettyprinters.py Also, I can suggest adding: set print pretty on there too, it helps a lot when printing complex nested
2007 Sep 28
3
[ win32utils-Bugs-14298 ] windows-api 0.2.0/windows-pr 0.7.1 causes segfault with require of win32/file
Bugs item #14298, was opened at 2007-09-28 10:23 You can respond by visiting: http://rubyforge.org/tracker/?func=detail&atid=411&aid=14298&group_id=85 Category: None Group: None Status: Open Resolution: None Priority: 3 Submitted By: Lars Olsson (lasso) Assigned to: Nobody (None) Summary: windows-api 0.2.0/windows-pr 0.7.1 causes segfault with require of win32/file Initial Comment:
2008 Aug 10
2
Basic data structures
I'm new to R and very excited about its possibilities. But I'm struggling with some very simple things, probably because I haven't found the correct documentation. Here's a simple example which illustrates several of my problems. Suppose I want to have a regexp match against a string, and return all the matching substrings in a vector of strings. regexp <-
2016 Dec 17
0
GDB pretty printers for LLVM ADTs
Added some basic DenseMap support in r290011 On Fri, Dec 16, 2016 at 2:05 PM David Blaikie <dblaikie at gmail.com> wrote: > I've added a few LLVM GDB pretty printers a while back (& just added > llvm::Optional earlier today) & thought people might be interested in how > to use them, etc. > > I use them by adding the following to my .gdbinit: > > source
2006 Jun 09
1
Idempotent apply
Dear all, I have been working on an idempotent version of apply, such that applying a function f(x) = x (ie. force) returns the same array (or a permutation of it depending on the order of the margins): a <- array(1:27, c(2,3,4)) all.equal(a, iapply(a, 1, force)) all.equal(a, iapply(a, 1:2, force)) all.equal(a, iapply(a, 1:3, force)) all.equal(aperm(a, c(2,1,3)), iapply(a, 2, force))
2016 Dec 19
2
GDB pretty printers for LLVM ADTs
Excellent. I think it would make sense to add small section somewhere in documentation (e.g. LLVM Programmer’s Manual <http://llvm.org/docs/ProgrammersManual.html>) about it, so it won't be lost somewhere in the mailing list. Piotr 2016-12-17 1:04 GMT+01:00 David Blaikie via llvm-dev < llvm-dev at lists.llvm.org>: > Added some basic DenseMap support in r290011 > > On
2008 Nov 29
2
Using grep() to subset lines of text
I have two vectors, a and b. b is a text file. I want to find in b those elements of a which occur at the beginning of the line in b. I have the following code, but it only returns a value for the first value in a, but I want both. Any ideas please. a = c(2,3) b = NULL b[1] = "aaa 2 aaa" b[2] = "2 aaa" b[3] = "3 aaa" b[4] = "aaa 3 aaa"
2016 Dec 20
0
GDB pretty printers for LLVM ADTs
Good point - any ideas on where in the programmer's manual would suit best? Looking around I sort of feel like it belongs in the "Picking the right data structure" section - but I fear someone merely examining existing data structures might not think to look there for help in their task (if they have no need to 'pick' a data structure for a new use, etc). On Mon, Dec 19,
2016 Dec 20
2
GDB pretty printers for LLVM ADTs
I guess adding section "Debugging" at the bottom of programmers manual would sounds like a good plan to me. Piotr 2016-12-20 6:03 GMT+01:00 David Blaikie <dblaikie at gmail.com>: > Good point - any ideas on where in the programmer's manual would suit > best? Looking around I sort of feel like it belongs in the "Picking the > right data structure" section -
2009 Feb 17
2
cumsum vs. sum
I recently traced a bug of mine to the fact that cumsum(s)[length(s)] is not always exactly equal to sum(s). For example, x<-1/(12:14) sum(x) - cumsum(x)[3] => 2.8e-17 Floating-point addition is of course not exact, and in particular is not associative, so there are various possible reasons for this. Perhaps sum uses clever summing tricks to get more accurate results? In some
2016 Dec 20
0
GDB pretty printers for LLVM ADTs
Added something in r290186. Say, Reid - do you know anything about the MSVC formatters that are also provided in LLVM? Perhaps you could add a brief bit of documentation about them, if they need an explicit wiring up (if they just come for free/automatically - might not be worth documenting, people will find it when they need it) or point this thread to someone who knows about them to provide
2009 May 20
2
Class for time of day?
What is the recommended class for time of day (independent of calendar date)? And what is the recommended way to get the time of day from a POSIXct object? (Not a string representation, but a computable representation.) I have looked in the man page for DateTimeClasses, in the Time Series Analysis Task View and in Spector's Data Manipulation book but haven't found these. Clearly I can
2016 Dec 20
2
GDB pretty printers for LLVM ADTs
The VC visualizers are automatcially installed. 2016-12-20 19:45 GMT+02:00 David Blaikie via llvm-dev < llvm-dev at lists.llvm.org>: > Added something in r290186. > > Say, Reid - do you know anything about the MSVC formatters that are also > provided in LLVM? Perhaps you could add a brief bit of documentation about > them, if they need an explicit wiring up (if they just