similar to: Symbol and Ellipsis problems

Displaying 20 results from an estimated 6000 matches similar to: "Symbol and Ellipsis problems"

2011 Jan 17
1
Problem about for loop
Hi everyones, my function like; e <- rnorm(n=50, mean=0, sd=sqrt(0.5625)) x0 <- c(rep(1,50)) x1 <- rnorm(n=50,mean=2,sd=1) x2 <- rnorm(n=50,mean=2,sd=1) x3 <- rnorm(n=50,mean=2,sd=1) x4 <- rnorm(n=50,mean=2,sd=1) y <- 1+ 2*x1+4*x2+3*x3+2*x4+e x2[1] = 10 #influential observarion y[1] = 10 #influential observarion data.x <- matrix(c(x0,x1,x2,x3,x4),ncol=5) data.y
2011 Mar 20
2
Why unique(sample) decreases the performance ?
Hi, I' am interested in differences between sample's result when samples consist of full elements and consist of only distinct elements. When sample consist of full elements it take about 120 sec., but when consist of only distinct elements it take about 4.5 or 5 times more sec. I expected that opposite of this result, because unique(sample) has less elements than full sample. Code as
2010 Jun 24
4
Simple qqplot question
I am a beginner in R, so please don't step on me if this is too simple. I have two data sets datax and datay for which I created a qqplot qqplot(datax,datay) but now I want a line that indicates the perfect match so that I can see how much the plot diverts from the ideal. This ideal however is not normal, so I think qqnorm and qqline cannot be applied. Perhaps you can help? Ralf
2006 Jul 31
4
question about dataframe ("sensory") in PLS package
Dear all, I am trying to my dataframe for the PLS analysis using the PLS package. However I have some trouble generating the correct dataframe. The main problem is how to use one name to represent several columns in the dataframe. The example dataframe in PLS package is called "sensory". I cannot directly read the data file since it's a binary file. If I use
2002 Mar 26
1
ellipsis question
Hello R experten I have just written a little function to calculate all pairwise combinations of two vector arguments: > pair(c(1,2,3),c(7,8)) [,1] [,2] [1,] 1 7 [2,] 1 8 [3,] 2 7 [4,] 2 8 [5,] 3 7 [6,] 3 8 > I want to generalize this to any number of arguments, for example, <fantasy> > ntuple(c(1,2,3),c(7,8),c(14,15)) [,1] [,2]
2009 May 04
1
ellipsis problem
Hi, I'm confused about the use of ellipsis in function arguments. I'm trying to write a wrapper for plot to automate the combination of plot() and points() calls for a data.frame. Some arguments seem to get passed through to the inner plot, while others cause an error: Error in eval(expr, envir, enclos) : ..1 used in an incorrect context, no ... to look in As a minimal example: tmp
2009 Mar 02
2
R-code help for filtering with for loop
Dear Sir / Madam, I am new for R coding. Kindly help me out in sorting out the following problem. There are 50 rows with six coloumns(you could see in the attached .txt file). I wish to go for filtering this 50 rows for any one of the six coloumns satisfying the value >= 64. I need to have a final table with rows having >= 64 value in any one of the six coloumns and the rest could be
2020 Jun 26
4
Quedarse con las muestras de una BD que están presentes otra, basado en dos variables
Buenas tardes, quedarme con las muestras de una BD (data) que están presentes en otra (datax), cuando se tiene una variable que nunca se repite (Key) es fácil: data <- subset(data,data$Key %in% datax$Key). Mi problema es cuando la exclusividad viene dada por dos variables. P.e., las coordenadas de un mapa: lon y lat. ¿Como puedo quedarme con las muestras de una df cuya lon y lat son iguales a
2000 Oct 12
2
works in R-1.1.1 but not in R-development; why?
Dear All, A library (PHYLOGR) that passed the usual tests in R-1.1.1 gives errors with R-devel; my (mis?)understanding of scoping rules is that it should have worked in both. The problems seem related to using the name of the data frame for extracting weights or subsets within a function call. The problems can be reproduced as follows: ********************** datai <- data.frame( y =
2010 Feb 16
1
ellipsis-related error: used in an incorrect context, no ... to look in
Hi, I have the following code snippet: require(lattice) f.barchart <- function(...) { barchart(..., panel = function(x, y, ...) { panel.barchart(x, y, ...) } ) } x <- data.frame(a = c(1,1,2,2), b = c(1,2,3,4), c = c(1,2,2,1)) f.barchart(a ~ b, data = x, groups = c) Which results in the following error being
2013 Nov 03
3
[LLVMdev] loop vectorizer issue
Actually what I meant in my original loop, that there is a dependency between every two consecutive iterations. So, how the loop vectorizer says 'we can vectorize this loop'? for(int k=20;k<50;k++) dataY[k] = dataY[k-1]; From: Henrique Santos [mailto:henrique.nazare.santos at gmail.com] Sent: Sunday, November 03, 2013 4:28 PM To: Sara Elshobaky Cc: <llvmdev at
2008 Jul 10
1
Ellipsis arguments for plot.formula
Hi: I have a function as follows: my.plot <- function( x, y = NULL, ... ) { plot( x, y, cex.axis=0.5, ...) } Set up the variables: x <- 1:10; y <- x; tdf <- data.frame( x, y ); main.str <- "test" I will exercise the function in two ways: > my.plot( y ~ x, tdf, main = "test" ) This works fine > my.plot( y ~ x, tdf, main = main.str ) Error in
2005 Oct 30
1
smbmount codepage/iocharset settings vs NT4
Hi, I'm in the process of setting up a backup server for a somewhat antiquated NT4 server. Backup server is CentOS-4 (~ RHEL-4), kernel-2.6.9-11.EL, samba-client-3.0.10-1.4E, rsync-2.6.3-1, LANG=en_US.UTF-8. NT4 shares are mounted on the server and rsynced to local disk. This setup is working pretty well, however on the NT box there are some files with names containing odd characters like
2013 Nov 03
0
[LLVMdev] loop vectorizer issue
Hi Sarah, the loop vectorizer runs not on the C code but on LLVM IR this c code was lowered to. Before the loop vectorizer runs many other optimization change the shape of this IR. You can see in the LLVM IR you referenced below, a preceding LLVM IR transformation has change your loop from: > for(int k=20;k<50;k++) > dataY[k] = dataY[k-1]; to > int a = d[19]; >
2013 Nov 03
2
[LLVMdev] loop vectorizer issue
Hello, I was trying to trace the Loop vectorizer of the LLVM, I wrote a simple loop with a clear dependency. But found that the debug shows that 'we can vectorize this loop' Here you are my loop with dependency: for(int k=20;k<50;k++) dataY[k] = dataY[k-1]; And the debug prints: LV: Checking a loop in "main" LV: Found a loop: for.body4 LV: Found an
2018 Aug 12
3
substitute() on arguments in ellipsis ("dot dot dot")?
Hi. For any number of *known* arguments, we can do: one <- function(a) list(a = substitute(a)) two <- function(a, b) list(a = substitute(a), b = substitute(b)) and so on. But how do I achieve the same when I have: dots <- function(...) list(???) I want to implement this such that I can do: > exprs <- dots(1+2) > str(exprs) List of 1 $ : language 1 + 2 as well as: >
2013 Nov 03
0
[LLVMdev] loop vectorizer issue
Notice that the code you provided, for globals and stack allocations, at least, is semantically equivalent to: int a = d[19]; for(int k = 20; k < 50; k++) dataY[k] = a; Like so, the load you see missing was redundant, probably hoisted by GVN/PRE and replaced with "%.pre". H. On Sun, Nov 3, 2013 at 11:26 AM, Sara Elshobaky <sara.elshobaky at gmail.com>wrote: >
2010 Aug 06
2
All keys dead, but ØÆÅ£¤§
Hi, I'm trying to run an accounting program called Mamut DaTax. Running the installation part is not a problem, but when entering the program itself all keys are dead but the following: ?????? I'm using a Norwegian keyboard, and wine version 1.3 under Kubuntu 10.04. Any suggestions for how to approach? Thanks :-) Best regards, Erik
2018 Aug 13
2
substitute() on arguments in ellipsis ("dot dot dot")?
Interestingly, as.list(substitute(...())) also works. On Sun, Aug 12, 2018 at 1:16 PM, Duncan Murdoch <murdoch.duncan at gmail.com> wrote: > On 12/08/2018 4:00 PM, Henrik Bengtsson wrote: >> >> Hi. For any number of *known* arguments, we can do: >> >> one <- function(a) list(a = substitute(a)) >> two <- function(a, b) list(a = substitute(a), b =
2003 Oct 15
0
qqnorm(*, datax=TRUE, xlab,ylab) -- S+ compatibility problem
Just found because an old (written for S+) function of mine did label plots wrongly with R. Example --- inspired from example(qqnorm) --- data(precip) qqnorm(precip, ylab = "Precipitation [in/yr] ...") qqnorm(precip, ylab = "Precipitation [in/yr] ...", datax = TRUE) this is all "fine" -- `datax' is a switch that just switches the axes but keeps the