simple and totally obvious thing, but I just do not get it. :-(
Could you please help me understand? How do I do it in MATLAB or R?
THanks in advance!
--
Jonas Malmros
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE d
ogram the double loop part now that OVal is used
within the function itself?
It is pretty easy to write for loops, but it is very hard to write
computationally optimal code. :-( Could you please help me with the
above one, if possible?
--
Jonas Malmros
Stockholm University
Stockhol
x(0, nrow=n+1, ncol=n+1)
for( i in 0:n){
for(j in 0:i){
Val[j+1, i+1] <- u^j*d^(i-j)
}
}
Thank you in advance!
--
Jonas Malmros
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the p
s):
>
> > coef(lm(y~poly(x,3,raw=TRUE)))
> (Intercept) poly(x, 3, raw = TRUE)1 poly(x, 3, raw = TRUE)2
> -774.258364 472.172611 -91.633939
> poly(x, 3, raw = TRUE)3
>5.800653
>
> And there's your coefficients. See he
I wonder how one in R can fit a 3rd degree polynomial to some data?
Say the data is:
y <- c(15.51, 12.44, 31.5, 21.5, 17.89, 27.09, 15.02, 13.43, 18.18, 11.32)
x <- seq(3.75, 6, 0.25)
And resulting degrees of polynomial are:
5.8007 -91.6339 472.1726 -774.2584
THanks in advance!
--
Hi, everyone
I wonder if there is a function in R with which I can create a square
matrix with elements off main diagonal (for example one diagonal below
the main diagonal).
Thanks in advance!
--
Jonas Malmros
Stockholm University
Stockholm, Sweden
side-down without loading matlab
package.
Thanks for your help in advance!
Best,
JM
--
Jonas Malmros
Stockholm University
Stockholm, Sweden
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the postin
t; are 1997:
for(i in 1:dim(database)[1]){
if(database$year[i]>90) {
database$Year[i] <- as.numeric(database$year[i])+1900 } else {
database$Year[i] <- as.numeric(database$year[i])+2000
}
}
Thanks in advance for explanations.
Regards,
JM
--
Jonas Malmros
Stockholm
Dear Charilaos,
Thanks, I see what you mean, but I just simplified the real code here
and I made a mistake by putting +2, it is +1. :-)
JM
On Dec 17, 2007 8:02 PM, Charilaos Skiadas <[EMAIL PROTECTED]> wrote:
> On Dec 17, 2007, at 1:47 PM, Jonas Malmros wrote:
>
> >
Obviously, A cannot assign a row name because the dimensions do not
agree. I can use rownames(vector) <- x$Name[1] though.
then things get calculated (I saw it with browser()) but rbind does
not do what I want it to do, "results" remains numeric().
why?
--
Jonas Malmros
Stockho
Thanks Gabor!
On Dec 17, 2007 3:22 PM, Gabor Csardi <[EMAIL PROTECTED]> wrote:
> paste(rep(c("Factor", "Sign Factor"), 5), rep(1:5, each=2))
>
> Replace '5' with the desired number,
> Gabor
>
>
> On Mon, Dec 17, 2007 at 03:08:09PM +0100, J
t :
"Error in dimnames(x) <- dn :
length of 'dimnames' [1] not equal to array extent"
I used browser() and I see that the Name is not assigned to the row
name of vector and then dim(x)[1] does not work.
What am I doing wrong? Do not understand. :-(
Thank you in advance f
Factor 3"
"Sign Factor 3"
How can I automate the creation of such a mixed vector? I tried with
rep but did not succeed.
Could someone please suggest a solution to this problem?
Thanks in advance!
Regards,
JM
--
Jonas Malmros
Stockholm University
Stockholm, Sweden
_
adjustments. I am new to R, I do write code but
usually it consists of for-functions and plotting. I would much
appreciate your help.
Thank you in advance!
--
Jonas Malmros
Stockholm University
Stockholm, Sweden
__
R-help@r-project.org mailing list
https
rwidth(object, cex = cex) : font width unknown for character 0x9
4: In text.default(x = xpos, y = ypos, labels = object, adj = c(0, :
font width unknown for character 0x9
5: In text.default(x = xpos, y = ypos, labels = object, adj = c(0, :
font width unknown for character 0x9
in PDF everyth
gt;
> There are two simple solutions. First, avoid using characters R
> can't figure out sizes for (i.e. tab), or manually specify the font
> size so textplot() doesn't attempt to optimize it.
>
> I personally choose the former, avoid tab characters, since the
> app
t;, :
font width unknown for character 0x9
6: In strwidth(object, cex = cex) : font width unknown for character 0x9
7: In text.default(x = xpos, y = ypos, labels = object, adj = c(0, :
font width unknown for character 0x9
8: In text.default(x = xpos, y = ypos, labels = object, adj = c(0, :
font
what :: is and where can I read more about this
> > function?
>
> > help("::")
>
> --
> Regards,
> Hans-Peter
--
Jonas Malmros
Stockholm University
Stockholm, Sweden
__
R-help@r-project.org mailing list
https://stat.ethz.ch/ma
n dev.copy(dev.cur(), which = dev.prev()) :
cannot supply 'which' and 'device' at the same time
and when I close off the devices, my PDF file contains only barplots
and histograms.
Could someone please instruct me?
Thank you in advance for your time and help.
--
Jonas Malmros
t this
function?
Thank you very much in advance for your time and help!
--
Jonas Malmros
Stockholm University
Stockholm, Sweden
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://ww
proceed to fit glm with Student t?
I know that Student t is the Inverse Gamma with shape parameter equal
to degrees of freedom (=4). Would it be correct then to specify Gamma
family and inverse link in the glm function?
Thank you for your help.
Jonas M.
University of Stockholm
--
Jonas Malmros
21 matches
Mail list logo