Hi
Isn't it something for merge is designed?
> merge(Doctors, DeptCodes, by.x="DocDepts", by.y="Depts")
DocDeptsDocs DeptNames
1 Christian\nChristianson Heart
2 Bob Smith Brain
3 Greg Jones Anesthesia
4 999
Hi
>
> Hi,
>
> If you read carefully the help pages for read.table you get this:
>
>
> na.stringsa character vector of strings which are to be interpreted as
> NA<../../utils/help/NA> values.
> Blank fields are also considered to be missing values in logical,
integer,
> numeric and complex f
On Thu, 8 Sep 2011, Carlos Ortega wrote:
Hi,
Use packages "rpart.plot" or "maptree" to enhance the tree drawing.
Or another alternative, use "party" package that offers much more graphing
possibilities.
There is also the "partykit" package on R-Forge which offers party-style
graphics for rpa
Dear Arne,
Does censReg support unbalanced panel data?
/Igors
--
View this message in context:
http://r.789695.n4.nabble.com/function-censReg-in-panel-data-setting-tp3792227p3801030.html
Sent from the R help mailing list archive at Nabble.com.
__
> Marc Schwartz
> on Thu, 8 Sep 2011 15:41:26 -0500 writes:
> On Sep 8, 2011, at 3:09 PM, David Winsemius wrote:
>>
>> On Sep 8, 2011, at 3:54 PM, Marc Schwartz wrote:
>>
>>>
>>> On Sep 8, 2011, at 2:42 PM, David Winsemius wrote:
>>>
Dear All,
when I'm running a PCA with
prcomp(USArrests, scale = TRUE)
I get the right principal components, but with the wrong sign infront
Rotation:
PC1 PC2 PC3 PC4
Murder 0.5358995 -0.4181809 0.3412327 0.64922780
Assault 0.5831836 -0.1879856 0.2681484 -0.74340748
UrbanPop 0.2781909 0.8728062
Hi,
If all the signs are switched the PC's are still the same. The principal
vectors are along the same axis, only in a different direction. So there
is no problem :).
hope this helps,
Paul
On 09/09/2011 09:01 AM, René Mayer wrote:
> Dear All,
>
> when I'm running a PCA with
>
> prcomp(USArrest
Hi,
You could also consider following a statistics course at a university
near you, if you can convince your boss to give you the time. Maybe an
"Introductory Statistics" course is all you need.
cheers,
Paul
On 09/08/2011 04:49 PM, kensuguro wrote:
> I understand this isn't a r specific questio
And do take a look at Open Courseware:
http://ocw.mit.edu/index.htm
cheers,
Paul
On 09/09/2011 09:30 AM, Paul Hiemstra wrote:
> Hi,
>
> You could also consider following a statistics course at a university
> near you, if you can convince your boss to give you the time. Maybe an
> "Introductory
thanks for pointing out Paul,
but the thing which is annoying me in the first place IS this
direction reversal.
this makes no sense for me
why could this be?
Zitat von "Paul Hiemstra" :
Hi,
If all the signs are switched the PC's are still the same. The principal
vectors are along the same
On 11-09-09 5:42 AM, René Mayer wrote:
thanks for pointing out Paul,
but the thing which is annoying me in the first place IS this
direction reversal.
this makes no sense for me
why could this be?
I think you need to read more about principal components. The signs
within a PC vector are meani
I have a data frame 'tmp' and a vector 'name' containing 'd2'.
I want to save 'tmp' under the name hidden in 'name', and the file must have
the same name, plus the extension '.rda'.
So I try
> tmp
x y
1 1 3
2 2 4
> name
[1] "d2"
> assign(name, tmp)
> summary(get(name))
x y
Min.
On Sep 9, 2011, at 09:13 , Petr PIKAL wrote:
> Hi
>
> Isn't it something for merge is designed?
Sort of. (You'd need to think carefully about what happens with non-matched
codes.)
Wouldn't this do the trick as well?
in <- as.character(DeptCodes$DeptCodes)
out <- as.character(DeptCodes$DeptNa
Hi!
Why don't you just save tmp?
save(tmp, file = paste(name, "rda", sep = "."))
I don't think it makes much difference, at least not with your example.
Or does it?
Ivan
Le 9/9/2011 11:55, Göran Broström a écrit :
I have a data frame 'tmp' and a vector 'name' containing 'd2'.
I want to sav
The point is that a principal component vector is a solution,
say V, of a matrix equation A%*%V = L*V where A is the matrix
and L is a scalar..
Since this equation can be written A%*%(-V) = L*(-V), the
result is indeterminate with respect to its sign. If V is a
solution, so is (-V), and vice versa
On 11-09-09 5:55 AM, Göran Broström wrote:
I have a data frame 'tmp' and a vector 'name' containing 'd2'.
I want to save 'tmp' under the name hidden in 'name', and the file must have
the same name, plus the extension '.rda'.
So I try
tmp
x y
1 1 3
2 2 4
name
[1] "d2"
assign(name, tmp)
sum
On 11-09-09 6:01 AM, Ivan Calandra wrote:
Hi!
Why don't you just save tmp?
save(tmp, file = paste(name, "rda", sep = "."))
I don't think it makes much difference, at least not with your example.
Or does it?
That saves it with the name "tmp", not "d2" as Göran wanted.
Duncan Murdoch
Ivan
Dear expeRts,
I am a new user of rgl, below is my first trial to plot a simple function in
3d.
I managed to put the axes in the right locations, but:
(1) The xlab, ylab, and zlab arguments are ignored; how can I put in axes
labels?
(2) Since I removed the axes in persp3d() the viewport is too s
Hi!
Thanks for providing great help in R-related statistics. Now, however I'm
stuck. I'm not a statistics person but I was recommended to use R to perform
a nmds plot and PerMANOVA of my dataset.
Sample(treatment) in the columns and species (OTU) in the rows. I have 4
treatments (Ambient Temperat
Hi Kensuguro,
I would try the Royal Statistical Society, based in London. They have a
range of courses from relatively basic through to graduate level, all of
which are based on distance learning. However, what they also have now are
modularised programmes, which might be ideal for you, as you are
On 11-09-09 6:18 AM, Marius Hofert wrote:
Dear expeRts,
I am a new user of rgl, below is my first trial to plot a simple function in 3d.
I managed to put the axes in the right locations, but:
(1) The xlab, ylab, and zlab arguments are ignored; how can I put in axes
labels?
Those are documente
thanks for explaining Duncan and Ted,
Indeed, I did compare my results from a textbook
and noticed that I consitenly get flipped signs and biplots.
regards
René
Zitat von ted.hard...@wlandres.net:
The point is that a principal component vector is a solution,
say V, of a matrix equation A%*%V
On Fri, Sep 9, 2011 at 12:09 PM, Duncan Murdoch wrote:
> On 11-09-09 6:01 AM, Ivan Calandra wrote:
>
>> Hi!
>>
>> Why don't you just save tmp?
>> save(tmp, file = paste(name, "rda", sep = "."))
>>
>> I don't think it makes much difference, at least not with your example.
>> Or does it?
>>
>
> That
On 09/09/2011 06:31 AM, XINLI LI wrote:
Dear R Group:
Based on the following data, how to do a great Spider (Radar) Plot? Any
advice is greatly appreciated.
HospID Rate Age Charlson NIHSS 1 0.2 49 3.5 0 2 0.1 48 1.8 12 3 0.4 56
2.1 5 4 0.3 77 0 7 5 0.2 67 6.5 3 6 0.1 62 4.8 4.6 7 0.1
Markus Lindh gmail.com> writes:
>
> Hi!
>
> Thanks for providing great help in R-related statistics. Now, however I'm
> stuck. I'm not a statistics person but I was recommended to use R to perform
> a nmds plot and PerMANOVA of my dataset.
>
> Sample(treatment) in the columns and species (OTU)
On 09/09/2011 03:35 AM, Mohan L wrote:
Hi All,
I have txt file like :
$ cat data.txt
US 10
UK 12
Ind 4
Germany 14
France 8
rawdata<- read.table(file='data.txt',sep='\t' , header=FALSE)
rawdata
V1 V2
1 US 10
2 UK 12
3 Ind 4
4 Germany 14
5 France 8
I
Briony gmail.com> writes:
>
> Hi R experts,
>
> I'm looking for some help with plotting vectors from envfit in vegan, onto a
> 3d plot using ordiplot3d. So far I have
>
> data.mds <- metaMDS(data, k=3,trace = FALSE)
> vect_data<-envfit(data.mds,vegdata[,3:21],choices=1:3,permu=)
> ordiplot
Dear Duncan,
thanks for your quick response.
Below is my second trial. I had to use mtext3d to place the label for the
z-axis
at the new axis where the ticks are drawn (if there's a simpler solution, please
let me know). Was the usage of rgl.viewpoint meant this way? It is nice to
adjust the r
This is my reproducible example:
example<-structure(list(SENSOR = structure(1:6, .Label = c("A", "B", "C",
"D", "E", "F"), class = "factor"), VALUE = c(270, 292.5, 0, 45,
247.5, 315), DATE = structure(1:6, .Label = c(" 01/01/2010 1",
" 01/01/2010 2", " 01/01/2010 3", " 01/01/2010 4", " 01/01/20
Hi,
can anyone help me how to use 'subset' function on my data frame?
I have created data frame 'data' with a few variables and with row names.
Now I would like to subset rows with concrete row names.
Using data[] I know how to do it. But I dont know how to formulate the
subset condition:
subset(
6.4.1 Estimation of fixed effects
Heterogeneous team ability is a possible explanation for the result in
Section 6.3. That
result simply indicates that the more goals a team scores, the higher the
probability
that it will score more. However, teams that can score more goals also
indicate teams
with
It is known that function bkde2D (package "KernSmooth") returns a
matrix of density estimates over the mesh induced by x1 and x2. In
Details it is written that "... heights of the kernel, scaled by the
bandwidths, at each datapoint are summed. This sum, after a
normalization, is the corresponding f
Hi
> Hello,
>
> in the meanwhile i found the problem for the #. The problem was, that #
and
> “none” are comments by default, so I turned comments of with
comment.char=””
> as stated in the help.
Hm. You are not telling the whole story.
I made a sample excel sheet with blank values and #DIV/0!
On 09/09/2011 8:02 AM, Marius Hofert wrote:
Dear Duncan,
thanks for your quick response.
Below is my second trial. I had to use mtext3d to place the label for the z-axis
at the new axis where the ticks are drawn (if there's a simpler solution, please
let me know). Was the usage of rgl.viewpoint
It is known that function bkde2D (package "KernSmooth") returns a matrix of
density estimates over the mesh induced by x1 and x2. In Details it is
written that "... heights of the kernel, scaled by the bandwidths, at each
datapoint are summed. This sum, after a normalization, is the corresponding
f
On 8 September 2011 09:56, Igors wrote:
> Does censReg expect from panel data to be balanced?
No. censReg() can estimate models with unbalanced panel data. The
estimation in the code that you sent me indeed does not work but if I
remove the user-specified starting values (argument "start"), it wo
Does that help:
> x
xin xout
1 1 14
2 85
3 16 884
4 1 14
5 85
6 16 884
> subset( x, x$xin > 7, select = xout )
Rainer provided an example of subsetting by the value of a variable in the
data frame. Below is an example of subsetting by the value of the row
name of the data frame.
df <- data.frame(var1=1:10, var2=letters[1:10], var3=sample(10),
row.names=month.abb[1:10])
subset(df, subset = row.name
maxbre wrote on 09/09/2011 06:28:15 AM:
>
> This is my reproducible example:
>
> example<-structure(list(SENSOR = structure(1:6, .Label = c("A", "B",
"C",
> "D", "E", "F"), class = "factor"), VALUE = c(270, 292.5, 0, 45,
> 247.5, 315), DATE = structure(1:6, .Label = c(" 01/01/2010 1",
> " 01/
Dear Duncan,
thanks a lot.
Is it possible to rotate the label drawn by mtext3d, say, by 90 degrees? [a
"rot=90" did not help]
Cheers,
Marius
On 2011-09-09, at 14:32 , Duncan Murdoch wrote:
> On 09/09/2011 8:02 AM, Marius Hofert wrote:
>> Dear Duncan,
>>
>> thanks for your quick response.
>>
No :(
I dont have a condition on variable but on row name. My data frame looks
like (from your example):
> x
xin xout
Peter1 14
Tom 8 5
Jane 16 884
Paul 114
Cathy 8 5
Hello,
I got one question on the Latin hypercube sampling.
suppose
there are three variables a, b, c, all of them follow the normal
distribution. the mean value and standard deviation for each are a(32,
2), b(35,5), c(37,3). I would like to use Latin hypercube sampling to
random generate 100
Thank you very much :)
stat.kk
--
View this message in context:
http://r.789695.n4.nabble.com/Subset-function-tp3801397p3801626.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mai
Hi all,
I have a set of 3D statistical parametric maps derived from an fMRI experiment
in which we have two levels of dependency.
- All subjects were scanned twice.
- All subject are dizygotic (non-identical) twins.
For every single scan (and thus statical map) we have a behavioural measure,
w
On Sep 9, 2011, at 8:12 AM, omega1x wrote:
It is known that function bkde2D (package "KernSmooth") returns a
matrix of
density estimates over the mesh induced by x1 and x2. In Details it is
written that "... heights of the kernel, scaled by the bandwidths,
at each
datapoint are summed. This
I have a collection of .csv files in a directory, and want to read them
into R data.frames whose names
are the same as the file names, without the .csv extension
e.g., from
> (files <- list.files(pattern="*.csv"))
[1] "Allstar.csv" "AllstarFull.csv"
[3] "Appearances.csv" "A
I thought that the main advantage of subset() over [()
is that you only mention the name of the data.frame once,
in the first argument, not in the second:
> x <- data.frame(xin=c(1, 8, 16, 1, 8, 16), xout=c(14, 5, 884, 14, 5, 884))
> subset(x, xin > 7, select = xout) # not x$xin > 7
xout
On Sep 9, 2011, at 10:39 AM, Michael Friendly wrote:
I have a collection of .csv files in a directory, and want to read
them into R data.frames whose names
are the same as the file names, without the .csv extension
e.g., from
> (files <- list.files(pattern="*.csv"))
[1] "Allstar.csv"
Michael Friendly wrote on 09/09/2011 09:39:27 AM:
>
> I have a collection of .csv files in a directory, and want to read them
> into R data.frames whose names
> are the same as the file names, without the .csv extension
>
> e.g., from
> > (files <- list.files(pattern="*.csv"))
> [1] "Allstar
I have a list 'ans' from the following code:
tt <- rnorm(50)
rr <- rnorm(50)
ans <- lm(rr~tt)
ans[1] is "$coefficients", ans[2] is "$residuals", ans[3] is
"$effects", ... and so on up to ans[12]. Is there an easy way to
display just these names and not the data they contain? I thought I
saw my ad
Try names(ans)
Hope this helps,
Michael Weylandt
On Fri, Sep 9, 2011 at 10:01 AM, Clemontina Alexander wrote:
> I have a list 'ans' from the following code:
>
> tt <- rnorm(50)
> rr <- rnorm(50)
> ans <- lm(rr~tt)
>
> ans[1] is "$coefficients", ans[2] is "$residuals", ans[3] is
> "$effects", ..
Try
> names(ans)
[1] "coefficients" "residuals" "effects" "rank"
[5] "fitted.values" "assign""qr""df.residual"
[9] "xlevels" "call" "terms" "model"
HTH,
Jorge
*
*
On Fri, Sep 9, 2011 at 11:01 AM, Clemontina Alexander <> wrote:
> I have a
> names(ans)
[1] "coefficients" "residuals" "effects" "rank"
[5] "fitted.values" "assign""qr""df.residual"
[9] "xlevels" "call" "terms" "model"
And thank you for providing a simple reproducible example.
Sarah
On Fri, Sep 9, 2011 at 11:01
Hi Clemontina,
On Fri, Sep 9, 2011 at 11:01 AM, Clemontina Alexander wrote:
> I have a list 'ans' from the following code:
>
> tt <- rnorm(50)
> rr <- rnorm(50)
> ans <- lm(rr~tt)
>
> ans[1] is "$coefficients", ans[2] is "$residuals", ans[3] is
> "$effects", ... and so on up to ans[12]. Is there
Which of these functions is best really depends on
why you are interested in knowing whether a number
is integral or not. Why are people interested in this?
I can think of a few
1) I have a C routine with the prototype
void func(int *n)
and to call it with .C() I need to make sure
t
Thank you all. And thanks for pointing out I have an lm object, not a list.
@ Steve, I knew I wasn't crazy when I saw him type "ans$" in the
prompt. I didn't see him hit though. So a special thanks to you
for helping me validate my sanity! :-)
Tina
On Fri, Sep 9, 2011 at 11:08 AM, Steve Liano
Hi guyz,
I have run my algorithm in R (see http://pastebin.com/q84Tujfg) and got the
following error:
Error in ar.ols(x, aic = aic, order.max = order.max, na.action = na.action, :
'order.max' must be < 'n.used'
I am pretty sure, that the error comes from the NeweyWest function in line 45,
On 09/09/2011 11:10 AM, Marius Hofert wrote:
Dear all,
Below is some code where I try to get plotmath symbols in an rgl plot. Duncan
Murdoch kindly suggested to use a "sprite" for this. As you can see, on can get
it to work, but my knowledge about grid and rgl is too limited to perfectly
solve t
Hi,
is there a function or an easy way to convert a variable with continuous values
into a categorial variable (with x levels)?
here is what I mean:
I want to transform x:
x <- c(3.2, 1.5, 6.8, 6.9, 8.5, 9.6, 1.1, 0.6)
into a 'categorial'-variable with four levels so that I get:
[1]
Hi,
On Sep 9, 2011, at 11:34 AM, Martin Batholdy wrote:
> Hi,
>
> is there a function or an easy way to convert a variable with continuous
> values into a categorial variable (with x levels)?
>
> here is what I mean:
>
>
> I want to transform x:
>
> x <- c(3.2, 1.5, 6.8, 6.9, 8.5, 9.6,
Hi there,
library(lattice)
equal.count(x,number=4,overlap=0)
JC
2011/9/9 Martin Batholdy :
> Hi,
>
> is there a function or an easy way to convert a variable with continuous
> values into a categorial variable (with x levels)?
>
> here is what I mean:
>
>
> I want to transform x:
>
> x <- c(3.2
Everyone:
I am working on a simulation of the efficiencies of regression
estimators when applied to model a specific form of highly skewed
data. The outcome variable (y) is being simulated from a generalized
lambda distribution (GLD) to reflect the characteristics (mean,
variance, skewness, kurto
On Fri, 9 Sep 2011, Simon Zehnder wrote:
Hi guyz,
I have run my algorithm in R (see http://pastebin.com/q84Tujfg) and got
the following error:
This is not reproducible. There is only the script but no information
about how it is called. Also, within your script you call
NeweyWest(regressio
Thanks all for your replies. Your responses are very helpful. But it is
indeed not my homework! I didn't know these functions, and wanted to avoid
the loop.
Annie
On Fri, Sep 9, 2011 at 1:38 AM, peter dalgaard wrote:
>
> On Sep 9, 2011, at 03:51 , Jeff Newmiller wrote:
>
> > The diff function w
I wish to display a single-panel Lattice figure with grouped data and fitted
regression lines. I don't seem to be able to get the
individual regression lines to display, e.g.;
d <- data.frame(q = rep(1:6, each=10), cc = rep(seq(10,100, 10),6))
# create data frame with gr
Thanks for the suggestions!
However all these functions don't produce exactly what I want
(at least with my actual data).
I need a split-algorithm that converts the values of my vectors into four
factors.
And the crucial part is, that I need exactly the same number of elements in
each factor-l
Thanks a lot for sharing your experience and suggestions.
I see now the logic of making use of my user library which doesn't
require root privs. Apparently linux is actually set up to work well -
something i'm not used to from the other OS i've used till now.
And for the rare times i do need
Hello!
In the guidelines I've read:
"Comment your code. Entire commented lines should begin with # and one space.
Short comments can be placed after code preceded by two spaces, #, and
then one space. "
Just wondering if there is no way to comment something out "in the
middle" of a line? Example:
Dear Duncan,
attached my next trial. It seems to work :-) Unfortunately, not the printing to
pdf. Not getting a high-quality pdf is certainly one of the major drawbacks. If
anybody knows how to fix that, please let me know. Even when generating the
labels "by hand" (with grid), the code is less
so what about :
library(ggplot2)
z <- breaks(x,equal=NULL,nbins=4)
a <- cut(x,z,include.lowest = TRUE)
it works for me !
JC
2011/9/9 Martin Batholdy :
> Thanks for the suggestions!
>
> However all these functions don't produce exactly what I want
> (at least with my actual data).
>
>
> I need a sp
On Sep 9, 2011, at 12:21 PM, Dimitri Liakhovitski wrote:
Hello!
In the guidelines I've read:
"Comment your code. Entire commented lines should begin with # and
one space.
Short comments can be placed after code preceded by two spaces, #, and
then one space. "
Just wondering if there is no
Thank you, David.
The only reason why I would prefer the in-line commenting is that it
would save space.
Having to start a new line stretches the code downwards.
Dimitri
On Fri, Sep 9, 2011 at 12:36 PM, David Winsemius wrote:
>
> On Sep 9, 2011, at 12:21 PM, Dimitri Liakhovitski wrote:
>
>> Hello
Hi,
Take a look at the multiStart() function in the "BB" package. This allows you
to specify random multiple starting values, which need not satisfy constraints.
Then you need to specify the constraints using the `projectLinear' argument.
Ravi.
---
On Sep 9, 2011, at 12:10 PM, Martin Batholdy wrote:
Thanks for the suggestions!
However all these functions don't produce exactly what I want
(at least with my actual data).
I need a split-algorithm that converts the values of my vectors into
four factors.
And the crucial part is, that I n
This will work as long as the number of values is evenly divisible by four
and no two observations are identical. But if either of those assumptions is
false, you cannot be certain to get the even split you are looking for
x <- c(3.2, 1.5, 6.8, 6.9, 8.5, 9.6, 1.1, 0.6)
ceiling(rank(x)/(len
Eric Tiger yahoo.com> writes:
>
> Hello,
>
> I got one question on the Latin hypercube sampling.
>
> suppose
> there are three variables a, b, c, all of them follow the normal
> distribution. the mean value and standard deviation for each are a(32,
> 2), b(35,5), c(37,3). I would like to u
Hi:
There are two ways to go about this, depending on what you want.
# 1: Jean's output format:
# I'm using the reshape package here with cast(),
# but it should work similarly with dcast() in reshape2:
> cast(example, DATE ~ SENSOR, value = 'VALUE')
DATE A B C D E F
1
Thanks all again for the suggestions. I agree with Wolfgang that mcnemar.test()
is what I am looking for. The accuracy is the proportion of correct diagnosis
compared to a gold standard, and I am interested in which diagnosis test is
better, not particular interested in assessing the agreement b
To whom it may concern:
My name is Jillian Weinfeld. I am currently and undergraduate student at New
York University and working at Mount Sinai School of Medicine doing research
with epilepsy patients.
At the moment I am creating a manhattan plot with my data set. After reading
many forums and
hi
i am new to r and i would like to how could i do something like this in
spss:
T-TEST GROUPS=who('1' '2')
/MISSING=ANALYSIS
/VARIABLES= X3881686 X2672712 X2842570 X3526544 X2902531 X2402942 X3382216
X3771800 X2427469 X2392945 X2453006 X2562821 X3416651 X3552083 X3721851
X2477438 X2926969 X3026
You need to supply some information about how you actually are plotting your
data so we can figure out what you've tried. Example code (with some toy
data) would be greatly appreciated.
Michael Weylandt
On Fri, Sep 9, 2011 at 11:40 AM, Weinfeld, Jillian <
jillian.weinf...@mssm.edu> wrote:
> To w
On 09/09/2011 12:21 PM, Dimitri Liakhovitski wrote:
Hello!
In the guidelines I've read:
"Comment your code. Entire commented lines should begin with # and one space.
Short comments can be placed after code preceded by two spaces, #, and
then one space. "
Which guidelines are those? They seem
The examples in ?t.test and ?formula will help you.
Don't forget "An Introduction to R" too to import your data in a data
frame first...
2011/9/9 Mihovil Pletikos :
> hi
> i am new to r and i would like to how could i do something like this in
> spss:
>
> T-TEST GROUPS=who('1' '2')
> /MISSING=ANA
Hi Jillian,
Take a look at http://www.oga-lab.net/RGM2/func.php?rd_id=gap:mhtplot.
Best,
Jorge
*
*
On Fri, Sep 9, 2011 at 12:40 PM, Weinfeld, Jillian <> wrote:
> To whom it may concern:
>
> My name is Jillian Weinfeld. I am currently and undergraduate student at
> New York University and workin
On 09/09/2011 12:19 PM, Marius Hofert wrote:
Dear Duncan,
attached my next trial. It seems to work :-) Unfortunately, not the printing to pdf. Not
getting a high-quality pdf is certainly one of the major drawbacks. If anybody knows how
to fix that, please let me know. Even when generating the
Hi:
Hmm, these files look familiar...Lahman database? :)
I have the 2010 set, so here's how I got this to work on my system:
files <- list.files(pattern = '*.csv')
> files
[1] "Allstar.csv" "AllstarFull.csv"
[3] "Appearances.csv" "AwardsManagers.csv"
[5] "AwardsPlayers.csv
Hi,
Below is the code I write,
I am trying to create a metric of h and t while the values is out of function R.
First I have message warning
Second, the metric is not created
> h <- seq(0.1, 0.9, by=0.1)
> t <- seq(0,11000, by=100)
> z <- cbind(t)
> eta=1
> beta=2
> R <- array (1:1100, dim=
Your code works fine -- the warning message is just a heads up that the
object z/eta (which has length 111) does not quite match up with 1-h which
has length 10: usually this is a sign that the user defined something
improperly so R gives you a nice warning, but it doesn't halt the
calculation.
As
Thanks, David & Jean
assign(), as you suggested works to create the named objects in the
global environment.
In my application, I also want to :
(a) save each object to a similarly-named .RData file with that object
(b) create a corresponding .Rd documentation file.
(b) works fine in my loop
Well, I would point out to you that you only have 9 values of h which
certainly is a problem in calculating 10 colmans(?) -- more generally, I'd
suggest you learn more about the difference between vectorized operations
and operations on vectors: things like `%*%` and outer() will help you
greatly.
On Sep 9, 2011, at 3:14 PM, Halabi, Anan wrote:
Hi,
Below is the code I write,
I am trying to create a metric of h and t while the values is out of
function R.
First I have message warning
It is only a warning.
Second, the metric is not created
What "not created" means has already bee
I may be wrong, but I thought the original poster
was trying to make a matrix ('metric' sp.) of values,
R, so that
R[i,j] == f(t[i], h[i])
for all i and j where
f <- function(t, h)exp(-(t/eta*(1-h))^(beta*(1-h))
outer() would do that:
R <- outer(t, h, function(t, h)exp(-(t/eta*(1-h))^(beta
Dear Arne,
Thank you for your answer. However it doesn't solve my problem fully.
The problem is that I have much bigger data set than I sent to you (it was
only a small part : 874 obs.). My full data set is 546718 obs.
If I try to use censReg on full data set, then it still gives me the same
a
Gents,
I have the following loop:
for (i in (seq(along=Draw.1[,1]))) {print(i)} # from 1 - 5 (counter)
for (i in (seq(along=Draw.1[,1]))) {print(Draw[i,4])} # from the 1 - column
(passes parameter per column)
Now: I have multiple Draws [Draw.1 - Draw.100] in memory with different
"orders"
Quest
Hello all, I what to print the banner plot that is output from the mona
method in the cluster package but the problem is I dont want to print all
that red ink. Here is an example:
data(animals)
ma <- mona(animals)
ma
## Plot similar to Figure 10 in Struyf et al (1996)
plot(ma)
I can change the ba
The minimum achievable level of significance is defined asthe minimum of
Prob(Y=y) over all y's. If I have GLM with a treatment and replicate and I
would like to find out how to compute the minimum achievable level of
significance for that GLM in R
For example, how do I do this for the following d
The best approach is to put all those datasets into a list, then you can loop
through the elements of the list, or use lapply or sapply on the list.
If you insist on keeping them outside of a list, or need a loop to put them
into the list, then look at the 'get' function.
-Original Message-
Hello , I have estimated the following model, a sarima:
p=9
d=1
q=2
P=0
D=1
Q=1
S=12
In R 2.12.2
Call:
arima(x = xdata, order = c(p, d, q), seasonal = list(order = c(P, D, Q),
period = S),
optim.control = list(reltol = tol))
Coefficients:
ar1 ar2 ar3 ar4 ar5 ar
Hi,
I've been trying to use SVG in R using the function svg, but all my my
graphics end up with the text being very small to be point you can't even
see them. I've attached a screenshot of what the output for a histogram
looks like. Here is my code:
CairoSVG('file/location')
hist()
dev.off(
Perhaps the problem could be solved by playing with the pointsize argument
to CairoSVG or the various plotting parameters of hist().
More generally, this code:
R> library(CairoSVG)
R> CairoSVG()
R> hist(rpois(500,3))
R> dev.off()
produced an entirely acceptable SVG image on my computer so I can'
1 - 100 of 112 matches
Mail list logo