similar to: [R] function changes argument (PR#9216)

Displaying 20 results from an estimated 30000 matches similar to: "[R] function changes argument (PR#9216)"

2006 Sep 11
1
function changes argument
Dear R-list, the following function f changes L. I thought, assignments within functions are only local? f<-function(LL) { for (ll in LL) { ll$txt<-"changed in f" } } l<-list(txt="original value") L<-list(l) L[[1]]$txt f(L) L[[1]]$txt gives (using R 2.3.1): ... > L[[1]]$txt [1] "original value" > f(L) > L[[1]]$txt [1] "changed in
2002 May 18
3
3D graphics with R
Is there any graphical frontend/secondary programm (freely availible for Windowsor Linux) which can be used with R to display the results of a principle component analysis in 3D space (rotatable!?)? It works with Spotfire, but is there any freely or cheaply availible programm? -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-help mailing list -- Read
2009 Nov 27
3
Iteration idioms & laziness
Hi all, I'm new to R. Having a functional background, I was wondering what's the idiomatic way to iterate. It seems that for loops are the default given there's no tail-call optimization. I'm curious to know whether there is a way to transform the following toy snippet into something that doesn't eat up gigabytes of memory (like it's for loop counterpart) using laziness:
2006 Apr 21
5
optim "CG" bug w/patch proposal (PR#8786)
Dear R team, when using optim with method "CG" I got the wrong $value for the reported $par. Example: f<-function(p) { if (!all(p>-.7)) return(2) if (!all(p<.7)) return(2) sin((p[1])^2)*sin(p[2]) } optim(c(0.1,-0.1),f,method="CG",control=list(trace=0,type=1)) $par 19280.68 -10622.32 $value -0.2346207 # should be 2!
2006 Nov 03
1
[R] difference in using with() and the "data" argument in glm (PR#9338)
I've redirected this reply from r-help to the bugs list. On 11/3/2006 8:25 AM, vito muggeo wrote: > Dear all, > I am dealing with the following (apparently simple problem): > For some reasons I am interested in passing variables from a dataframe > to a specific environment, and in fitting a standard glm: > > dati<-data.frame(y=rnorm(10),x1=runif(10),x2=runif(10)) >
2017 Aug 04
4
What RH-like on a Dell XPS 15 (9590)?
Ok you in Grub press tab and then add ?3? after the initrd entry ?. quiet?? yum remove xorg-x11-drv-nouveau And see if X11 come up with standard frambuffer? Disable nouveau complete from kernel if the upper not helps. nano /etc/modprobe.d/blacklist-nouveau.conf blacklist nouveau > Am 04.08.2017 um 12:52 schrieb wwp <subscript at free.fr>: > > Hello, > > > On Thu,
2007 Jan 02
3
connecting asterisk (trixbox) to traditional phone lines?
Ok, I have trixbox working how I want. How do I now (cheaply as possibly) get a phone number so people can call it from any number? I am just doing a prototype so just want it done cheaply so I can demo it to my supervisors. Thanks! -------------- next part -------------- An HTML attachment was scrubbed... URL:
2007 Apr 02
2
parallel I/O on shared-memory multi-CPU machines
Dear ext3-users, I write scientific number-crunching codes which deal with large input and output files (Gb, tens of Gb, as much as hundreds of Gygabytes on occasions). Now there are these multi-core setups like Intel Core 2 Duo becoming available at a low cost. Disk I/O is one of the biggest bottlenecks. I would very much like to put to use the multiple processors to read or write in parallel
2005 Sep 26
3
Assigning a zero length vector to a list (PR#8157)
Full_Name: Jussi Jousimo Version: 2.2.0 beta OS: Windows XP Submission from: (NULL) (193.167.195.60) I'm trying to assign a zero length vector to a list: x<-numeric() length(x) foo<-list() foo$bar[[1]]<-x length(foo$bar[[1]]) foo But in the list this vector turns out to be length one with random content. x<-character() makes R to crash.
2015 Sep 21
2
[RFC] LNT Feature: tracking performance changes
I agree. I plan to implement that next! > On Sep 21, 2015, at 4:25 PM, Hal Finkel <hfinkel at anl.gov> wrote: > > However, I think that unless we're able to e-mail commit authors who cause regressions like we do for buildbot failures, as well as others who are architecture performance experts on the relevant systems, this won't see the use it needs. -------------- next
2010 May 04
3
Idiomatic looping over list name, value pairs in R
Considering the python code: for k, v in d.items(): do_something(k); do_something_else(v) I have the following for R: for (i in c(1:length(d))) { do_something(names(d[i])); do_something_else(d[[i]]) } This does not seem seems idiomatic. What is the best way of doing the same with R? Thanks. Luis
2005 Jun 06
2
Bug in new() or validObject() in methods package (PR#7922)
Something in new() or validObject() in the methods package is messing up. This happens in both 2.1.0 and R-devel in Windows. I'd like to have an empty expression for a slot in a class. An empty expression is an expression: > is.expression(expression()) [1] TRUE > > is(expression(), "expression") [1] TRUE > class(expression()) [1] "expression"
2009 May 27
12
query on Ruby array
Looking for suggestions on following two queries. Query 1 ------------------------------ Are the two following lines of code different in Ruby / Rails ( in a *.html.erb) file. <% if @forms.count != 0 %> <!-- first code --> Vs. <% if @forms.count %> <!--second code --> @forms is an array of objects. Coming from "C" language development background, i thought
2008 Feb 25
4
A more idiomatic way to write this
Hello, I have a vector of 1,000,000 numbers and another vector of 1,000 divisors. What I'd like to do is to divide the first 1,000 numbers of the first vector by the first divisor, then the next 1,000 by the second divisor and so on. I came up with this, but I was wondering if there is a more idiomatic, R-like way to write it: x <- ... divs <- ... for (i in seq(from = 1, to = 1000000,
2009 Feb 10
1
Variable/function namespaces WAS: Bug in subsetting data frame (PR#13515)
On Tue, Feb 10, 2009 at 10:11 AM, Duncan Murdoch <murdoch at stats.uwo.ca> wrote: > Stavros Macrakis wrote: >> On Tue, Feb 10, 2009 at 8:31 AM, Duncan Murdoch <murdoch at stats.uwo.ca>wrote: >>> The evaluator recognizes the context of usage and will get the >>> function for a function call.... >> Can you point me to chapter and verse in the language
2006 Mar 24
3
bug in plot.acf (PR#8705)
(Moved from r-devel to r-bugs) On 3/24/2006 5:03 AM, Antonio, Fabio Di Narzo wrote: > Hi all. > There's a bug in plot.acf, when plotting acf for multivariate time series. > Here a reproducible example: > > X <- rnorm(1000) > Y <- -X + rnorm(1000, sd=0.6) > Z <- cbind(X,Y) > > In > acf(Z) > cross-correlation plot y-axis is limited to 0-1. But: >
2012 Nov 19
6
tcltk freezing using MS Windows for R-2.14+
I am the maintainer of a Bioconductor package (affylmGUI) which uses tcltk. It freezes inconsistently on MS Windows, but not Mac or Unix. see details below. After considerable testing I have reduced the problem from a few thousand lines of code to 30 lines! If you paste the following lines of code into an R window: testGUI <- function(){ require(tcltk) MainWindow <-
2017 Aug 03
2
What RH-like on a Dell XPS 15 (9590)?
On August 2, 2017 3:18:29 AM CDT, wwp <subscript at free.fr> wrote: >Hello Johnny, > > >On Fri, 28 Jul 2017 13:47:14 -0500 Johnny Hughes <johnny at centos.org> >wrote: > >> On 07/28/2017 11:32 AM, wwp wrote: >> > Hello Johnny, >> > >> > >> > On Fri, 28 Jul 2017 10:33:15 -0500 Johnny Hughes ><johnny at centos.org>
2004 Oct 20
1
Bug in 'rot=' of scales argument of barchart (PR#7296)
Full_Name: Andreas Kiermeier Version: 2.0.0 OS: Windows XP Submission from: (NULL) (203.26.136.133) When "rot=-90" in the scales argument of barchart (and possibly other trellis graphics) the axis label disappears behind the bars and only the last character can be seen. For "rot=90" things work fine.
2007 Aug 23
4
Idiomatic way to do a non-database Enumeration?
I have a class which stores as one of its attributes a day of the week as an integer (0-6, 0=Sunday, standard UNIXy values). I want, obviously, the views to show the weekday name and the forms to provide a drop-down with the weekday names. Essentially it''s a vrtual attribute whose value is the localized weekday name, which maps to the integer value that''s actually stored.