Displaying 20 results from an estimated 500 matches similar to: "selecting elements in vector"
2007 Nov 15
2
counting strings of identical values in a matrix
Hello
I have this problem. I have a large matrix of this sort:
> prova
[,1] [,2] [,3] [,4]
[1,] 3 3 3 3
[2,] 3 3 3 1
[3,] 1 3 3 3
[4,] 1 1 1 3
[5,] 3 1 1 3
[6,] 3 1 1 3
[7,] 1 3 1 3
[8,] 1 3 3 3
What I want to do is to count the number of
sequences of ones and stack the results in a
2008 Oct 27
3
counting run lengths
Hello,
I have the following problem.
I am running simulations on possible states of a set of agents
(1=employed, 0=unemployed).
I store these simulated time series in a matrix like the following,
where rows indicates time periods, columns the number of agents (4
agents and 8 periods in this case):
Atr=[
1 1 1 1
1 1 0 1
1 1 0 1
1 1 0 1
0 1 0 1
0
2013 Mar 12
1
loading data frames and rbind them
Hello everybody
I have the following problem. I have to load a number of xls files from
different folders (each xls file has the same number of columns, and
different numbers of rows). Each xls file is named with a number, i.e.
12345.xls and is contained in a folder with same name, say 12345)
Once loaded, I want to rbind all of them to obtain a single database.
I think I successfully did the
2009 Nov 02
3
partial matching with grep()
dear all,
This is a probably a silly question.
If I type
> grep("x",c("a.x" ,"b.x","a.xx"),value=TRUE)
[1] "a.x" "b.x" "a.xx"
Instead, I would like to obtain only
"a.x" "b.x"
How is it possible to get this result with grep()?
many thanks for your attention,
best,
vito
--
2008 Jun 30
2
difference between MASS::polr() and Design::lrm()
Dear all,
It appears that MASS::polr() and Design::lrm() return the same point
estimates but different st.errs when fitting proportional odds models,
grade<-c(4,4,2,4,3,2,3,1,3,3,2,2,3,3,2,4,2,4,5,2,1,4,1,2,5,3,4,2,2,1)
score<-c(525,533,545,582,581,576,572,609,559,543,576,525,574,582,574,471,595,
557,557,584,599,517,649,584,463,591,488,563,553,549)
library(MASS)
library(Design)
2004 Dec 14
1
correlation in lme4
Dear all,
I have tried to consider a correlation structure in lme (package lme4), but
without success.
I have used something like:
> risul<-lme(y~x+ z , data=mydata, random=~ x | g, correlation = corAR1())
but the result is the same as:
> risul<-lme(y~x+ z , data=mydata, random=~ x | g).
Can anybody help me?
Antonella
**************************************************
Prof.
2010 Mar 04
1
only actual variable names in all.names()
dear all,
When I use all.vars(), I am interest in extracting only the variable names..
Here a simple example
all.vars(as.formula(y~poly(x,k)+z))
returns
[1] "y" "x" "k" "z"
and I would like to obtain
"y" "x" "z"
Where is the trick?
many thanks
vito
--
====================================
Vito M.R. Muggeo
Dip.to Sc
2005 May 05
2
names(dist(mat)) gives NULL in R 2.1.0
Dear list,
I do not know if this is a bug.
Let's suppose mat is a matrix derived from this code:
> x<-rnorm(10)
> y<-rnorm(10)
> names(x)<-LETTERS[1:10]
> names(y)<-LETTERS[1:10]
> mat<-cbind(x,y)
Now in R 2.0.1 I have:
> names(dist(mat))
"A" "B" "C" "D" "E" "F" "G" "H"
2001 Feb 01
1
Generalized Error Distribution (Exponential Power) CDF?
Hi all,
Just a random shot in the dark. Does anyone have/know of a function for the
CDF of a generalized error dist?
--
Elliot Williams (ewilliams at ucsd.edu)
Economics Department, UC San Diego
-------------- next part --------------
An embedded message was scrubbed...
From: Elliot Williams <ewilliams at ucsd.edu>
Subject: [R] Generalized Error Distribution (Exponential Power) CDF?
2010 Oct 25
1
building lme call via call()
dear all,
I would like to get the lme call without fitting the relevant model.
library(nlme)
data(Orthodont)
fm1 <- lme(distance ~ age, random=list(Subject=~age),data = Orthodont)
To get fm1$call without fitting the model I use call():
my.cc<-call("lme.formula", fixed= distance ~ age, random = list(Subject
= ~age))
However the two calls are not the same (apart from the data
2018 Jan 30
2
variable names in lm formula ~.
dear all,
Is the following intentional? Am I missing anything in documentation?
d<-data.frame(y=rnorm(10,5,.5),exp=rnorm(10), age=rnorm(10))
formula(lm(exp(y)~exp+age, data=d))
#--> exp(y) ~ exp + age
formula(lm(exp(y)~., data=d))
#--> exp(y) ~ age
variable 'exp' (maybe indicating "experience") is not included in the
model. The same happens with 'log' (and
2012 Mar 12
1
Fwd: Re[2]: B-spline/smooth.basis derivative matrices
--- On Mon, 3/12/12, aleksandr shfets <a_shfets at mail.ru> wrote:
> From: aleksandr shfets <a_shfets at mail.ru>
> Subject: Fwd: Re[2]: [R] B-spline/smooth.basis derivative matrices
> To: "Vassily Shvets" <shv736 at yahoo.com>
> Received: Monday, March 12, 2012, 5:15 PM
>
>
>
> -------- ???????????? ?????????
> --------
> ?? ????:
2008 Aug 22
1
smbclient: tdb_fetch_uint32 failed
hi all,
I'm facing a problem with a brand new installation on fedora 9.
packages were updated right after the installation, so the samba
packages are of the latest available version (3.2.0-17.fc9).
at the first run were created all the tree of tdb files under
/var/lib/samba.
now I create a new user:
[root@barbara Scrivania]# smbpasswd -a barbara
New SMB password:
Retype new SMB password:
2018 Oct 04
3
help with samba and iptables
Hi community, i have a samba server that work's great, but my friends of
IT security said that is vulnerable without a firewall, i try to set an
iptables firewall using the official documentation but is not working
(obviously), this ti my config:
#!/bin/sh
echo n Aplicando Reglas de Firewall...
## FLUSH de reglas
iptables -F
iptables -X
iptables -Z
iptables -t nat -F
## Establecemos
2000 Sep 11
1
R 1.1.1 (and 1.2.0) on Mac (PPC) and "/afm/" bugs (?)
Hy (I hope this is the right list).
1. Mac porting
I'm finishing the porting of R for Mac. I hope to finish it for the
end of september. Thanks to the porting of R 0.64 by Ross (that he
gave me) I succeded in this porting. This is the current state:
Both R 1.1.1. and 1.2.0 works with minor modification to the original
code. The Macintosh device has been updated to the new version of
2005 Mar 08
1
samba WINS problem on 2 networked LANS using a VPN connection
Hello Samba experts,
Please read all email because i'm desperate!!!!!
I have problem on joining to LAN-s using Samba. Finally i got a solution to
"see" booth workgroups on "Entire Network", but i'm having problem with
stations located in LAN2. From any station located in LAN1, I can see LAN2
workgroup and the browse list with stations located in LAN2, but when
2003 Oct 24
1
gee and geepack: different results?
Hi, I downloaded both gee and geepack, and I am trying to understand the
differences between the two libraries.
I used the same data and estimated the same model, with a correlation
structure autoregressive of order 1. Surprisingly for me, I found very
different results. Coefficients are slightly different in value but
sometimes opposite in sign.
Moreover, the estimate of rho (correlation
2006 Feb 27
3
how to use the basis matrix of "ns" in R? really confused by multi-dim spline filtering?
Hi all,
Could anybody recommend some easy-to-understand and example based
notes/tutorials on how to use cubic splines to do filtering on
multi-dimension data?
I am confused by the 1-dimensional case, and more confused by
multi-dimensional case.
I found all the books suddenly become very abstract when it comes to this
subject.
They don't provide examples in R or Splus at all.
Specifically,
2012 Aug 27
2
randomLCA
Can anybody, please, explain me how many parameter are estimated using
randomLCA?
For examples, model "dentistry.lca2random" estimate 1 scale (or
variance, b_j) parameter and 2 position parameters (a_cj)? Doesn't
it?
Do I need at least 4 diagnostic tests for such a model?
What happens if I specify options blocksize and byclass? How many
diagnostic tests (or rater) I need?
2010 May 26
3
Peak Over Threshold values
Dear List
I hope you can help me: I?ve got a dataframe (df) within which I am looking
for Peak Over Threshold values as well as the length of the events. An event
starts when walevel equals 5.8 and it should end when walevel equals the
lower threshold value (5.35).
I tried ?clusters (?)? from ?evd package?, and varied r (see example) but it
did not work for all events (again