similar to: how to store a vector of vectors

Displaying 20 results from an estimated 1000 matches similar to: "how to store a vector of vectors"

2011 Mar 04
2
Creating a .png with just an expression() in it
Hey, I'm trying to create an image file with the results of a regression analysis. In TeX, the line would be something like: $ size = 0.34 + 4.3 var_1 $ Can I create a plot window with just this line in it? I tried playing around with plot.new() or dev.new(), but didn't really find something that worked. Thanks in advance, Alex -- alexx at alexx-fett:~$ vi .emacs
2011 Mar 13
2
Setting the language of Rs error messages
Hi, My R has been installed on a Ubuntu linux computer in Germany. The error messages I get are in German, for example: In min(magnitudes) : kein nicht-fehlendes Argument f?r min; gebe Inf zur?ck I would like those to be displayed in English, for pasting them into google. I tried searching for "R language", which brings me a ton of results for.. well, the R language :) "R german
2010 Dec 03
1
Passing par()-parameters to many plot()s in a function
Hi, I am implementing a function which generates about 10 .pdf plots in the current directory. I need the graphic to fit into a LaTeX-Presentation-slide, so the outer margin should be removed (this is the way to do it, right?): I am having trouble finding out where to put the par command(s). Is one enough or should I put them before and after /every/ plot() command? This is how I tried to do
2011 Mar 16
5
R² for non-linear model
Dear List, how can I obtain the value of r suqared for a non-linear model? For linear models it can be found in the summary() of the model but for non-linear models I just don't know. Please help! Anna
2008 Dec 09
2
Better way to find distances between points in a set?
I was playing around a bit to see how I could find the two points in a set of points (or ordered pairs) furthest from each other. Here's what I did: 1) created a Nrow by 2col matrix, so each row contains an x,y coordinate pair. 2) fed the matrix to a nested mapply (cv is my matrix): mapply(function(k,l) mapply(function(x,y,a,b) +
2006 Oct 11
1
panel-dependent distribution in qqmath
In qqmath, how would one go about having 'distribution' change with panel.number? I've tried set.seed(1) mydata <- data.frame(ind = factor(rep(2:4, each = 100))) mydata$val <- rt(300, df=rep(2:4, each = 100)) plot<-qqmath(~ val | ind, layout=c(3,1), data = mydata, prepanel = function(x, distribution, ...) {
2001 Oct 01
1
dataframe manipulation
Hi, a couple of questions on manipulating a dataframe: 1) Without using a for loop (often inefficient, as i understand, in R), is it possible to split a dataframe into a list of dataframes with the number of *columns* in each (child)dataframe specified by the elements of a numeric vector? for example: dataframe 10 20 30 40 24 90 34 12 12 44 67 77 split using the vector c(3, 1) results in 2
1999 Apr 07
1
library
I also have several packages in my RW0633 in Windoze and I would like to keep them in one place when I update the R system. Brian say to modify Rprofile to ..lib.loc <- c("c:/MyR/library",.Library) now Rprofile has a line like .lib.loc <- unique(c(unlist(strsplit(getenv("RLIBS"),":")),.Library) Sorry to be dense but where should I put the
2005 Jan 13
1
how to use solve.QP
At the risk of ridicule for my deficient linear algebra skills, I ask for help using the solve.QP function to do portfolio optimization. I am trying to following a textbook example and need help converting the problem into the format required by solve.QP. Below is my sample code if anyone is willing to go through it. This problem will not solve because it is not set up properly. I hope I
2005 Apr 05
4
lists: removing elements, iterating over elements,
I'm writing R code to calculate Hierarchical Social Entropy, a diversity index that Tucker Balch proposed. One article on this was published in Autonomous Robots in 2000. You can find that and others through his web page at Georgia Tech. http://www.cc.gatech.edu/~tucker/index2.html While I work on this, I realize (again) that I'm a C programmer masquerading in R, and its really
2007 Sep 03
2
The quadprog package
Hi everybody, I'm using Windows XP Prof, R 2.5.1 and a Pentium 4 Processor. Now, I want to solve a quadratic optimization program (Portfolio Selection) with the quadprog package I want to minimize (\omega'%*%\Sigma%*%\omega) Subject to (1) \iota' %*% \omega = 1 (full investment) (2) R'%*%\omega = \mu (predefined expectation value) (3) \omega \ge 0 (no short sales). Where
2004 Jan 30
1
How to create own distance measure in cluster ?
Hi everyone, I want to create my own distance measure, other than 'euclidean' or 'manhatan', to use in cluster pckgs. To do this I think that I need to change dist(), in mva pckg, or daisy(), in cluster pckg. (or is there a cleaver way ?) But this functions are in fact things like: .Fortran( "daisy", ... ) or .C("dist",...). I tried unsuccessfully to find
2009 Feb 16
2
solve.QP with box and equality constraints
Dear list, I am trying to follow an example that estimates a 2x2 markov transition matrix across several periods from aggregate data using restricted least squares. I seem to be making headway using solve.QP(quadprog) as the unrestricted solution matches the example I am following, and I can specify simple equality and inequality constraints. However, I cannot correctly specify a constraint
2008 Aug 05
1
Fix for nls bug???
Hi All, I've hit a problem using nls. I think it may be a restriction in the applicability of nls and I may have found a fix, but I've been wrong before. This example is simplified to the essentials. My real application is much more complicated. Take a function of matrix 'x' with additional arguments: matrix 'aMat' whose values are _not_ to be determined by nls vector
2003 Jun 02
1
Help with factorized argument in solve.QP
Hi I'm having problems getting the "factorized" argument in solve.QP (part of the quadprog library) to work as expected. The helpfile states that when the factorized argument is set to TRUE, then the function requires the inverse of a square-root factor of the Hessian instead of the Hessian itself. That is, when factorized=TRUE, the Dmat argument should be a matrix R^(-1), such
2008 Mar 03
2
Constrained regression
Dear list members, I am trying to get information on how to fit a linear regression with constrained parameters. Specifically, I have 8 predictors , their coeffiecients should all be non-negative and add up to 1. I understand it is a quadratic programming problem but I have no experience in the subject. I searched the archives but the results were inconclusive. Could someone provide suggestions
2006 Mar 18
1
listing nodes in paths
Hi All, I have the following adjacency matrix for a directed graph: [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [1,] 0 0 0 0 0 0 0 0 [2,] 0 0 0 0 0 0 0 0 [3,] 1 0 0 0 0 0 0 0 [4,] 0 0 1 0 0 0 0 0 [5,] 0 0 1 0 0 0 0 0 [6,] 1 1 0 0 0 0 0 0 [7,] 0 0
2023 Feb 19
2
R: determine if `suppressMessages()` has been invoked
Awesome, this gets the job done. To answer your question: When using C or C++ via Rinside or within a package, those functions do not listen to suppressMessages, e.g. `Rprintf` keeps printing to the console. Since it's common to use wrapper functions in R anyway, they can run `are_messages_suppressed` and pass the information on to an explicit `verbose` argument of the C / C++ function.
2011 May 11
1
Problem with constrained optimization with maxBFGS
Dear all, I need to maximize the v: v= D' W D D is a column vector ( n , 1) W is a given matrix (n, n) subject to: sum D= 1 (BTW, n is less than 300) I´ve tried to use maxBFGS, as follows: ##################################### objectiveFunction<-function(x) { return(t(D)%*%W%*%D) } Amat<-diag(nrow(D)) Amat<-rbind((rep(-1, nrow(D))), Amat) bvec<-matrix( c(0), nrow(D)+1,
2007 Jul 02
3
Both archs version rpm are installed during update?
During last update packets pidgin and libpurple were updated while "yum update"-ing Is it a common and normal thing that both x86_64 and i386 arch rpms are installed during update? This not the first time. -- Cheers, Alexx mailto:alexx187 at gmail.com