Displaying 20 results from an estimated 100 matches similar to: "Q: combine 2 data frames with missing values"
2007 Aug 30
2
Q: Mean, median and confidence intervals with functions "summary" & "boxplot.stats"
Een ingesloten tekst met niet-gespecificeerde tekenset is
van het bericht gescrubt ...
Naam: niet beschikbaar
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070830/e557d2a7/attachment.ksh
2010 Jun 22
3
lapply and boxplots with variable names
Hi all,
I have a dataset with several variables, each of which is a separate
column. For each variable, I want to produce a boxplot and include the
name of the variable (ie, column name) on each plot.
I have included a sample dataset below. Can someone tell me where I am
going wrong?
Thank you for your help,
Shawn Morrison
# Generate a sample dataset
var1 = rnorm(1000)
var2 = rnorm(1000)
2007 Aug 22
1
How do i print a "main title" on a win.graph with several plots?
Een ingesloten tekst met niet-gespecificeerde tekenset is
van het bericht gescrubt ...
Naam: niet beschikbaar
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20070822/02fe6e95/attachment.pl
2006 May 19
1
UseMethod infelicity
If I do
> example(lm)
...
> mycoef <- function(object, ...) UseMethod("coef", object)
> mycoef(lm.D9)
Error in mycoef(lm.D9) : no applicable method for "coef"
which is pretty surprising, as coef has a default method.
After a bit of digging, this comes from do_usemethod having
defenv = environment where the generic was defined */
defenv =
2009 Jun 29
2
How to use "subset" in lm function
Hi, I'm using R to do a time series analysis. In the model, I use the lags
of some variables. such the lags of the variables have different length, I
just can't use them directly in the lm function. Intuitively, I feel that
"subset" might be useful, but I do not know how to use it. Anyone can give
me an example syntax? Thanks.
Harry
[[alternative HTML version deleted]]
2012 May 05
2
No error message no display output
Hi all,
I´m re-starting (as my name indicates) my little knowlegde of CRAN R.
I made this function time before but I don´t know where is the error
because nothing appears as an error but the histogram plot doesn´t appear.
Should I install some special library to run sapply?
pru<-function(){
randz<-matrix(rnorm(200000),100,2000)
H<-matrix(0,100,2000)
for (j in 2:2000){
for (i in
2002 Oct 09
5
polynomial
Any better (more efficient, built-in) ideas for computing
coef[1]+coef[2]*x+coef[3]*x^2+ ...
than
polynom <- function(coef,x) {
n <- length(coef)
sum(coef*apply(matrix(c(rep(x,n),seq(0,n-1)),ncol=2),1,function(z)z[1]^z[2]))
}
?
Ben
--
318 Carr Hall bolker at zoo.ufl.edu
Zoology Department, University of Florida http://www.zoo.ufl.edu/bolker
2012 May 10
1
Error t value matrix
Hi all,
I want to make the following:
I want to run a linear regression on each column of a matrix "estima" on
the correspondent column on the matrix "estima2".
You see I want to regress estima[,1] on estima2[,1] this way to all
columns....
At the same time I want to make a regression adding each time a new
observation.
You see, the first regression will regress only one
2012 Dec 08
3
Mean-Centering Question
Hello,
I'm trying to create a custom function that "mean-centers" data and can be
applied across many columns.
Here is an example dataset, which is similar to my dataset:
*Location,TimePeriod,Units,AveragePrice*
Los Angeles,5/1/11,61,5.42
Los Angeles,5/8/11,49,4.69
Los Angeles,5/15/11,40,5.05
New York,5/1/11,259,6.4
New York,5/8/11,187,5.3
New York,5/15/11,177,5.7
2009 Jun 25
1
lm
Hi all,
I want to make multiple least squares estimation on two matrix (without
intercept)
imagine matrix "a" and matrix "b", I want to "regress" each colum on matrix
"a" (dependent variable) on each column of matrix b, I mean, regress first
colum on a to first column on b. Second column on a to second column on b.
Imagine "a" and "b"
2009 Aug 19
1
dovecot/sieve current date
Hi,
Is there a way in sieve to get the current date, preferably in YYYYMMDD
format? To what I've found it's hard to achieve. I have tried including
a :global sieve script in which I would set the current date to a
certain variable and overwrite this included script every day. But to my
disappointement variables set in an included script do not exist in the
original script...
In fact what
2012 Apr 26
1
looking for an add-in for daily data analysis
Hi all
I am looking for an add-in. I am currently working on something and I use
daily data of closing stock prices. As not all companies are traded daily
(e.g. on monday, then on thursday etc) at the stock exchange, there is
satistically a problem. There are some papers which explain the approach to
handle infrequent trading of a stock or non synchronous data and beta
estimation (Dimson, 1979;
2011 Jun 29
1
median time period
Hello List
I'm trying to calculate the median period (in months) of a set of time intervals (between two interventions).
I have been playing with the lubridate package to create the intervals but I can't think of the right approach to get the median timeperiod.
Toy code:
library(lubridate)
test <- c('08-04-22', '08-07-28', '09-03-02', '09-03-03',
2004 Jun 01
15
Feedback needed! FindMe/FollowMe Feature Spec.
Hello all,
I'm going to tackle learning C this week, and start writing my first *
add-on/contribution; assuming it's actually worthy of contributing once
it's done.. I think I've chosen a hefty project for my first go round
here...
I'd like to get some feedback from everyone on a FindMe/FollowMe spec
I've put together. Before you read on, let me say, I don't want
2007 Aug 21
2
Partial comparison in string vector
Hi list members
I have a vector of strings
x=c("w","ex","ee")
And I want to get a logical vector showing the positions where my search
string "e" matches the elements partially, i.e. is at least the left-hand
part of the target strings, i.e. I want to get a vector FALSE TRUE TRUE.
Any ideas?
Thanks
Steve Powell
proMENTE social research
research |
2005 Sep 29
2
Hardware Specifications
Does anyone know where i can find out how powerful a machine has to be to
handle a certain amount of call volume?
Eg, 2Ghz is enough processing power to maintain 100 calls at a time.
4Ghz is engouh to process 250 calls etc etc.
Thanks
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2016 Apr 30
0
Unexpected scores from weighted PCA with svyprcomp()
Hello!
I'd like to create an assets-based economic indicator using data from a
national household survey. The economic indicator is to be the first
principal component from a principal components analysis, which (given
the source of the data) I believe should take in consideration the
sampling weights of the observations. After running the PCA with
svyprcomp(), from the survey package, I
2005 Apr 08
1
subset arg lmList
I'm having trouble understanding how functions in the subset argument for
lmList search for the objects they need. This trivial example produces
"Error in rownames(fakedf) : Object "fakedf" not found":
library(nlme)
fitbyID <- function() {
fakedf <- data.frame(ID = gl(5, 10, 50),
A = sample(1:100, 50),
B = rnorm(50))
2011 Jul 07
3
coefficients lm of data.frame
Hi,
I've a data frame like this:
> as.data.frame(cbind(rnorm(1:12),rnorm(1:12)))
V1 V2
1 -1.30849402 -0.52094136
2 0.96157302 0.76217871
3 -0.44223351 -1.72630871
4 -0.10432438 -1.04732942
5 -1.38748914 0.95877311
6 -0.63965975 0.65494811
7 -0.24058318 0.19496830
8 -0.11172988 1.01680655
9 0.08065333 0.22168589
10 0.25196536 0.84619914
11
2006 Jul 28
1
Calculate x-values from a spline
Hello,
I calculate splines from messured points(x,y) of an unknown function f(x).
e.g.
x <- c(0.004115, 0.012345, 0.037037, 0.111110, 0.333330, 1.000000)
y <- c(37, 50, 45, 60, 50, 66)
w <- c(0.8540541, 0.8320000, 0.8822222, 0.7983333, 0.8220000, 0.8151515) as
weights
f <- smooth.spline(x,y,w)
Now I have y-values and want to calculate the x-value(s) from this spline.
There is no