similar to: R-alpha typo in ?replicate ?

Displaying 20 results from an estimated 40000 matches similar to: "R-alpha typo in ?replicate ?"

2006 Feb 17
2
creating 3-way tables for mantelhaen.test
Hi R users I have serveral binary variables (e.g., X1, X2, X3, X4, X5, X,6, and X7) and one continuous variable (e.g., Y1). I combined these variables using data.frame() mydata <- data.frame(X1,X2,X3,X4,X5,X6,X7,Y1) after that, I sorted this data.frame rank.by.Y1<-order(mydata[,8]) sorted.mydata<-mydata[rank.by.Y1,] after that, I replaced Y1's values with values ranging from 1
2009 Jul 29
1
lrm-function: Interpretation and error message
I have a set of data that is not normally distributed and for which I need to build a model. So, I tried the lrm function from the design-package. The first run went well, and I got the following results: Wald Statistics Response: RVCL2PROC.mott Factor Chi-Square d.f. P TTV.mott (Factor+Higher Order Factors) 69.01 4
2013 Aug 17
1
model.frame(), model.matrix(), and derived predictor variables
Dear r-developers: I am struggling with some fundamental aspects of model.frame(). Conceptually, I think of a flow from data -> model.frame() -> model.matrix; the data contain _input variables_, while model.matrix contains _predictor variables_: data have been transformed, splines and polynomials have been expanded into their corresponding multi-dimensional bases, and factors have been
1997 Dec 05
1
R-alpha: is.vector of one-dimensional array
maybe we've already diskussed this before, but Kurt and I can't remember ... is.vector() of an one-dimensional array returns FALSE. this is also the behavior of Splus, but totally counter-intuitive for me ... IMO an array of dimension 1 is exactly the definition of a vector ... it also breaks our current plot.factor, which is simply a barplot(table(x)) table() returns an
2024 Feb 08
1
Is simplify2array working for dimension > 2?
Jean-Claude: Well, here's my "explanation". Caveat emptor! Note that: "simplify2array() is the utility called from sapply() when simplify is not false" and > sapply(a, I, simplify = "array") [,1] [,2] [1,] list,2 list,2 [2,] list,2 list,2 So it seems that simplify2array() is not intended to operate in the way that you expected, i.e. that recursive
2018 Apr 21
0
Error : 'start' contains NA values when fitting frank copula
>>>>> Soumen Banerjee <soumen08 at gmail.com> >>>>> on Sat, 21 Apr 2018 17:22:56 +0800 writes: > Hello! I am trying to fit a copula to some data in R and > I get the error mentioned above. This is the code for a > reproducible example - (not really reproducible: You did not set the random seed, so the data is different every time;
2010 Jan 15
3
optimization problem
Dear R-experts, this is not a direct R-problem but I hope you can help me anyway. I would like to minimize || PG-I || over P, where P is a p x p permutation matrix (obtained by permuting the rows and/or columns of the identity matrix), G is a given p x p matrix with full rank and I the identity matrix. ||.|| is the frobenius norm. Does anyone know an algorithm to solve such a problem? And if
2018 Mar 19
1
trivial typo in man/pretty.Rd
patch against recent SVN ... as far as I can tell this trivial typo has been there for 20 years: https://github.com/wch/r-source/blame/ba7920a99fb2fb62b89e404e65f8b132ed4c150a/src/library/base/man/pretty.Rd =================================================================== --- pretty.Rd (revision 74426) +++ pretty.Rd (working copy) @@ -21,8 +21,8 @@ \item{min.n}{nonnegative integer giving
2017 Aug 24
1
[patch] Fix typo in 'rank' documentation
I noticed a typo in the documentation for the 'rank' function. Specifically, it describes ties.method="first" and contrasts with... ties.method="first", when it should be ties.method="last". Thanks, Jon -------------- next part -------------- Index: src/library/base/man/rank.Rd =================================================================== ---
2018 Jan 04
3
silent recycling in logical indexing
Hmm. Chuck: I don't see how this example represents incomplete/incommensurate recycling. Doesn't TRUE replicate from length-1 to length-3 in this case (mat[c(TRUE,FALSE),2] would be an example of incomplete recycling)? William: clever, but maybe too clever unless you really need the speed? (The clever way is 8 times faster in the following case ...) x <- rep(1,1e6)
2011 Feb 13
1
Should leading and trailing spaces between backticks be preserved?
Hi folks, Yesterday I raised an issue about inconsistent preservation of whitespace<http://www.freewisdom.org/projects/python-markdown/Tickets/000087>in Python-Markdown. >>> import markdown >>> md = markdown.Markdown() >>> md.convert('Added `>>> ` to signify user input.') u'<p>Added
2006 May 18
3
Two-Dimensional Hashes through links?
I''m really hitting a wall here. My program has a search engine, returns a list of results. I am using a two-dimensional hash to pass the form data back to my controller. (i.e. params[:job] => {:description => "xxx", :location => "xxx", company => "xxx"}) I use that Job object to search my database, and then wait for user input. Now when the
2004 Dec 08
2
similarity matrix conversion to dissimilarity
I have a matrix of similarity scores that I want to convert into a matrix of dissimilarity scores so that I can apply some clustering methods to the data. That is, high values in my matrix signify similarity and low values (zero being the lowest) signify no similarity. What functions/options in R or its packages are available for making this kind of transformation of a matrix?
2013 Nov 07
1
problem with interaction in lmer even after creating an "interaction variable"
Dear all, I have a problem with interactions in lmer. I have 2 factors (garden and gebiet) which interact, plus one other variable (home), dataframe arr. When I put: / lmer (biomass ~ home + garden:gebiet + ( 1|Block), data = arr)/ it writes: /Error in lme4::lFormula(formula = biomass ~ home + garden:gebiet + (1 | : rank of X = 28 < ncol(X) = 30/ In the lmer help I found out that if not
2010 Nov 22
3
Fast Two-Dimensional Optimization
Dear R Helpers, I have attempted "optim" function to solve a two-dimensional optimization problem. It took around 25 second to complete the procedure. However, I want to reduce the computation time: less than 7 second. Is there any optimization function in R which is very rapid? Best Regards, Wonsang ----- Wonsang You Leibniz Institute for Neurobiology -- View this message in
2007 May 21
3
an array of matrices
I'd like to have a three dimensional array of matrices. I thought I could construct a five dimensional array to have the three dimensional array of matrices. However, not all of the matrices in the array have the same dimensions, which seems to mean I can't use a five dimensional array. What I'd like is this: A = matrix(1:4,2,2) B = matrix(1:25,5,5) C = matrix(1,3,3) D =
2005 Jan 21
6
dim vs length for vectors
Hi all, I'm not sure if this is a feature or a bug (and I did read the FAQ and the posting guide, but am still not sure). Some of my students have been complaining and I thought I just might ask: Let K be a vector of length k. If one types dim(K), you get NULL rather than [1] k. Is this logical? Here's the way I explain it (and maybe someone can provide a more accurate
2007 Jan 19
1
hiccup in apply?
Hello, I don't understand the behavior of apply() on the data frame below. test <- structure(list(Date = structure(c(13361, 13361, 13361, 13361, 13361, 13361, 13361, 13361, 13362, 13362, 13362, 13362, 13362, 13362, 13362, 13362, 13363, 13363, 13363, 13363, 13363, 13363, 13363, 13363, 13364, 13364, 13364, 13364, 13364, 13364, 13364, 13364, 13365, 13365, 13365, 13365, 13365, 13365, 13365,
2001 Sep 06
2
Array as time series?
Dear R-helpers, I have 4-dimensional atmospheric data (x,y,z,t), which I want to analyse on spatio-temporal diversities. As far as I understand there only exists the possibility to construct time series as two-dimensional matrices (mts). For the moment, I hold it in different objects: 1. a four-dimensional array for the spatial related analyses 2. a two-dimensional mts timeserie, which was
2010 Sep 08
2
Drop single-dimensional array
Hi Simon, thank you for the concise reply. Do you mean the reported behavior of drop() is not a bug? It looks like a borderline bug to me (see below), but I'm not the judge of that. If this is the intended behavior and serves an actual purpose, then that could be explicitly documented in a \note{} on the help page. Such a note would slightly reduce the surprise of users running into this