FWIW this is fixed in the dev version of stringr which uses stringi
under the hood:
> stringr::str_split_fixed('ab','',2)
[,1] [,2]
[1,] "a" "b"
> stringr::str_split_fixed('ab','',3)
[,1] [,2] [,3]
[1,] "a" "b" ""
Hadley
On Wed, Jan 14, 2015 at 12:47 PM, David Barron wrote:
> I'm p
Is there a reason you don't just click the zoom button?
Hadley
On Mon, Jan 12, 2015 at 8:22 AM, John Fox wrote:
> Dear Peter and Jeff,
>
> I've used RStudio in teaching for quite some time now. For displaying
> graphics, I open a windows() graphics device on a Windows PC or a quartz()
> device on
On Mon, Jan 12, 2015 at 2:01 AM, peter dalgaard wrote:
>
>> On 11 Jan 2015, at 11:30 , Duncan Murdoch wrote:
>>
>>
>> - I don't like the tiled display. I find it doesn't give me enough space.
>>
>
> This is a mixed blessing. For teaching purposes, it helps avoid shuffling
> windows to uncover t
You might find the advice at http://adv-r.had.co.nz/memory.html helpful.
Hadley
On Tue, Dec 30, 2014 at 7:52 AM, ALBERTO VIEIRA FERREIRA MONTEIRO
wrote:
> Is there any way to detect which calls are consuming memory?
>
> I run a program whose global variables take up about 50 Megabytes of
> memory
At the top level do:
myenv <- new.env(parent = emptyenv())
Then in your functions do
myenv$x <- 50
myenv$x
etc
You also should not be using data() in that way. Perhaps you want
R/sysdata.rda. See http://r-pkgs.had.co.nz/data.html for more details.
Hadley
On Tue, Dec 2, 2014 at 2:28 AM, Karim
This bug is fixed in the dev version.
Hadley
On Sunday, November 23, 2014, John Posner wrote:
> Thanks to John Kane for an off-list consultation. As the following
> annotated transcript shows, it's the group_by() function that transforms a
> data frame into something else: a "grouped_df" object
Why do you need from xpath 2.0? It will almost certainly be easier to
implement similar functionality using a little R code than adding
xpath 2.0 support.
Hadley
On Mon, Nov 17, 2014 at 6:03 AM, Rees Morrison wrote:
> Many users of R would like the enhanced extraction capabilities of XPath
> 2.
Do you have a .Rbuildignore? If so, what's in it?
Hadley
On Tue, Nov 18, 2014 at 7:07 AM, Therneau, Terry M., Ph.D.
wrote:
> I have a new package (local use only). R CMD check fails with a messge I
> haven't seen before, and I haven't been able to guess the cause.
> There are two vignettes, bot
Try knitr::opts_knit$get('rmarkdown.pandoc.to')
Hadley
On Fri, Oct 31, 2014 at 6:56 AM, Michal Kvasnička wrote:
> Hi.
>
> Is there a way how to find out from within a .Rmd file what output format
> is generated?
>
> The reason is this: I write a paper in R markdown in RStudio. Sometimes I
> gene
Or do all the subsetting in one pass - [ will use a hashmap.
Hadley
On Thu, Oct 30, 2014 at 12:05 PM, William Dunlap wrote:
> You can try using an environment instead of a list.
>
> Bill Dunlap
> TIBCO Software
> wdunlap tibco.com
>
>
> On Thu, Oct 30, 2014 at 10:02 AM, Thomas Nyberg wrote:
>>
Your source function will be called when the package is _built_, not
when it's loaded/attached. There's almost certainly a better way to
solve your problem than using source() inside a package
Hadley
On Tue, Oct 21, 2014 at 6:24 AM, Enrico Bibbona wrote:
> I have built a new package. I would lik
This is usually ill-advised, but I think it's the right solution for
your problem:
assignInNamespace("plot.histogram", function(...) plot(1:10), "graphics")
hist(1:10)
Haley
On Thu, Oct 9, 2014 at 1:14 AM, Tim Hesterberg wrote:
> How can I create an improved version of a method in R, and have i
ed, but all the example code was missing (which defeats the
> convenience of having it on an ebook reader), I did not check if
> everything else was there or not.
>
> thanks,
>
> On Fri, Oct 3, 2014 at 6:37 AM, Hadley Wickham wrote:
>>> Hi, folks. I've got a sort
> Hi, folks. I've got a sort of coupon that would allow me to get a
> copy of "Advanced R" by Hadley Wickham at no cost. OTOH, I've already
> cloned the github repository, and having the "live" Rmd files (or in
> this case, rmd files) is enormously m
Hundreds of thousands of records usually fit into memory fine.
Hadley
On Tue, Sep 16, 2014 at 12:40 PM, Barry King wrote:
> Is there a way to get around R’s memory-bound limitation by interfacing
> with a Hadoop database or should I look at products like SAS or JMP to work
> with data that has h
> Please add it if you think it fits, and expand it as discussed, I am not
> creating a package for one single utility function.
Why not? There's nothing wrong with a package that only provides one function.
Hadley
--
http://had.co.nz/
__
R-help@r-p
DBI 0.3 (just released to CRAN) includes a new generic, dbIsValid(),
for exactly this purpose. Unfortunately no packages implement a method
for it yet, but eventually it will be the right way to detect this
problem.
(I'm now the maintainer for RSQLite, so I added this to my to do list:
https://git
Hi Oliver,
I think you're being misled by the default behaviour of warnings: they
all get displayed at once, before control returns to the console. If
you making them immediate, you get a slightly more informative error:
> URLdecode("0;%20@%gIL")
Warning in URLdecode("0;%20@%gIL") :
out-of-ran
In the future, you can avoid this problem by using saveRDS and readRDS.
Hadley
On Mon, Aug 18, 2014 at 7:30 PM, Jinsong Zhao wrote:
> Hi there,
>
> I have several saved data files (e.g., A.RData, B.RData and C.RData). In
> each file, there are some objects with same names but different contents.
Or just go to http://adv-r.had.co.nz/ ...
Hadley
On Sun, Aug 10, 2014 at 9:34 PM, John McKown
wrote:
> Well, it says that it's from Hadley Wickham.
>
> https://github.com/hadley/adv-r
>
>
> This is code and text behind the Advanced R programming book.
>
> The site
The first twitter message was sent on March 21st, 2006...
Hadley
On Wed, Jul 30, 2014 at 3:58 AM, Abhishek Dutta wrote:
> Hi
>
>
> This is Abhishek and I am trying to look for tweets on 'Election' from
> 2000 to YTD. I have registered on twitter and performed a handshake
> between the systems as
If you have unicode strings, you may need to do even more because
there are often multiple ways of representing the same glyph. I made a
little demo at http://rpubs.com/hadley/unicode-normalisation, since
any unicode characters are likely to get mangled by email.
Hadley
On Fri, Jul 18, 2014 at 11
It's documented in the Encodings section of ?file:
"As from R 3.0.0 the encoding "UTF-8-BOM" is accepted for reading and
will remove a Byte Order Mark if present (which it often is for files
and webpages generated by Microsoft applications). If it is required
(it is not recommended) when writing i
alysis techniques.
>
> In my particular case, I have measurements of several variables at
> several, sometimes equal, heights. Following the tidy data approach of
> Hadley Wickham, I want to put all data in one data frame. In principle,
> the height variable is something like a
Explicitly load the methods package: library(methods)
Hadley
On Thu, Jun 12, 2014 at 2:22 PM, Bond, Stephen wrote:
> I have a script which loads
>
> library(XLConnect)
> wb <- loadWorkbook("wbname")
>
> the code works without errors when run from ESS which uses
> R version 3.0.1 (2013-05-16) --
Don't export the dataset? (as mentioned in the answer to that
question). If that doesn't help, please supply a minimal reproducible
example.
Hadley
On Tue, May 20, 2014 at 3:35 AM, Witold E Wolski wrote:
> Hi,
>
> I am Trying to document data using roxygen2 by following the
> stackoverflow quest
Beware of the is.* functions:
* is.object() does not test the usual definition of objects
* is.vector() does not test the usual definition of vectors
* is.numeric() does not work the same way as is.character() or is.integer()
* is.Date() doesn't exist
* is.nan() doesn't return TRUE for some NaNs
You really want to use the names of the list since lists can contain
null. I'd recommend something more like:
getElement <- function(x, i, default) {
if (i %in% names(x)) return(x[[i]])
default
}
Hadley
On Tue, Apr 15, 2014 at 10:53 AM, Spencer Graves
wrote:
> Hello:
>
>
> Do you kno
Yes, because it has every version of every DESCRIPTION.
Hadley
On Mon, Apr 14, 2014 at 11:13 AM, Spencer Graves
wrote:
> Hi, Hadley:
>
>
>
> On 4/14/2014 5:53 AM, Hadley Wickham wrote:
>>
>> For finer level detail, have a look at
>> https://github.com/hadl
For finer level detail, have a look at
https://github.com/hadley/cran-packages. It contains the description
file of every package ever uploaded to CRAN (the cache is a few months
out of date, but you can easily re-run)
Hadley
On Sun, Apr 13, 2014 at 12:59 PM, Spencer Graves
wrote:
> What d
BT/18/GR)
> Baltimore, MD 21201-1524
> (Phone) 410-605-7119
> (Fax) 410-605-7913 (Please call phone number above prior to faxing)
>>>> Hadley Wickham 4/11/2014 6:01 PM >>>
>
> Even if you do get Rstudio running on a server, unfortunately it won't
> help.
Even if you do get Rstudio running on a server, unfortunately it won't
help. The ipad doesn't support quite enough html to get a fully
functional Rstudio interface - almost everything works but you can't
type anything :/ It would be possible to fix this, but fundamentally
we don't believe that the
You might find it helpful to read
http://adv-r.had.co.nz/Expressions.html, and look at pryr::
standardise_call().
Hadley
On Tue, Apr 8, 2014 at 6:52 PM, Spencer Graves
wrote:
> Hi, Bill:
>
>
> Thanks for the reply. Unfortunately, I don't see how that solves the
> example I gave of extract
Use .Renviron
Hadley
On Tue, Apr 1, 2014 at 2:33 AM, Luca Cerone wrote:
> Thanks,
> effectively I was using RStudio (on an Ubuntu 12.04 machine).
>
> Is there any other way to make the variable available to Rstudio?
> Now I have simply written the path manually, but I like the idea of
> having a
It's rude to ask a question both on r-help and on stackoverflow
(http://stackoverflow.com/questions/22685896), because people might
spend their time answering your question when it's already been
answered elsewhere.
Hadley
On Thu, Mar 27, 2014 at 6:01 AM, Rohit Gupta wrote:
> I have a data A whi
If you want to continue to be spoiled, try:
library(dplyr)
arrange(dat1, val)
Hadley
On Tue, Mar 25, 2014 at 2:20 PM, John Kane wrote:
> Thank.
>
> Once I got Sarah's email I realised I should have been usling with().
> Hadley's ggplot syntax has spoiled/confused me.
>
> John Kane
> Kingston
On Fri, Mar 7, 2014 at 6:46 AM, Therneau, Terry M., Ph.D.
wrote:
>>> The help page for the survfit function says it expects a formula as its
>>> first argument so try:
>>>
>>> > sleepfit <- survfit(Surv(timeb, death)~1, data = sleep)
>>>
>>> David
>>> Sent from my iPhone ... so unable to test.
>>>
I believe this is what you should do:
* In the lbfgsb.cpp from base R, include the GPL blurb and R
copyright holders. Also add your own names. (see e.g.
https://github.com/hadley/pryr/blob/master/src/typename.cpp)
* In the DESCRIPTION, add the R core team as a contributor,
https://github.com/had
You might want to try reading
http://vita.had.co.nz/papers/tidy-data.html, which lays out the
principles by which you might want to organise your data, matching
each task with the appropriate reshape2 function.
Hadley
On Wed, Feb 19, 2014 at 9:18 AM, drruddy gmail wrote:
>
> # Data manipulation
> Is there a way to determine which, if any, CRAN packages depend on my CRAN
> package, mondate?
> devtools::revdep("mondate")
[1] "zoo"
If you want to contact the maintainers:
> devtools::revdep_maintainers("mondate")
[1] "Achim Zeileis "
If you want all recursive dependencies:
> length(devt
On Fri, Jan 31, 2014 at 9:40 PM, andrewH wrote:
>
> In the description section of the RPostgreSQL package documentation, it
> states:
>
> "In order to build and install this package from source, PostgreSQL itself
> must be present your system to provide PostgreSQL functionality via its
> libraries
If you load plyr first, then dplyr, I think everything should work.
dplyr::summarise works similarly enough to plyr::summarise that it
shouldn't cause problems.
Hadley
On Wed, Jan 29, 2014 at 4:19 PM, Trevor Davies wrote:
> I think I have a hole in my understanding of how R uses packages (or at
To save others a little hunting, you can read the vignette online at
http://cran.r-project.org/web/packages/survival/vignettes/tests.pdf
Hadley
On Mon, Jan 20, 2014 at 11:47 AM, Terry Therneau wrote:
> Someone asked a question about this on the list a couple months ago. I
> replied that I didn'
>> How to find the package of a class given classname?
>> For example, there is a class called GAlignments, I want to do something
>> like
>> attr("GAlignments", "package") that gives you the package where the class
>> is defined? But of course, attr("GAlignments", "package") won't work...
>
> You
Hi Michael,
It's pretty easy with reshape:
library(reshape2)
ucbm <- melt(UCBAdmissions)
acast(ucbm, Admit + Gender ~ Dept)
acast(ucbm, Admit ~ Dept + Gender)
acast(ucbm, Admit + Dept + Gender ~ .)
# You can also do aggregations
acast(ucbm, Admit ~ Dept, fun = sum)
Hadley
On Thu, Jan 9, 2014 a
Dear all,
The latest issue of The R Journal is now available at
http://journal.r-project.org/archive/2013-2/
Many thanks to all contributors.
Hadley
--
Editor-in-chief, The R Journal
___
r-annou...@r-project.org mailing list
https://stat.ethz.ch/mail
> Though I admit that it bothers me that, although the SQLite syntax
> documentation for "CREATE INDEX", here:
> http://www.sqlite.org/lang_createindex.html
> does say the database name is optional, it also says that, if you include
> it, the period the period between the db name and the table nam
> Can you, or anyone, give me any hint on where -- no, not where, _how_ -- to
> find the code for any of the functions called between dbGetQuery method for
> conn="SQLiteConnection", or for any of the functions that are called by the
> dbGetQuery method for SQLite connections that are in the chain
> Thanks for your kind response Duncan. To be more specific, I'm using the
> function mvrnorm from MASS. The issue is that MASS depends on survival and
> I have a function in my package named tt() which conflicts with a function
> in survival of the same name. I can think of 2 alternatives solution
Hi Ross,
It's not obvious how useful memory.profile() is here. I created the
following little experiment to help me understand what
memory.profile() is showing (and to make it easier to see the
changes), but it's left me more confused than enlightened:
m_delta <- function(expr) {
# Evaluate in
Unfortunately roxygen2 3.0.0 now requires R 3.0.2. See
https://github.com/klutometis/roxygen/issues/163 for some discussion
as to why.
Hadley
On Mon, Dec 9, 2013 at 12:28 PM, François Lefebvre wrote:
> Hi, I am unable to install roxygen2 on R<3.0.2. Any idea why?
>
>
>
>> install.packages("roxyg
A better solution to this problem is to use character indexing:
x <- c("Tuesday", "Thursday", "Sunday")
c(Monday = 1, Tuesday = 2, Wednesday = 3, Thursday = 4, Friday = 5,
Saturday = 6, Sunday = 7)[x]
http://adv-r.had.co.nz/Subsetting.html#lookup-tables-character-subsetting
Hadley
On Mon, Dec 2
Oops, I misunderstood the database schema, and that only includes
_questions_ tagged R, not the corresponding answers.
Hadley
On Mon, Nov 25, 2013 at 9:55 AM, Hadley Wickham wrote:
> Here's a similar plot for stackoverflow:
> http://data.stackexchange.com/stackoverflow/query/150130/
Here's a similar plot for stackoverflow:
http://data.stackexchange.com/stackoverflow/query/150130/r-questions-and-answers-per-year#graph
and one broken down by month
http://data.stackexchange.com/stackoverflow/query/150129/r-questions-and-answers-per-month#graph
Hadley
On Mon, Nov 25, 2013 at 9:
>> I do not see how it can be illegal to download and duplicate the
>> posts, since all the content is licensed under CC BY-SA. I might have
>> missed something there: http://stackexchange.com/legal If that is
>> really the case, I think I will have to reconsider if I should use it
>> any more.
>
>
I have some notes on functional programming in R at http://adv-r.had.co.nz/.
Hadley
On Wed, Nov 20, 2013 at 3:02 AM, wrote:
> Hi,
> '
> Not specific to 'R'. I search for patterns and found
> http://patternsinfp.wordpress.com/ which is too heavy for me. There is a
> 'Pragmatic Programmer' book o
Modelling a mutable entity, i.e. an account, is really a perfect
example of when to use reference classes. You might find the examples
on http://adv-r.had.co.nz/OO-essentials.html give you a better feel
for the strengths and weaknesses of R's different OO systems.
Hadley
On Sat, Nov 9, 2013 at 9
> There's little practical difference; both hover from 0.00 to 0.03 s system
> time. I could barely tell the difference even averaged over 100 runs; I was
> getting an average around 0.007 (system time) and 2.5s user time for both
> methods.
It's almost always better to use a high precision tim
I'm not sure why either, but here's a simpler (and much faster)
illustration of the problem:
library(microbenchmark)
A <- matrix(1:9,3)
replicate(10, microbenchmark(colMeans(A), times = 4)$time)
replicate(10, microbenchmark(A, times = 4)$time)
Hadley
On Mon, Sep 16, 2013 at 8:11 AM, Christophe
You might find ?Startup helpful - it describes all the places the R
looks for config files when starting up.
Hadley
On Mon, Sep 9, 2013 at 11:51 PM, Bembi Prima wrote:
> Hi All,
>
> Anyone here using RStudio Server?
> I want to ask how can I put .Rprofile that can be accessed by all user.
> So i
>> It was my understanding that package authors are responsible for not
>> breaking other CRAN packages without warning. For example, before I
>> release a new version of plyr or ggplot2, I run R CMD check on every
>> package that depends on my package. I then let the maintainers know if
>> someth
The note is telling you that you usually shouldn't have a file called
build in the top level of your package. What's in the file and why is
it there?
Hadley
On Tue, Sep 3, 2013 at 10:01 AM, S Subramanian
wrote:
> My R CMD check pkgname and R CMD build pkgname run without any notes or
> warnings
> As a user of your package, I would find it irritating if example(foo) didn't
> run anything. It would be more irritating (and would indicate sloppiness
> on your part) if the examples failed when I cut and pasted them. These both
> suggest leaving the examples running.
>
> As the author of you
On Wed, Aug 28, 2013 at 4:32 PM, ivo welch wrote:
> is it possible to temporarily change the destination environment where
> objects are written to? I am thinking
>
> a <- new.env()
> attach(a)
> ### run some code, such as...
> b <- function(x) x
> detach(a)
> a$b
>
> obviously, this
It's not really the inverse of assign (that's get), but I think you
want substitute.
See http://adv-r.had.co.nz/Computing-on-the-language.html for more details.
Hadley
On Tue, Aug 27, 2013 at 4:13 PM, Robert Lynch wrote:
> I am looking for a way to extract the name of a variable that has been
>
Hi Earl,
Have you read the libCurl documentation for CURLOPT_COOKIEJAR? :
Pass a file name as char *, zero terminated. This will make libcurl
write all internally known cookies to the specified file when
curl_easy_cleanup(3)is called. If no cookies are known, no file will
be created. Specify "-"
> For tasks which don't involve I/O but fail with mclapply, how does one
> work out where the problem is? The handy browser() function which
> allows for interactive diagnosis won't work with parallel jobs.
>
> What other approaches can one use?
?dump.frames - interactive debugging after the fac
On Wed, Aug 14, 2013 at 11:36 AM, Simon Zehnder wrote:
> Because the signature is always (A,A) or (B,B). Then, as in AB we have A and
> B and no relationship between A and B, R chooses the method
> lexicographically. The result is as expected: f for A is chosen.
It's not as expected, because it
> In my opinion the reason for the behavior lies in the specific multiple
> inheritance structure between AB, B and A.
So what if we don't make such a weird inheritance structure, and
instead have A and B inherit from a common parent:
setClass("A", contains = "list")
setClass("B", contains = "li
> The class AB inherits from A and from B, but B already inherits from class A.
> So actually you only have an object of class B in your object of class AB.
> When you call the function f R looks for a method f for AB objects. It does
> not find such a method and looks for a method of the object
Hi all,
Any insight into the code below would be appreciated - I don't
understand why two methods which I think should have equal distance
from the call don't.
Thanks!
Hadley
# Create simple class hierarchy
setClass("A", "NULL")
setClass("B", "A")
a <- new("A")
b <- new("B")
setGeneric("f", f
Dear all,
The latest issue of The R Journal is now available at
http://journal.r-project.org/archive/2013-1/
Many thanks to all contributors.
Hadley
--
Editor-in-chief, The R Journal
___
r-annou...@r-project.org mailing list
https://stat.ethz.ch/mail
> I too find R's lexical scoping rules straightforward.
> However, I'd say that if your code relies on lexical scoping to find
> something, you should probably rewrite your code.
Except of course that almost every function relies on lexical scoping
to some extent!
Do you want:
f <- function(a,
>> Can someone help what I need to do to make 'devtools' work?
>
> A quick asking around indicates that Rtools 3.0 should work fine for 2.15.3
> maintenance. Thus, the issue is probably a purely formal bug in devtools's
> version comparison logic, and you need to pester its maintainer. Unless it
> I must admit that I'm a bit surprised by this. I was always under the
> impression that saving/restoring workspaces was the proper workflow in
> R. If you use R interactively (e.g., not by running scripts), how else
> would you store your data, intermediary results, etc., while working
> on a pro
Hi Frank,
The problem is you can't lump together multiple S3 methods. Instead of:
> S3method(latex, anova.rms, bj, cph, Glm, Gls, lrm, naprint.delete, ols,
> pphsm, psm, rms, Rq, summary.rms, validate)
You need
S3method(latex, anova.rms)
S3method(latex, bj)
S3method(latex, cph)
etc.
Hadley
-- please excuse typos.
>
> On Apr 16, 2013, at 8:09 AM, Hadley Wickham wrote:
>
>> Hi all,
>>
>> At RStudio, we're hosting our Introduction to R Workshop this May in
>> two locations. As an R-help subscriber, we're offering 10% off!
>>
Hi all,
At RStudio, we're hosting our Introduction to R Workshop this May in
two locations. As an R-help subscriber, we're offering 10% off!
* Intro to data science with R (http://goo.gl/bplg3)
May 13-14 New York City
* Intro to data science with R (http://goo.gl/VCUFL)
May 20-21 San Francis
> with(dat, data.frame(X=rep(X, each=2), Y=unlist(strsplit(Y, split=" - "
str_split_fixed would be a bit safer here.
Hadley
--
Chief Scientist, RStudio
http://had.co.nz/
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-
On Tue, Apr 9, 2013 at 3:06 AM, Daniel Caro wrote:
> Hello all,
>
> Sorry if this question has been answered in the past, but I could not find
> an answer.
>
> I am trying to print quotes within a cat output. The arguments are:
>
> file= "Data labels"
> directory= "/home/mylaptop/"
>
> The functio
Here's a categorisation of all the functions in base and utils that I
made recently (not sure if the csv will survive posting the list).
Feedback welcomed - this was just a quick first pass, and it's not
authoritative.
Hadley
On Thu, Apr 4, 2013 at 12:34 AM, ivo welch wrote:
> every time I read t
On Tue, Mar 12, 2013 at 12:59 PM, Szumiloski, John
wrote:
> Dear useRs,
>
> Some time ago I queried the list as to an efficient way of building a
> function which acts as ls() but with a different default for all.names:
>
> http://tolstoy.newcastle.edu.au/R/e6/help/09/03/7588.html
>
> I have stru
This is unfortunately reinforced by the "(Not So) Short Introduction
to S4 Object Oriented Programming in R" - I wouldn't recommend that
document to learn about S4.
The most important thing to get about OO in R is that methods belong
to generic functions, not like classes, as in most other program
>> I have heard of people using noweb to do this, but I can't point to any
>> examples. I'd actually recommend against it. Good documentation files
>> don't
>> make good source files.
>
> the compiler package in base R is, apparently, developed using noweb
> https://svn.r-project.org/R/trunk/src/
> Other people have recommended Roxygen, but honestly I haven't seen a package
> documented with Roxygen where the documentation was adequate.
> It looks as though it's great to get initial documentation created, but does
> not appear to encourage followup.
I don't think that's a problem with roxy
> I think codetools could do this reasonably well with the walkCode function,
> but I've never done it so I don't have sample code, and walkCode is mostly
> an internal function.
There are a couple of approaches here:
http://stackoverflow.com/questions/14276728/
Hadley
--
Chief Scientist, RStud
> PS: Just a related side-question: Why is merge_all not included in the
> "newer" package reshape2 as this is considered to be a reboot of the
> reshape package?
Because it doesn't work very well, as you've discovered.
There's an equivalent join_all in plyr.
Hadley
--
Chief Scientist, RStudio
> I'd like to resurrect this issue: is the "varwidth" equivalent (boxplot
> box-width scaling according to number of data points) emulatable in the
> 0.9.* versions of ggplot2? Width still doesn't seem capable of accepting a
> vector with length > 1 ...
No, and it's not currently on the to do list
> I know this scenario is strange as there's no roxygenizable stuff in the
> package, but I am trying to track down an identical error in one of my
> nascent packages and am wondering
> 1) where this behavior originates and
> 2) why document() does not provide more informative feedback.
See https:
On Monday, November 5, 2012, Rolf Turner wrote:
> On 06/11/12 09:40, Iurie Malai wrote:
>
>> So, R (as a language) can be viewed as an extended S language (S + some
>> improvements)? And the R environment includes this (extended) language +
>> extensions?
>>
>
> Are others getting as sick of this
> But I need to work with the names of the figure functions instead, something
> like
>
> figlist <- paste0("fig", 1:3)
Are the functions exported or internal?
# Use for internal functions
pkg <- asNamespace("mypackage")
# Use for exported functions:
pkg <- "package:mypackage"
# Find functions m
> Most critical issues vis-a-vis open source licenses come into play when you
> cross the line from simply being a user/developer to copying and
> distributing. In the latter case, whether you plan to charge for the
> resultant product or make it available for free, is irrelevant.
I think the m
>> What is the special meaning for the method name start with a dot?
>
> It means nothing in particular, except that such objects don't show up in
> ls() by default. The _intention_ is usually that the function is only to be
> used internally and not for end-user use.
But these days, if you're w
> I would usually do more than that: I find the R documentation system
> helpful even when I'm the only user of a package (and there are the prompt*
> functions for quickly creating it, as well as package.skeleton to set things
> up at the beginning). Vignettes are a great way to organize and doc
>> > I'd like to have the code source files from the 'local' git repository
>> > without modification, where 'local' could mean c:\yada\ for one
> person,
>> > m:\my documents\wetlands\ for another, and
> l:\foo\bar\sharedRemote\wet\ to
>> > another user.
>> > ...
>>
>> Yes. Use
>>
>> library(myPr
>> where myProject is a package containing all the scripts, written as
>> functions.
>
> Yes, the eventual fate of these functions is expected to be a package. I'd
> like the pushed/pulled code to be runable as is without an intermediate
> step of package creation or gsub()ing hardcoded paths.
You
After uploading your package via ftp, in your email to
c...@r-project.org you need to state that you agree to the CRAN
repository policy
(http://cran.r-project.org/web/packages/policies.html)
Hadley
On Sat, Sep 22, 2012 at 1:02 AM, Christopher Desjardins
wrote:
> Hi,
> I want to submit a package
s = levels)
mydata$end <- factor(mydata$end, levels = levels)
ggplot(mydata, aes(x = start)) +
geom_rect(aes(xmin = start, xmax = end, ymin = 0, ymax = peak)) +
xlim(as.character(levels))
On Sun, Sep 16, 2012 at 11:11 AM, Rui Barradas wrote:
> Maybe a bug in ggplot2::geom_rec
If you have a million levels is it really necessary to use a factor? I'm
not sure what advantages it will to have to a string in this circumstance
(especially since you don't seem to know the levels a priori but have to
learn them from the data).
Hadley
On Sunday, September 16, 2012, Sam Steingol
On Thu, Jun 7, 2012 at 9:30 AM, Tim Smith wrote:
> Hi,
>
> Here is the corrected code:
>
> library(ggplot2)
> ids <- paste('id_',1:3,sep='')
> before <- sample(9)
> after <- sample(1:10,9)
> dat <- as.matrix(cbind(before,after))
> rownames(dat) <- rep(ids,3)
> position <- c(rep(10,3),rep(13,3),rep
101 - 200 of 1519 matches
Mail list logo