i am trying to install xml2 from CRAN, and it is throwing an error
that it cannot find the libxml2 library configuration.
The thing is that pkg-config seems to be set up correctly:
$ echo $PKG_CONFIG_PATH
:/usr/local/opt/libxml2/lib/pkgconfig:/usr/local/opt/libxml2/lib/pkgconfig
$ pkg-config --c
Consider the data.frame:
df <- data.frame(A = c(1,4,2,6,7,3,6), B= c(3,7,2,7,3,5,4), C =
c(2,7,5,2,7,4,5), index = c("A","B","A","C","B","B","C"))
I want to select the column specified in 'index' for every row of 'df', to
get
goal <- c(1, 7, 2, 2, 3, 5, 5)
This sounds a lot like the indexing-by
You haven't said how the function you're optimizing relates to your data.
In the special case that you happen to be using nleqslv to maximize a
log-likelihood function (a special case of which is least squares fitting),
you can get an approximation to the standard error using the Jacobian
matrix th
Thanks for providing a reproducible example.
Using the plyr package you can write your whole computation more compactly:
library(plyr)
library(caTools) #for trapz
auc <- ddply(lab.samples, .(challenge, subid),
function(df) {
df$time <- c(0, seq(60,by=10, len=nrow(df)-1))
summari
http://cran.r-project.org/doc/manuals/R-lang.html#Indexing-matrices-and-arrays
matrix[cbind(iRows, iCols)] <- values
Peter
On Mon, Mar 19, 2012 at 2:07 PM, David Stevens wrote:
> I'm a bit clumsy about many things in R. Here's my problem. I'm trying to
> build a square sparse matrix and populat
I'm not sure I follow exactly what group of regression models you want to
create, but a good first step might be to use reshape so that each party's
vote share goes on a different row and the vote shares are all in the same
column. Then you can use plyr grouping on tipo and party to make your
model
dump.frames() or retrace() or
some equivalent points me to the right spot?
Peter Meilstrup
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide ht
On Tue, Feb 14, 2012 at 2:31 PM, William Dunlap wrote:
> If you must repeatedly append rows to a data.frame,
> try making the dataset you are filling in a bunch
> of independent vectors, perhaps in a new environment
> to keep things organized.
One complication is I don't know the names of the c
I'm reading a file and using the file to populate a data frame. The way the
file is laid out, I need to fill in the data frame one row at a time.
When I start reading my file, I don't know how many rows I will need. It's
on the order of a million.
Being mindful of the time expense of reallocation
The setup: I have a data frame where one column is in list mode, and
each entry contains a vector of varying length.
I want to expand this into a data frame with one row for each member
of the list-mode column (the other values being replicated)
For example, an example input and the desired output
> up the issue to pgfSweave developers:
> https://github.com/cameronbracken/pgfSweave/issues/34
>
> Regards,
> Yihui
> --
> Yihui Xie
> Phone: 515-294-2465 Web: http://yihui.name
> Department of Statistics, Iowa State University
> 2215 Snedecor Hall, Ames, IA
>
>
t; Yihui Xie
> Phone: 515-294-2465 Web: http://yihui.name
> Department of Statistics, Iowa State University
> 2215 Snedecor Hall, Ames, IA
>
>
>
> On Thu, Oct 13, 2011 at 7:01 PM, Peter Meilstrup
> wrote:
>> I'm trying to get pgfSweave up and running. Hopefull
I'm trying to get pgfSweave up and running. Hopefully I can get it
working from within LyX, but first I'm just trying to get the simplest
possible thing (compiling one of the example files in the pgfSweave
package) to work. I'm using the example that comes in the pgfSweave
package unmodified, but f
I would like to write a block of code that runs when a script is being
run from Rscript, but not to run if the same file is being source()d,
or submitted via ESS, etc. As a gloss I would like to write a file
that looks somewhat like:
#!/usr/bin/env Rscript
my.func <- function(...) {
On Sep 2, 2009, at 8:47 PM, Richard M. Heiberger wrote:
Almost certainly, abind is what you need for the task.
Please dput() your matlab objects and send that to the list.
That will make your example reproducible.
Rich
From the documentation and behavior, abind seems to really not want
to
I'm trying to massage some data from Matlab into R. The matlab file
has a "struct array" which when imported into R using the R.matlab
package, becomes an R list with 3+ dimensions, the first of which
corresponds to the structure fields, with corresponding row names, and
the second and thi
I'm trying to move from Matlab to R, and I'm stuck even getting
started. This sounds to me like the dumbest question in the world
but... how does one put R source code in files? Over the last three
days I've gone front to back through the Introduction to R and the R
Language Definition, and while I
17 matches
Mail list logo