On May 28, 2013, at 08:06 , Barry King wrote:
> I have an Excel worksheet with 20 rows. Using XLConnect I successfully
> read the data into 'indata'. In order to sort it on the 'Item' column
> and the 'Price_Per_Item' column I submit:
>
> index <- with(indata, order(Item, Price_Per_Item))
> so
I have an Excel worksheet with 20 rows. Using XLConnect I successfully
read the data into 'indata'. In order to sort it on the 'Item' column
and the 'Price_Per_Item' column I submit:
index <- with(indata, order(Item, Price_Per_Item))
sortedData <- indata[index, ]
The above works fine but now I
On 28/05/2013 06:54, David Winsemius wrote:
On May 27, 2013, at 7:59 PM, meng wrote:
Hi all:
As to the polr {MASS} function, how to find out p values of every
parameter?
From the example of R help:
house.plr <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data =
housing)
summary(house.pl
On May 27, 2013, at 7:59 PM, meng wrote:
Hi all:
As to the polr {MASS} function, how to find out p values of every
parameter?
From the example of R help:
house.plr <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data =
housing)
summary(house.plr)
How to find out the p values of hou
Hi all:
As to the polr {MASS} function, how to find out p values of every parameter?
>From the example of R help:
house.plr <- polr(Sat ~ Infl + Type + Cont, weights = Freq, data = housing)
summary(house.plr)
How to find out the p values of house.plr?
Many thanks.
Best.
[[alternat
library(reshape2)
dcast(Dat, X1 ~X2, value.var = "X3")
X1 1 2 3 4
1 A 11 12 13 14
2 B 15 16 17 18
3 C 19 20 21 NA
or use ? reshape
HTH
Duncan
Duncan Mackay
Department of Agronomy and Soil Science
University of New England
Armidale NSW 2351
Email: home: mac...@northnet.com.au
At 1
Hello!
I'm interested to fit parameters (to data) in a grid-based (individual)
model. If I understood well, simecol library has the fitOdeModel function
but it is only suited to odeModels (differential equation). Alternatively,
FME package has several functions able to perform this procedure but a
Hi,
Try either:
set.seed(28)
stats1<- as.data.frame(matrix(rnorm(5*1),ncol=5))
pdf(paste("test",1,".pdf",sep=""))
par(mfrow=c(2,1))
lst1<- lapply(names(stats1),function(i)
{hist(stats1[,i],100,col="lightblue",main=paste0("Histogram of ",i),xlab=i
);qqnorm(stats1[,i])})
dev.off()
#or
pdf(p
res1<- xtabs(X3~X1+X2,data=Dat)
res1
# X2
#X1 1 2 3 4
# A 11 12 13 14
# B 15 16 17 18
# C 19 20 21 0
library(reshape2)
dcast(Dat,X1~X2,value.var="X3")
# X1 1 2 3 4
#1 A 11 12 13 14
#2 B 15 16 17 18
#3 C 19 20 21 NA
A.K.
Hello again, let say I have following data-frame:
> Dat
Hello again, let say I have following data-frame:
> Dat <- data.frame(c(rep(c("A", "B"), each = 4), "C", "C", "C"),
c(rep(1:4, 2), 1, 2, 3), 11:21)
> colnames(Dat) <- c("X1", "X2", "X3")
> Dat
X1 X2 X3
1 A 1 11
2 A 2 12
3 A 3 13
4 A 4 14
5 B 1 15
6 B 2 16
7 B 3 17
8 B 4
On 05/28/2013 12:22 AM, Adelabu Ahmmed wrote:
Dear Sir/Ma,
I Adelabu.A.A, one of the R-users from Nigeria. I have a data-set of claims
paid, premium for individual life-insurance policy holder but not in triangle
form. how can i running stochastics chainladder in r on it.
please help
I am trying to use the package Bayes Logit and I keep getting this error
message.
chol2inv(chol(P1.j)) :
error in evaluating the argument 'x' in selecting a method for function
'chol2inv': Error in chol.default(P1.j) :
the leading minor of order 5 is not positive definite
I can't see why thi
On 27-05-2013, at 21:57, ivo welch wrote:
>
> Gentlemans as 274 algorithm allows weights, so adding an obs with a weight of
> -1 would do the trick of removing obs, too.
>
> This may be a good job for hadwell wickhams c code interface.
Searching for "Gentlemans as 274 algorithm" with google
Gentlemans as 274 algorithm allows weights, so adding an obs with a weight
of -1 would do the trick of removing obs, too.
This may be a good job for hadwell wickhams c code interface.
On May 27, 2013 12:47 PM, "Berend Hasselman" wrote:
>
> On 27-05-2013, at 17:12, ivo welch wrote:
>
> > dear R
Hi,
Try this:
dat1<- read.csv("dat7.csv",header=TRUE,stringsAsFactors=FALSE,sep="\t")
dat.bru<- dat1[!is.na(dat1$evnmt_brutal),]
fun1<- function(dat){
lst1<- split(dat,dat$patient_id)
lst2<- lapply(lst1,function(x) x[cumsum(x$evnmt_brutal==0)>0,])
lst3<- lapply(lst2,function(x)
On 27-05-2013, at 17:12, ivo welch wrote:
> dear R experts---I would like to update OLS regressions with new
> observations on the front of the data, and delete some old
> observations from the rear. my goal is to have a "flexible"
> moving-window regression, with a minimum number of observatio
The essential trick here is the Sherman-Morrison-Woodbury formula.
My quantreg package has a lm.fit.recursive function that implements
a fortran version for adding observations, but like biglm I don't remove
observations at the other end either.
Roger Koenker
rkoen...@illinois.edu
On May 27,
Look at the biglm package. It does 2 of the 3 things that you asked for:
Construct an initial lm fit and add a new block of data to update that
fit. It does not remove data, but you may be able to look at the code and
figure out a way to modify it to do the final piece.
On Mon, May 27, 2013 at
Hi,
Try this:
dat2<-dat[order(as.numeric(gsub("preV(\\d+).*","\\1",colnames(dat]
dat2
# preV15A1b preV59A1b preV1001A1b preV2032A1b preV2035A1b
#1 0.57 0.05 0.59 0.40 0.95
#2 0.62 0.57 0.30 0.80 0.67
#3 0.51 0.03 0
On May 27, 2013, at 20:17 , Kristi Glover wrote:
> Hi R-User,
> I am wondering how I can rearrange columns in a table in R. I do have very
> big data set (4500 columns). I have given an example of the data set.
>
>> dput(dat)
> structure(list(preV1001A1b = c(0.59, 0.3, 0.78, 0.43), preV15A1b =
On 27-05-2013, at 20:17, Kristi Glover wrote:
> Hi R-User,
> I am wondering how I can rearrange columns in a table in R. I do have very
> big data set (4500 columns). I have given an example of the data set.
>
>> dput(dat)
> structure(list(preV1001A1b = c(0.59, 0.3, 0.78, 0.43), preV15A1b = c(
Hi R-User,
I am wondering how I can rearrange columns in a table in R. I do have very big
data set (4500 columns). I have given an example of the data set.
> dput(dat)
structure(list(preV1001A1b = c(0.59, 0.3, 0.78, 0.43), preV15A1b = c(0.57,
0.62, 0.51, 0.95), preV2032A1b = c(0.4, 0.8, 0.24, 0.
Hi,
Not sure if this is what you expected:
set.seed(24)
mat1<- matrix(sample(1:20,3*4,replace=TRUE),ncol=3)
set.seed(28)
mat2<- matrix(sample(1:25,3*6,replace=TRUE),ncol=3)
set.seed(30)
mat3<- matrix(sample(1:35,3*8,replace=TRUE),ncol=3)
set.seed(35)
mat4<- matrix(sample(1:40,3*10,replace=TRUE),nc
On 27.05.2013 16:18, Guido Leoni wrote:
Dear list
I'm testing a predictor and I produced nice performance plots with ROCR
package utilizing the 3 standard command
pred <- prediction(predictions, labels)
perf <- performance(pred, measure = "tpr", x.measure = "fpr")
plot(perf, col=rainbow(10))
?lm.fit ## may be useful to you then. Have you tried it?
-- Bert
On Mon, May 27, 2013 at 9:52 AM, ivo welch wrote:
> hi bert---thanks for the answer.
>
> my particular problem is well conditioned [stock returns] and speed is
> very important.
>
> about 4 years ago, I asked for speedier alterna
I have a doubt about your New table especially the 3rd row:
Since after "test1" , the test fails, i guess 4,5 should be NA
dat1<-read.table(text="
Device,first_failing_test,test1,test2,test3,test4,test5
1,test2,1,2,3,4,5
2,test4,2,3,4,5,6
3,test1,3,4,5,6,7
",sep=",",header=TRUE,stringsAsFactors=FA
hi bert---thanks for the answer.
my particular problem is well conditioned [stock returns] and speed is
very important.
about 4 years ago, I asked for speedier alternatives to lm (and you
helped me on this one, too), and then checked into the speed/accuracy
tradeoff. http://r.789695.n4.nabble.c
I expect the answer to involve manipulating indices. But why do you need to do
this? This looks suspiciously like homework, and there is a no-homework policy
on this list (see the Posting Guide).
---
Jeff Newmiller
Homework? We don't do homework here.
-- Bert
On Mon, May 27, 2013 at 8:24 AM, Estigarribia, Bruno
wrote:
> Hello all,
>
> I have 4 matrices with 3 columns each (different number of rows though). I
> want to find a function that returns all possible 3-place vectors
> corresponding to the sum by c
Ivo:
1. You should not be fitting linear models as you describe. For why
not and how they should be fit, consult a suitable text on numerical
methods (e.g. Givens and Hoeting).
2. In R, I suggest using lm() and ?update, feeding update() data
modified as you like. This is, after all, the reason f
On 05/27/2013 10:28 AM, Neotropical bat risk assessments wrote:
Hi all are there any R packages that include "circular" stats similar to
Oriana (http://www.kovcomp.co.uk/oriana/newver4.html)?
I am interested in looking at annual patterns of bat activity where data
will have date/times and relati
Hello,
I have a data set with test results for multiple devices (rows). I also
have an index (column) that stores the first failing test for each device.
I need to remove the results for all the tests that come after the first
failing test.
Example of a data table:
Device,first_failing_test,test
Hello all,
I have 4 matrices with 3 columns each (different number of rows though). I
want to find a function that returns all possible 3-place vectors
corresponding to the sum by columns of picking one row from matrix 1, one
from matrix 2, one from matrix 3, and one from matrix 4. So basically, a
Dear Sir/Ma,
I Adelabu.A.A, one of the R-users from Nigeria. I have a data-set of claims
paid, premium for individual life-insurance policy holder but not in triangle
form. how can i running stochastics chainladder in r on it.
please help
[[alternative HTML version deleted]]
__
Hello,
You write a function of two arguments, 'par' and 'data' and do not use
them in the body of the function. Furthermore, what are b0, b1x and y?
Also, take a look at ?.Machine. In particular, couldn't you use
precision0 <- .Machine$double.eps
precision1 <- 1 - .Machine$double.eps
instead
Dear all:
I am writing the following small function for a probit likelihood.
As indicated, in order to avoid p=1 or p=0, I defined some precisions.
I feel however, that there might be a better way to do this.
Any help is greatly appreciated.
dear R experts---I would like to update OLS regressions with new
observations on the front of the data, and delete some old
observations from the rear. my goal is to have a "flexible"
moving-window regression, with a minimum number of observations and a
maximum number of observations. I can keep
Also,
you can check:
http://stackoverflow.com/questions/7235421/how-to-ddply-without-sorting
keeping.order <- function(data, fn, ...) {
col <- ".sortColumn"
data[,col] <- 1:nrow(data)
out <- fn(data, ...)
if (!col %in% colnames(out)) stop("Ordering column not preserved by
function")
Dear list
I'm testing a predictor and I produced nice performance plots with ROCR
package utilizing the 3 standard command
pred <- prediction(predictions, labels)
perf <- performance(pred, measure = "tpr", x.measure = "fpr")
plot(perf, col=rainbow(10))
The pred object and the perfo object are S4
May be this helps
levels(x$Species)
#[1] "setosa" "versicolor" "virginica"
x$Species<- factor(x$Species,levels=unique(x$Species))
xa <- ddply(x, .(Species), function(x)
{data.frame(Sepal.Length=x$Sepal.Length, mean.adj=(x$Sepal.Length -
mean(x$Sepal.Length)))})
head(xa)
# Species Sepal
Look at:
State - Space Discrimination and Clustering of. Atmospheric Time Series Data.
Based on Kullback Information Measures. Thomas Bengtsson
If you Google the topic, there are host of other papers too, but the one
meshes with exiting star-space methods.
-Roy
On May 27, 2013, at 4:34 AM, L
abline(lm(Response1~Predictor,data=Site),col=colours[as.numeric(Site[1,1
])])
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
On Behalf Of Tom Wilding
Sent: Montag, 27. Mai 2013 12:40
To: r-help@r-project.org
Subject: [R] Indexing within by state
Greetings everyone,
I am running MDS on a very large dataset (12 x 25071 - 12 model runs with 25071
output values each), and also on a very much reduced version of the dataset
(randomly select 1000 of the 25071 output values). I would like to look at
similarities/dissimilarities between the 12
Slightly diffferent approach but will this do what you want.
library(ggplot2)
ggplot(Data1, aes(Predictor, Response1, colour = Site)) +
geom_smooth(method= "lm", se = FALSE) +
ggtitle("Raw data with linear regresssions by Site")
John Kane
Kingston ON Canada
> -Original Message--
Did you have a look at Dynamic Time Warping and dtw package?
Best, E.
On Mon, May 27, 2013 at 01:34:42PM +0200, Lorenzo Isella wrote:
> Dear All,
> Apologies for not posting a code snippet, but I really need a pointer about
> a methodology to look at my data and possibly some R package which can
Hello,
I would like to use a parametric TS model and predictor as benchmark to
compare against other ML methods I'm employing. I currently build a simple
e.g. ARIMA model using the convenient auto.arima function like this:
library(forecast)
df <- read.table("/Users/bravegag/data/myts.dat")
# btw
Dear All,
Apologies for not posting a code snippet, but I really need a pointer about
a methodology to look at my data and possibly some R package which can ease
my task.
I am given a set consisting of several multivariate noisy time series,
let's call it {A}.
Each A_i in {A}, in turn, consists of
Dear R-list
I'm trying to get each regression line, plotted using abline, to be of a
different colour as the following code illustrates. I'm hoping there is a
simple indexing solution. Many thanks.
## code from here
colours=c("black","red","blue","green","pink")
Mean=500;Sd=10;NosSites=5;Xaxi
Hello,
I'm using ddply() in plyr and I notice that it has the habit of
re-ordering the levels of the '.variables' by which the splitting is
done. I'm concerned about correctly retrieving the original ordering.
Consider:
require(plyr)
x <- iris[ order(iris$Species, decreasing=T), ]
head(x)
#Sep
Hi Duncan,
Thanks a lot for your response, that was very helpful. I've managed to get my
head around the javascript code produced by the writeWebGL function: I now have
a 4d interactive animation that can be played in a web browser. Let me know if
you're interested in seeing it and I'll send it
Hi
On 05/24/13 20:24, Johannes Graumann wrote:
Hi,
I'm currently combining multiple plots using something along the lines
of the following pseudo-code:
library(grid)
grid.newpage()
tmpLayout <- grid.layout(
nrow=4,
ncol=2)
pushViewport(viewport(layout = tmpLayout))
and than proceedi
Hi all are there any R packages that include "circular" stats similar to
Oriana (http://www.kovcomp.co.uk/oriana/newver4.html)?
I am interested in looking at annual patterns of bat activity where data
will have date/times and relative abundance values for each Date.
I would like to have a cir
52 matches
Mail list logo