similar to: Is there a way to specify drop=FALSE as the global default?

Displaying 20 results from an estimated 10000 matches similar to: "Is there a way to specify drop=FALSE as the global default?"

2005 Dec 26
1
Seg fault with trace
(Under 2.2.0, Mac) I have been unable to reduce this to a simple case, so I'll include my full code, and my intentions. The problem I'm trying to solve is that while many defaults (eg. na.rm=F, drop=T) make sense for interactive programming, they tend to be a bit of a pain when developing a package. For example, I often forget to use drop=FALSE, only test with multiple columns and then
2006 May 04
3
New-user support package - suggestions?
Dear Community, This is largely a repost with some new information. I'm interested in developing a package that could ease the command-line learning curve for new users. It would provide more detailed syntax checking and commentary as feedback. It would try to anticipate common new-user errors, and provide feedback to help correct them. As a trivial example, instead of >
2012 Jul 11
2
How to specify the dest directory?
Hi, When I use the following command, A (a directory) will be created in B. But I actually want to cp the content of A to B. rsync -az A B Is there a way to cp the content of A to B? Thanks! -- Regards, Peng
2015 Jan 06
2
[LLVMdev] Are there manpages for llvm?
Hi, I have llvm installed through MacPorts. But I don't see macports installed. Are there supposed to be manpages of commands like lli installed? -- Regards, Peng
2009 Dec 01
4
Is there a function to test if all the elements in a vector are unique
length(unique(c(1,2,2)))==length(c(1,2,2)) I use the above test to test if all the elements in a vector are unique. But I'm wondering if there is a convenient function to do so in R library.
2009 Dec 18
4
How to print to file?
I don't find a function to print a string to file. Would somebody let me know what function I should use?
2012 Mar 15
2
Ggplot barchart drops factor levels: how to show them with zero counts?
Hello, When plotting a barchart with ggplot it drops the levels of the factor for which no counts are available. For example: library(ggplot) mtcars$cyl<-factor(mtcars$cyl) ggplot(mtcars[!mtcars$cyl==4,], aes(cyl))+geom_bar() levels(mtcars[!mtcars$cyl==4,]) This shows my problem. Because no counts are available for factorlevel '4', the label 4 dissapears from the plot. However, I
2009 Aug 10
5
Example scripts for R Manual
Hi, I am wondering if some experienced users would help put the ready-to-run code of the examples in the manuals. It would help new users learn R faster by putting all the examples in an ready-to-run R script file. Can somebody help do so sometime and post the code along with the pdf manuals? http://cran.r-project.org/manuals.html Regards, Peng
2010 Jan 21
3
Anova unequal variance
I found this paper on ANOVA on unequal error variance. Has this be incorporated to any R package? Is there any textbook that discuss the problem of ANOVA on unequal error variance in general? http://www.jstor.org/stable/2532947?cookieSet=1
2005 Jun 01
3
x[x$a=="q",,drop=TRUE]
I'm trying to select a subset of a dataframe while dropping some factors. While the dataset gets smaller all Factor levels remain and I need to get rid of them. Strangely enough, I am almost certain that the same code on the same data worked OK earlier today - and it is not the first time that I'm not able to replicate earlier results with this command (I know, I might just be going
2009 Nov 19
4
Is there an variant of apply() that does not return anything?
There are a few version of apply() (e.g., lapply(), sapply()). I'm wondering if there is one that does not return anything but just silently apply a function to the list argument. For example, the plot function is applied to each element in 'alist'. It is redundant to return anything from apply. apply(alist,function(x){ plot each element of alist})
2010 Feb 03
5
How to export the examples in help(something) to a file?
Some examples in the help page are too long to be copied from screen. Could somebody let me know some easy way on how to extract the example to a file so that I can play with them?
2023 Mar 12
2
Multiple Assignment built into the R Interpreter?
Thanks Gabriel and Kevin for your inputs, regarding your points Gabriel, I think Python and Julia do allow multiple sub-assignment, but in-line with my earlier suggestion in response to Duncan to make multiple assignment an environment-level operation (like collapse::%=% currently works), this would not be possible in R. Regarding the [a] <- coolest_function() syntax, yeah it would mean do
2011 Apr 15
2
Extract information from the names of a list within lapply
Dear list, I want to loop over a list through lapply and at the same time I want to extract some information from the names of the list elements. lapply does not seem to carry the names. Is there anyway to access the names of a list within lapply? Thanks. Jun [[alternative HTML version deleted]]
2010 Jan 01
5
How to not to terminate read.table if the input file is empty?
read.table terminates the program if the input file is empty. Is there way to let the program continue and return me a NULL instead of terminating the program? $ Rscript read_empty.R > read.table("empty_data.txt") Error in read.table("empty_data.txt") : no lines available in input Execution halted $ cat read_empty.R read.table("empty_data.txt") $ cat
2009 Aug 06
5
Is there a 'vi' mode in R?
Hi, I'm wondering if R provide a vi mode in the command line just like other shells such as bash do. Can somebody let me know? Regards, Peng
2015 Jan 21
2
reducing redundant work in methods package
Hi all, The function call series genericForPrimitive -> .findBasicFuns -> .findAll happens 4400 times while the GenomicRanges package is loading. Each time .findAll follows a chain of environments to determine that the methods namespace is the only one that holds a variable called .BasicFunsList. This accounts for ~10% of package loading time. I'm sure there is some history to that
2023 Mar 11
2
Multiple Assignment built into the R Interpreter?
FWIW, it's possible to get fairly close to your proposed semantics using the existing metaprogramming facilities in R. I put together a prototype package here to demonstrate: https://github.com/kevinushey/dotty The package exports an object called `.`, with a special `[<-.dot` S3 method which enables destructuring assignments. This means you can write code like: .[nr, nc] <-
2019 Jan 28
2
How to generate .bc file using configure && make on Mac OS X?
> > but doesn't emit optnone and nounwind attributes > s/nounwind/noinline On Mon, Jan 28, 2019 at 11:35 AM Jakub (Kuba) Kuderski < kubakuderski at gmail.com> wrote: > As far as I understand, gllvm doesn't run LTO pipeline or any cross-module > optimization, and the optimization level provided is only used to compile > each Translation Unit separately. > If you
2023 Mar 12
1
Multiple Assignment built into the R Interpreter?
On 12/03/2023 6:07 a.m., Sebastian Martin Krantz wrote: > Thinking more about this, and seeing Kevins examples at > https://github.com/kevinushey/dotty > <https://github.com/kevinushey/dotty>, I think this is the most R-like > way of doing it, > with an additional benefit as it would allow to introduce the useful > data.table semantics DT[, .(a = b, c, d)] to more