similar to: Help with improving efficiency

Displaying 20 results from an estimated 10000 matches similar to: "Help with improving efficiency"

2002 Jul 16
2
R 1.5.1 on AIX 5.1
I'm trying to get R running on AIX 5.1 with the native AIX compilers, VisualAge C++ 5.0.2.0 and XL Fortran Compiler 7.1.0.0. R compiled fine, but in running the test cases, the base-Ex.R tests fail in the Choleski decomposition with the following: > x <- matrix(c(1:5, (1:5)^2), 5, 2) > m <- crossprod(x) > Q <- chol(m) Error in chol(m) : NA/NaN/Inf in foreign function call
2020 Apr 30
2
Use of MathJax (or something similar) in .Rd files
Thanks Gabor and Duncan! It works. For those interested, I added this to the beginning of the \details{} section: \if{html}{\out{ <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax at 3/es5/tex-mml-chtml.js"> </script> }} And then I can use: \if{html}{\out{\(B_{x(a,b)} = \int_0^x t^{a-1} (1-t)^{b-1} dt\)}} or
2020 Apr 30
2
Use of MathJax (or something similar) in .Rd files
Interesting. I gave this a try, but couldn't make this work. One would have to infuse something like <script id="MathJax-script" async src="https://cdn.jsdelivr.net/npm/mathjax at 3/es5/tex-mml-chtml.js"> </script> or <script id="MathJax-script" async src="<url-to-your-site>/mathjax/tex-chtml.js"> </script> into
2020 May 05
1
Use of MathJax (or something similar) in .Rd files
Hi All, After some tinkering, and with support from Duncan, I put together a package that allows for easy inclusion of MathJax equations in Rd files. The package has been submitted to CRAN, but those who want to try this out already can get it here: https://github.com/wviechtb/mathjaxr or in other words: install.packages("remotes")
2004 May 28
5
vector normal to a plane
Hi All, (I have a degree in math, but I am too embarassed to ask my colleagues, so here goes:) I would like to get a vector normal (orthogonal) to a plane formed by two other vectors. In matlab I do this: v1 = [.4, .6, .8]; v2 = [.9, .7, .2]; nn = cross(v1,v2) (gives ~[-.48, .65, -.24] if I do R> cross(v1, v2), I get .94. Huh? Thanks for all your help, again. W
2012 Sep 26
3
Broken Links on http://www.r-project.org
I was not sure who I should contact about this, so I am posting this here. There are a few broken links on the R website. 1) http://www.r-project.org/search.html -> link to the Nabble R Forum. I belive the correct/new URL should be: http://r.789695.n4.nabble.com/ 2) http://www.r-project.org/other-docs.html -> link to "Auswertung ?kologischer Daten". Not sure if there is a new
2020 Apr 30
3
Use of MathJax (or something similar) in .Rd files
Hello All, I am wondering if there has ever been any discussion/consideration given to incorporating MathJax (or something similar) into R for rendering equations in .Rd files. I know that equations are rendered beautifully in the pdf manuals, but I suspect the majority of users primarily look at the html help files when using R. While I am comfortable reading something like "B_x(a,b) =
2010 Jul 02
1
metafor and meta-analysis at arm-level
Hi, I have been looking for an R package which allowed to do meta-analysis (both pairwise and network/mixed-treatment) at arm-level rather than at trial-level, the latter being the common way in which meta-analysis is done. By arm-level meta-analysis I mean one that accounts for data provided at the level of the individual arms of each trial and that does not simply derive the difference between
2015 May 13
4
CRAN check for package on Sparc Solaris
Dear All, The metafor package currently fails CRAN checks on Sparc Solaris: http://cran.r-project.org/web/checks/check_results_metafor.html The problem is probably due to an unintended (= stupid) use of identical() in a couple tests. I have changed that to more appropriate tests using all.equal(). However, before I resubmit the package to CRAN, I would really like to make sure that the updated
2013 Dec 12
1
refline in forest() {metafor}
Hello all, I am using forest.rma to plot a random effects model meta-analysis. I noticed that refline sets a vertical line indicating the null hypothesis. Is there a way to draw another vertical line, possibly dashed, centered on the summary estimate? Prof. Viechtbauer, if you happen to read this, I'd like to thank you for making an excellent package. I have been using the metafor package
2020 May 12
4
S3 method dispatch for methods in local environments
Dear All, In R 3.6.3 (and earlier), method dispatch used to work for methods stored in local environments that are attached to the search path. For example: myfun <- function(y) { out <- list(y=y) class(out) <- "myclass" return(out) } print.myclass <- function(x, ...) print(formatC(x$y, format="f", digits=5)) myfun(1:4) # prints: [1]
2017 Oct 09
2
Discourage the weights= option of lm with summarized data
Yes. Thank you; I should have quoted it. I suggest to remove this text or to add the word "not" at the beginning. Arie On Sun, Oct 8, 2017 at 4:38 PM, Viechtbauer Wolfgang (SP) <wolfgang.viechtbauer at maastrichtuniversity.nl> wrote: > Ah, I think you are referring to this part from ?lm: > > "(including the case that there are w_i observations equal to y_i and
2011 Aug 24
3
Efficient way to Calculate the squared distances for a set of vectors to a fixed vector
I am pretty new to R. So this may be an easy question for most of you. ? I would like to calculate the squared distances of a large set (let's say 20000) of vectors (let's say dimension of 5) to a fixed vector. ? Say I have a data frame MY_VECTORS with 20000 rows and 5 columns, and one 5x1 vector y. I would like to efficiently calculate the squared distances?between each of the 20000
2017 Oct 12
4
Discourage the weights= option of lm with summarized data
OK. We have now three suggestions to repair the text: - remove the text - add "not" at the beginning of the text - add at the end of the text a warning; something like: "Note that in this case the standard estimates of the parameters are in general not correct, and hence also the t values and the p value. Also the number of degrees of freedom is not correct. (The parameter
2002 Oct 31
3
Changing pch spacing
Hello R-Helpers, plot(x, y, type="b", pch="1") plots x vs. y with both a line and the symbol "1" but how do I change the "spacing" of the symbol being plotted. In other words, I don't want to plot the "1" at every data point, but only at every kth point (things get too cluttered when there are many data points). Thanks in advance! --
2017 Oct 08
2
Discourage the weights= option of lm with summarized data
Indeed: Using 'weights' is not meant to indicate that the same observation is repeated 'n' times. As I showed, this gives erroneous results. Hence I suggested that it is discouraged rather than encouraged in the Details section of lm in the Reference manual. Arie ---Original Message----- On Sat, 7 Oct 2017, wolfgang.viechtbauer at maastrichtuniversity.nl wrote: Using
2017 Oct 20
2
Font Size for View()
Hello, I am using Ubuntu 16.04, using the default (Unity) window manager. The font size using View() is way too small on a high dpi monitor. I already use scaling, but View() doesn't seem affected by that. Any suggestions for how I could tweak the font size here? Best, Wolfgang
2008 Feb 29
1
Optional data argument for a function
Dear All, I am working on a function that has an optional data argument, just like lm(). If the user sets the data argument equal to some dataframe, then the function should look inside the dataframe for the variables given to other arguments, otherwise the variables should be accessible from what I believe is called the parent frame from which the function was called. I looked at the source code
2003 Feb 02
3
Finding Missing Data Patterns
Dear R-Helpers, I have a large data matrix, which contains missing data. The matrix looks something like this: 1) X X X X X X NA NA NA 2) NA NA NA NA X X X X X 3) NA NA X X X X NA NA NA 4) X X X X X X X X X 5) X X NA NA X NA NA NA NA and so on. Notice that the first row starts with complete data but ends with missing. The second row starts with missing, but the rest is
2007 Mar 12
4
meta-regression, MiMa function, and R-squared
Dear Wolfgang Viechtbauer and list members: I have discovered your "MiMa" function for fitting meta-analytic mixed-effects models through an earlier discussion on this list. I think it is extremely useful and fills an important gap. In particular, since it is programmed so transparently, it is easy to adapt it for one's own needs. (For example, I have found it easy to identify