search for: berwin

Displaying 20 results from an estimated 281 matches for "berwin".

Did you mean: berlin
2004 Mar 08
2
Bug in points.formula (PR#6652)
...uot;blue") Error in if (length(x) == l) x[s] else x : argument is of length zero This seems to be due to the fact that the data used was attached before the call and not specified in the call via the "data" argument. The following patch seems to fix the problem. Cheers, Berwin diff -c /home/berwin/lang/R/Courses/3S6/plot.R.orig /home/berwin/lang/R/Courses/3S6/plot.R *** /home/berwin/lang/R/Courses/3S6/plot.R.orig Tue Sep 2 23:43:42 2003 --- /home/berwin/lang/R/Courses/3S6/plot.R Mon Mar 8 16:06:32 2004 *************** *** 312,318 **** mf <- eval(m, parent.fra...
2005 Jul 13
2
Kronecker matrix product
Hi I want to write a little function that takes a matrix X of size m-by-n, and a list L of length "m", whose elements are matrices all of which have the same number of columns but possibly a different number of rows. I then want to get a sort of dumbed-down kronecker product in which X[i,j] is replaced by X[i,j]*L[[j]] where L[[j]] is the j-th of the "m" matrices. For
2006 Feb 18
3
Bug in Sweave? -- scoping problem? (PR#8615)
I have found a strange scoping problem in Sweave. The following Rnw file doesn't produce the same output in Sweave as it does if I produce an R file using Stangle and execute that: \documentclass[12pt]{article} \begin{document} <<R>>= election <- data.frame(A=1:3, B=9:7, C=rep(0,3)) partytotal <- rep(0, ncol(election)) for (i in 1:ncol(election)) { partytotal[i] <-
2005 Dec 02
3
extracting rows of a dataframe
Hi look at the following session, in which I have a dataframe, and I want to extract the second row, without the first column. Everything works as expected until the last line, where I set the names of x to NULL, and get a non-desired object (I want c(4,3).). Three questions: (1) why is as.vector(a[2,-1]) not a vector? (2) How come setting names to NULL gives me bad weirdness? (3) Can I
2013 May 18
2
R CMD config for R >= 3.0.1
Dear all, When installing the usual packages that I use, after installing R 3.0.1, I noticed that the installation of some packages that query R about its configuration did not succeed. The problem is exemplified by: berwin at bossiaea:~$ R-3.0.1 CMD config CC /opt/R/R-3.0.1/lib/R/bin/config: 222: .: Can't open /opt/R/R-3.0.1/lib/R/etc/Renviron Prior to R 3.0.1 such commands worked fine: berwin at bossiaea:~$ R-3.0.0 CMD config CC gcc -std=gnu99 I noticed now that my installations of the development and patche...
2010 Apr 01
2
pdf files in loops
I need to make a bunch of PDF files of histograms. I tried gatelist = unique(mdf$ArrivalGate) for( gate in gatelist) { outfile = paste("../", airport, "/", airport, "taxiHistogram", gate, ".pdf", sep="") pdf(file = outfile, width = 10, height=8, par(lwd=1)) title=paste("Taxi time for Arrival Gate", gate, "by
2008 May 07
0
Fwd: Re: Solution of function
Forgot to send one copy to R help. Sorry Megh Dal <megh700004@yahoo.com> wrote: Date: Wed, 7 May 2008 02:45:09 -0700 (PDT) From: Megh Dal <megh700004@yahoo.com> Subject: Re: [R] Solution of function To: Berwin A Turlach <berwin@maths.uwa.edu.au> Hi Berwin, Thanks for having look on my problem. However on ipop() function I see following: ipop solves the quadratic programming problem : min(c'*x + 1/2 * x' * H * x) subject to: b <= A * x <= b + r l <= x <= u...
2006 Jul 19
1
Test for equality of coefficients in multivariate multipleregression
Dear Berwin, Simply stacking the problems and treating the resulting observations as independent will give you the correct coefficients, but incorrect coefficient variances and artificially zero covariances. The approach that I suggested originally -- testing a linear hypothesis using the coefficient estimat...
2003 Aug 21
1
R is mentioned on Linux Today
Hi all, people who don't follow Linux Today regularly may want to check out: http://linuxtoday.com/developer/2003082000626OSSVDV My apologies if this is considered spam. Cheers, Berwin ========================== Full address ============================ Berwin A Turlach Tel.: +61 (8) 9380 3338 (secr) School of Mathematics and Statistics +61 (8) 9380 3383 (self) The University of Western Australia FAX : +61 (8) 9380 1028 35 Stirling Highway...
2003 Jun 13
1
lars - lasso problem
hello I tried to use lars() but neither with my own data nor with the sample data it works. I get in both cases the following error prompt: > data(diabetes) > par(mfrow=c(2,2)) > attach(diabetes) > x<-lars(x,y) Error in one %*% x : requires numeric matrix/vector arguments > x<-lars(x,y, type="lasso") Error in one %*% x : requires numeric matrix/vector arguments
2024 Feb 16
1
Packages sometimes don't update, but no error or warning is thrown
...be at least a warning that there are new updates available, just no new binaries. Best, Philipp ? ? ? Gesendet:?Mittwoch, 14. Februar 2024 um 18:44 Uhr Von:?"Duncan Murdoch" <murdoch.duncan at gmail.com> An:?"Martin Maechler" <maechler at stat.math.ethz.ch>, "Berwin A Turlach" <berwin.turlach at gmail.com> Cc:?"gernophil--- via R-help" <r-help at r-project.org> Betreff:?Re: [R] Packages sometimes don't update, but no error or warning is thrown On 14/02/2024 5:50 a.m., Martin Maechler wrote: >>>>>> Berwin A Turla...
2001 Nov 02
1
Summary --- testing for existence of file.
Many thanks to those who answered my question about how to test for the existence of a file: Berwin Turlach, Jari Oksanen, Henrik Bengtsson, Uwe Ligges, and Joerg Maeder. The simplest solution is to use the built-in (!!!) function file.exists() which returns TRUE if the file exists, and FALSE if it doesn't. Like, duhhhhhh!!! It's exactly what I wanted. Special thanks to Berwin Turlach...
2003 Oct 06
4
Apply and its friends
Hi, Forgive a very basic question... I need to take two lists-of-lists, and apply a function to each pair of elements in the lists to return a single list... For example l1 <- list(1:5,6:10,2:15) l2 <- list(1:8,4:12,1:19,4:20) I could easily do an lapply across each of them, but is there a function that does a sort-of pairwise-apply across both together? Does anybody know of a good
2005 Mar 29
1
improved pairs.formula?
...- attr(mt, "response")) != 0 ){ ind <- c(tt, ind) } pairs(mf[,ind], ...) } Would you please kindly consider replacing the current pairs.formula function (at the top of the file src/library/graphics/R/pairs.R) with the above function? Best wishes, Berwin ========================== Full address ============================ Berwin A Turlach Tel.: +61 (8) 6488 3338 (secr) School of Mathematics and Statistics +61 (8) 6488 3383 (self) The University of Western Australia FAX : +61 (8) 6488 1028 35 Stirling Highway...
2016 Apr 17
2
Building R-patched and R-devel fails
...ror 1 make[2]: *** Waiting for unfinished jobs.... [...] Presumably, in both branches, the files Makefile.in and Makefile.win in src/library/Recommended have to be adapted to contain the following line at the end among the "Hardcoded dependencies": survival.ts: Matrix.ts Cheers, Berwin
2020 Feb 08
4
Development version of R fails tests and is not installed
...round() has changed between R 3.6.2 and the development version. But I do not understand why this test all of a sudden failed if the results from the last successfully installed development version of R suggest that the test should be passed. Thanks in advance for any insight and tips. Cheers, Berwin
2023 May 18
1
suprising behaviour of tryCatch()
...atch(bquote("sexsnp[i] = fisher.test(table(data[,3], data[,i+38]))$p"), error=function(e) print(NA))} or R> for(i in 1:1750){tryCatch(.("sexsnp[i] = fisher.test(table(data[,3], data[,i+38]))$p"), error=function(e) print(NA))} If you want to use the '='. Cheers, Berwin
2023 May 18
1
suprising behaviour of tryCatch()
...ta[,3], data[,i+38]))$p }, error=function(e) print(NA)) Exercise: Compare > list(a = 2) $a [1] 2 with > list({ a = 2 }) [[1]] [1] 2 and > list(b = { a = 2 }) $b [1] 2 BTW, note how the latter two assigned a <- 2 to the global environment. /Henrik On Thu, May 18, 2023 at 8:22?AM Berwin A Turlach <berwin.turlach at gmail.com> wrote: > > G'day Federico, > > On Wed, 17 May 2023 10:42:17 +0000 > "Calboli Federico (LUKE)" <federico.calboli at luke.fi> wrote: > > > sexsnp = rep(NA, 1750) > > for(i in 1:1750){tryCatch(sexsnp[i] = f...
2023 Aug 12
1
geom_smooth
..._data,aes(x=x_var,y=y_var,))+ geom_point()+ geom_smooth(se=TRUE,fill="blue",color="black",linetype="dashed") + geom_ribbon(stat="smooth", aes(ymin=after_stat(ymin), ymax=after_stat(ymax)), fill=NA, color="black")+ theme_cowplot() Cheers, Berwin
2023 Nov 07
1
non-linear regression and root finding
...; can be enforced) is to rewrite the parameters as: pK1 = exp(theta1) ## only if pK1 > 0 pK2 = pK1 + exp(theta2) pK3 = pk2 + exp(theta3) And then use your optimiser to optimise over theta1, theta2 and theta3. There might be better approaches depending on the specific problem. Cheers, Berwin