uot; "A"
> [3,] "b" "A"
> [4,] "b" "A"
> [5,] "c" "A"
> [6,] "d" "A"
>
> -
> David L Carlson
> Department of Anthropology
> Texas A University
> Coll
thus how do I get raw data
(object ab) from ddd?
I've tried
as.data.frame.table(ddd)
which is not the answer I'm looking for.
Thanks in advance,
PF
--
+---
| Patrizio Frederic,
| http://morgana.unimore
://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
+---
| Patrizio Frederic,
| http
.
--
+---
| Patrizio Frederic,
| http://www.economia.unimore.it/frederic_patrizio/
+---
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE
-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
+---
| Patrizio Frederic,
| http://www.economia.unimore.it/frederic_patrizio
class(as.matrix(a)) # change class, and
as.numeric(as.matrix(a)) # bingo, it works
PF
--
+---
| Patrizio Frederic,
| http://www.economia.unimore.it/frederic_patrizio
--
+---
| Patrizio Frederic,
| http://www.economia.unimore.it/frederic_patrizio/
+---
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do
class(b) # which is now a numeric matrix
best regards
PF
--
+---
| Patrizio Frederic,
| http://www.economia.unimore.it/frederic_patrizio
dear all,
here's a couple of questions that puzzled me in these last hours:
# issue 1 qnorm(1-10e-100)!=qnorm(10e-100)
qnorm(1-1e-10) == -qnorm(1e-10)
# turns on to be FALSE. Ok I'm not a computer scientist but,
# but I had a look at the R inferno so I write:
all.equal(qnorm(1-1e-10) ,
Hi Danny,
it sounds to much easer than that.
Try
y - data.frame(matrix(rnorm(100),10))
nr - ncol(y)
test - lapply(y, shapiro.test)
sapply(test,function(x)c(x$statistic, x$p.value))
it should perform the required task.
Cheers,
P
On Fri, Feb 4, 2011 at 4:52 AM, DB1984 dannyb...@gmail.com
as usual I apologize for my fragmented English
--
+-
| Patrizio Frederic, PhD
| Assistant Professor,
| Department of Economics,
| University of Modena and Reggio Emilia,
| Via Berengario 51,
| 41100 Modena, Italy
|
| tel: +39 059 205 6727
for my fragmented English
--
+-
| Patrizio Frederic, PhD
| Assistant Professor,
| Department of Economics,
| University of Modena and Reggio Emilia,
| Via Berengario 51,
| 41100 Modena, Italy
|
| tel: +39 059 205 6727
| fax: +39 059 205 6947
| mail
.
--
+-
| Patrizio Frederic, PhD
| Assistant Professor,
| Department of Economics,
| University of Modena and Reggio Emilia,
| Via Berengario 51,
| 41100 Modena, Italy
|
| tel: +39 059 205 6727
| fax: +39 059 205 6947
| mail: patrizio.frede...@unimore.it
://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
+-
| Patrizio Frederic, PhD
| Assistant Professor,
| Department of Economics,
| University of Modena and Reggio Emilia,
| Via Berengario
-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
+-
| Patrizio Frederic, PhD
| Assistant Professor,
| Department of Economics,
| University of Modena and Reggio Emilia,
| Via Berengario 51,
| 41100 Modena, Italy
|
| tel
:
Error in load(K:\\.RData) :
ReadItem: unknown type 136, perhaps written by later version of R
I've no idea of what type 136 is. Any hints?
Thanks in advance,
Patrizio
--
+-
| Patrizio Frederic, PhD
| Assistant Professor,
| Department
.
--
+-
| Patrizio Frederic, PhD
| Assistant Professor,
| Department of Economics,
| University of Modena and Reggio Emilia,
| Via Berengario 51,
| 41100 Modena, Italy
|
| tel: +39 059 205 6727
| fax: +39 059 205 6947
| mail: patrizio.frede...@unimore.it
http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
--
+-
| Patrizio Frederic, PhD
| Assistant Professor,
| Department of Economics,
| University of Modena and Reggio Emilia,
| Via
Roger,
many thanks for your very useful suggestions.
I've just produced some plot using xlim/ylim. I noticed I can only
zoom in a square box. Is there any way to produce rectangular ones?
Best
Patrizio
2009/4/7 Roger Bivand roger.biv...@nhh.no:
Patrizio Frederic frederic.patrizio at gmail.com
dear all,
I'm a newbie in map tools. I was asking to perform an apparently very
simple task.
I have a list of countries (about fifty all over in the world) scored
with a real positive value. Eg
Country score
Italy .56
UK .58
Korea .41
Mexico .63
...
I wish to plot geographical maps
or the exactly equivalent form:
x[x$X1 %in% unique(x[x$X20,X1]), ]
Patrizio
2009/4/2 Nutter, Benjamin nutt...@ccf.org:
x -
data.frame(matrix(c(rep(11,4),rep(12,3),rep(13,3),rep(0,3),1,rep(0,4),re
p(1,2)),ncol=2))
id.keep - unique(subset(x,X20)$X1)
x2 - subset(x,X1 %in% id.keep)
x2
2009/3/27 huiming song huimi...@gmail.com:
hi, everybody, please help me with this question:
If I want to do iteration for 1000 times, however, for the 500th iteration,
there is NaN appears. Then the iteration will stop. If I don't want the stop
and want the all the 1000 iterations be done.
this works
which.is.not.unique - apply(x,2,function(x)ifelse(length(unique(x))==1,F,T))
x[,which.is.not.unique]
patrizio
2009/3/26 Duijvesteijn, Naomi naomi.duijveste...@ipg.nl:
Hi Readers,
I have a question.
I have a large dataset and want to throw away columns that have the same
Greg,
it seems an obvious behavior to me
y=c(2,2,2,3,3,3,1)
x=1:length(y)
plot(x,y)
lines(x,approxfun(x,y)(x)) # for every x it exists one only value of y
plot(y,x)
lines(sort(y),approxfun(y,x)(sort(y))) # for some y it exists more
than one value of x!
approxfun return a function. By definition
try also
m - matrix( runif(5^2), nrow=5, dimnames = Names- list(
c(A,B,C,D,E),
c(O,P,Q,R,S) ) )
data.frame(expand.grid(Names[[1]],Names[[2]]),as.numeric(m))
data.frame(code=outer(Names[[1]],Names[[2]],paste,sep=.)[1:25],num=as.numeric(m))
Patrizio
2009/3/25 jim holtman jholt...@gmail.com:
Hi Agus,
try this two ones
d-matrix(rpois(45,3),5,9)
barplot(d,beside=T,col=rainbow(5),names=c(CRTL,LSB,ONEMKR,
TWOMKR,BLUP,BLUPQ,BLUP1M,BLUP2M,GAS),las=2)
barplot(d,beside=T,col=rainbow(5),names=c(CRTL,LSB,ONEMKR,
TWOMKR,BLUP,BLUPQ,BLUP1M,BLUP2M,GAS),cex.names=.8)
best
Patrizio
2009/3/18
Jason,
be carefully to the order of intensities (counts or densities):
x=rnorm(1000)
par(mfrow=c(2,2))
h=hist(x,breaks=bk-c(-5,-3,-2,-1,-.5,0,1,3,5))
barplot(rev(h$intensities),rev(bk[2:9]-bk[1:8]),space=0,horiz=T) # compare to
axis(2)
barplot(h$intensities,bk[2:9]-bk[1:8],space=0,horiz=T)
hey Laura,
I hope this help
f1 = c(a,b,c)
f2 = c(b,a,c,d)
match(f2,f1)
f3 = match(f2,f1,0)
?match
cbind(f2,f3)
cbind(f2,f30)
f4 = ifelse(f30,yes,no)
cbind(f2,f4)
data.frame(f2,f4)
Patrizio
2009/2/25 Laura Rodriguez Murillo laura.lmuri...@gmail.com:
Hi dear list,
If anybody could help me, it
James,
as I previously told you in my broken English, probably the function
you're looking for is not filled.contour but image and contour
The following code makes exactly what you ask for
data(akima)
akima
akima.smooth -
with(akima, interp(x, y, z, xo=seq(0,25, length=500),
James,
you're probably interested in image function rather than in
filled.contour. Type ?image to see the syntax.
Cheers,
Patrizio
2009/2/18 James Nicolson jlnicol...@gmail.com:
Hi,
Thanks for your help. I have looked at the beginners documentation and
while there are options to configure
do you mean:
f=function(x)
0*(abs(x-.5)=.3)-1*(abs(x-.5)=.4)+(10*x-2)*(x.1x.2)+(-10*x+8)*(x=.2x=.5)
f(x)
curve(f,0,1)
hope it helps.
Patrizio
2009/2/14 kathie kathryn.lord2...@gmail.com:
Dear R users,
From the code below, I try to compute y value. (In fact, y looks like a
trapezoid)
hey Joe,
I had a quick look at your code. In this line:
b2$PRRSvac - ifelse(b2$status==MS-X, PRRS-pos|b2$status==R�d
SPF+Myc+Ap2+DK+Vac,1,0)
some special characters are used. You must use only plain ascii characters
Hope this help.
Cheers,
Patrizio
2009/2/13 joe1985 johan...@dsr.life.ku.dk:
hey Kirsten,
did type
?axis
it may help. eg:
plot(rnorm(100),axes=F)
axis(1)
axis(3,at=seq(0,50,length=3),labels=c(A,B,C))
axis(2)
axis(4,at=seq(-2,2,length=10),labels=1:10)
Best,
Patrizio
2009/1/14 Kirsten Thonicke kirsten.thoni...@pik-potsdam.de:
Dear R experts,
I want to plot a line
dear Hadley and Bert,
thank you very much for your suggestions. I asked one question and I
learned 2 things:
1. Hadley,
library(plyr)
ddply(data, .(V1), colwise(cl))
that is exactly what I was searching for.
2. Bert,
?tapply says that the first argument is an **atomic** vector. A
factor is
?
Thanks in advance,
Patrizio
+-
| Patrizio Frederic, PhD
| Research associate in Statistics,
| Department of Economics,
| University of Modena and Reggio Emilia,
| Via Berengario 51,
| 41100 Modena, Italy
|
| tel: +39 059 205 6727
| fax: +39 059 205
Dear all,
is there any way to transform a .Data directory created in S-plus 6.1
for windows in a .RData file?
Thanks in advance,
Patrizio Frederic
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
status
major 2
minor 7.1
year 2008
month 06
day23
svn rev45970
language R
version.string R version 2.7.1 (2008-06-23)
what's going wrong?
Thanks in advance,
Regards,
Patrizio Frederic
__
R-help
,d2,drawlabel=F)
and everything works fine now. Thank you again,
Patrizio
2008/8/1 Prof Brian Ripley [EMAIL PROTECTED]:
What viewers are you using?
Works for me (using ghostscript 4.61 and acroread 8.1.2) -- I even tried
2.7.1 (as well as R-patched).
On Fri, 1 Aug 2008, Patrizio Frederic
for studing a new
topic).
Any suggestion is welcome.
Regards,
Patrizio Frederic
+-
| Patrizio Frederic
| Research associate in Statistics,
| Department of Economics,
| University of Modena and Reggio Emilia,
| Via Berengario 51,
| 41100 Modena
?write.table
could help
PF
2008/7/31 Max [EMAIL PROTECTED]:
Marc,
this is very handy. My next question is, do you know a quick and easy way to
transfer all of the output to a txt file? (or .xls)?
Thanks,
-Max
Marc Schwartz explained on 07/31/2008 :
on 07/31/2008 12:24 PM Max wrote:
have a look at
http://sunsite.univie.ac.at/rcom/server/doc/RExcel.html
regards,
PF
2008/7/30 losemind [EMAIL PROTECTED]:
Hi all,
How do I operate R from within Excel?
I mean, highlight a bunch of cells, and send to R, and do some statistics in
R, and return back the numbers and do some
can you write the bimodal gamma pdf?
if so create your own pdf:
dbigamma=function(x,alpha1,alpha2,beta1,beta2)
{
# ... the bimodal gamma pdf (I can't find it)
}
hist(x,probability=T)
curve(dbigamma(x,alpha1,alpha2,beta1,beta2))
and look at the result
regards,
PF
2008/7/29 Gundala Viswanath
in advance,
Patrizio Frederic
+-
| Patrizio Frederic
| Research associate in Statistics,
| Department of Economics,
| University of Modena and Reggio Emilia,
| Via Berengario 51,
| 41100 Modena, Italy
|
| tel: +39 059 205 6727
| fax: +39 059 205 6947
# is that what you want?
table(cut(xy,seq(0,max(xy)+.4,by=.4)))
# or this
table(cut(xy,hist(xy)$breaks)) # not the same
regards,
PF
+-
| Patrizio Frederic
| Research associate in Statistics,
| Department of Economics,
| University of Modena
this works too:
n = 6 # number of rows
m = 4 # number of coloumns
nm = n*m
mat = matrix(1:nm,n) # your matrix
pf = function(Col){
ind = rep(1:(n/2),each=2)
out = tapply(Col,ind,prod)
out
}
# pf performs forall vecotr x: x[i]*x[i-1],
this works
cno = c(rep(1342,times=3),rep(2568,times=2))
rank= c(.23,.14,.56,.15,.89)
df1 = data.frame(cno,rank)[order(cno,rank),]
cnou= unique(cno)
ind = match(cno,cnou)
where = tapply(rank,ind,length)
where = cumsum(as.numeric(where))
df1[where,]
regards,
PF
this is an off-topic, of course!
by definition, pdf MUST BE POSITIVE and log function is defined ONLY
for positive values.
check your pdf code and find out the errors.
regards
Patrizio Frederic
+-
| Patrizio Frederic
| Research associate
))
abline(b0,b1,col=2)
regards
PF
ps notice that in heteroscedasticity case the random vector (X,Y) is
not a bivariate normal but it is:
Y|X=x ~ normal(b0+b1 x; h(x))
ie every conditional Y is normal
+-
| Patrizio Frederic
| Research associate
dear Silvia,
quoting Venables WN and Ripley DB (1994) Modern Applied Statistics
with S-plus, sringer, pag 185:
Since explicit expressions for the maximum likelihood estimators are
not usually available estimates MUST be calculate iteratively
means that glm.fit performs MLE indirectly and
try this
colSums(matrix(x,8))
regards,
PF
+-
| Patrizio Frederic
| Research associate in Statistics,
| Department of Economics,
| University of Modena and Reggio Emilia,
| Via Berengario 51,
| 41100 Modena, Italy
|
| tel: +39 059 205 6727
| fax
try
?unlist
it may help
regards
+-
| Patrizio Frederic
| Research associate in Statistics,
| Department of Economics,
| University of Modena and Reggio Emilia,
| Via Berengario 51,
| 41100 Modena, Italy
|
| tel: +39 059 205 6727
| fax: +39 059
2008/5/29 Frank E Harrell Jr [EMAIL PROTECTED]:
Patrizio Frederic wrote:
dear Harrell,
thank you for quick reply and suggestions. I still have the problem:
library(Design)
x = rnorm(100)
y = runif(100)(exp(x)/(1+exp(x)))
y = 0*y+1*y
d = datadist(x,y)
options(datadist=d)
fit
is fixed. Now I know how .Options and options are
related one each other. Sorry for wasting your time.
Thank you for your help.
Patrizio Frederic
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
status
major 2
minor 7.0
year 2008
month 04
day22
svn rev45424
language R
version.string R version 2.7.0 (2008-04-22)
thank you in advance,
Patrizio Frederic
-
| Patrizio Frederic
| Research
.
Patrizio Frederic
version
platform i386-pc-mingw32
arch i386
os mingw32
system i386, mingw32
status
major 2
minor 7.0
year 2008
month 04
day22
svn rev45424
language R
version.string R version 2.7.0 (2008-04
55 matches
Mail list logo