Hi,
In order to use the mle2-function, one has to define the likelihood function
itself. As we know, the likelihood function is a sum of the logarithm of
probability density functions (pdf). I have implemented myself the pdfs
that I am using. My problem is, that the pdfs values are negative and I
> Thanks for the answers,
> but I'm looking for an editor like Tinn-R.
What about VM Fusion and continue to use Tinn-R then?
--
Regards,
Hans-Peter
PS: I use TextMate (and like it)
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/lis
Hi All,
It really comes down to a question of attitude: you either want to learn
something fundamental or core and so bootstrap yourself to a "better" place
(at least away from where you are), or you don't. As Marc said, Michal seems
to have erected a wall around his thinking.
I don't think it's
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 in Statis
Better approach than this brute force ?
mm <- NULL
for (i in dir(pattern="data")) { m <- readTable(i); mm <- cbind(mm, m[,4]) }
_
[[alternative HTML version deleted]]
__
R-help@
> "CG" == Christophe Genolini <[EMAIL PROTECTED]>
> on Tue, 22 Jul 2008 19:04:37 +0200 writes:
CG> Prof Brian Ripley <[EMAIL PROTECTED]> a écrit :
>> On Tue, 22 Jul 2008, [EMAIL PROTECTED] wrote:
>>
>>> Hi the list (well, half of the list, only the one who
>>> ar
Dear Megh,
You need to use the ggplot2 package instead of ggplot. Use the size
argument in geom_point() to get bigger circles. Have a look at Hadley's
website for more info (and examples) on ggplot2:
http://had.co.nz/ggplot2/
library(ggplot2)
library(mnormt)
Sigma = matrix(c(1, 0.6, 0.6, 1), 2,
Vicki Meng wrote:
--- On Tue, 7/22/08, Peter Dalgaard <[EMAIL PROTECTED]> wrote:
From: Peter Dalgaard <[EMAIL PROTECTED]>
Subject: Re: [R] F test
To: [EMAIL PROTECTED]
Cc: r-help@r-project.org
Date: Tuesday, July 22, 2008, 11:51 PM
Vicki Meng wrote:
Dear R users,
I need to do a F test on
Alessandro,
Have a look at the gstat package.
library(gstat)
demo(examples)
demo(krige)
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biomet
Sascha,
Have a look at ?krige in the gstat package.
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, methodologie en kwaliteitszorg /
Dear R users,
I use the glm() function to fit a generalized linear model with gamma
distribution function and log link.
I have read in the help page that the default method used by R is "glm.fit"
(iteratively reweighted least squares, IWLS).
Is it possible to use maximum likelihood method?
Than
Hi RichardP
I guess you'll increase your chances of a response if you include some
affiliation info. This could also avoid getting you confused with other people -
I thought for a minute I'd been sleep-emailing :-)
Cheers
A N Other RichardP
RichardP wrote:
hi,
I am using rpart with a cont
On Wed, Jul 23, 2008 at 4:54 AM, Michal J. Figurski
<[EMAIL PROTECTED]> wrote:
> Dear all,
>
> Since you guys are frank, let me be frank as well. I did not ask anyone to
> impose on me their point of view on bootstrap. It's my impression that this is
> what you guys are trying to do - that's sad. S
> Now I also want to generate two correlated variables where the error
> variance vary over the variable-correlation.
> And I want to plot this for showing heteroscedasticity.
>
> Like shown here:
> http://upload.wikimedia.org/wikipedia/de/1/1b/Heteroske2.png
>
> Is that possible with R?
>
of cour
Dear R-nautes,
I installed the 2.7.1 version of R and found it is not possible to modify
graphical parameters with par().
for example;
> par(mfrow=c(2,2))
Error in c(2, 2) : unused argument(s) (2)
> par$mfrow
NULL
Does any one know what is the cause of this problem?
Regards,
Fabio
--
Fabio S
Hi Fabio
Works OK for me.
> par(mfrow=c(2,2))
> par("mfrow")
[1] 2 2
>
But then I am using Windows ...
> sessionInfo()
R version 2.7.1 (2008-06-23)
i386-pc-mingw32
locale:
LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United
Kingdom.1252;LC_MONETARY=English_United
Kingdom.1252
Did you start R with --vanilla to check that this is not something you
have done? It is good practice, and I suspect will show you that you have
mis-diagosed this problem.
On Wed, 23 Jul 2008, Fabio Sanchez wrote:
Dear R-nautes,
I installed the 2.7.1 version of R and found it is not possibl
On Wed, 23 Jul 2008, silvia narduzzi wrote:
Dear R users,
I use the glm() function to fit a generalized linear model with gamma
distribution function and log link. I have read in the help page that
the default method used by R is "glm.fit" (iteratively reweighted least
squares, IWLS). Is it
Hi Fabio
Have you used the name "c" for something else? Try typing in "c" at the
command line, you should see something like:
> c
function (..., recursive = FALSE) .Primitive("c")
Regards
John
---
for example;
> par(mfrow=c(2,2))
Error in c(2, 2) : unused argument(s) (2)
> par$mfr
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 effici
Perhaps you have a function called 'par' in your workspace.
On Wed, Jul 23, 2008 at 6:56 AM, Fabio Sanchez <[EMAIL PROTECTED]> wrote:
> Dear R-nautes,
>
> I installed the 2.7.1 version of R and found it is not possible to modify
> graphical parameters with par().
>
> for example;
>
>> par(mfrow=
Senthil,
sending a 12Mb file to the list is not a good idea.
I've run the code in my previous email without any problem, so you need
to be a bit more specific about what went wrong for you.
This is what I get:
> library(igraph)
> tab <- read.csv("/tmp/Test.csv")
> dim(tab)
[1] 304711 2
> l
?bxp
This is the underlying routine called by boxplot and you can supply
your own values to the 5 that define a boxplot.
On Wed, Jul 23, 2008 at 2:24 AM, Fernando Marmolejo-Ramos
<[EMAIL PROTECTED]> wrote:
>
> Dear users
>
> This is a message I was directing to Harold Baize but because I pressed
Maybe:
sapply(lapply(dir(pattern="data"), read.table), '[[', 4)
On Wed, Jul 23, 2008 at 5:21 AM, Daren Tan <[EMAIL PROTECTED]> wrote:
>
> Better approach than this brute force ?
>
> mm <- NULL
> for (i in dir(pattern="data")) { m <- readTable(i); mm <- cbind(mm, m[,4]) }
> ___
Fabio Sanchez wrote:
Dear R-nautes,
I installed the 2.7.1 version of R and found it is not possible to modify
graphical parameters with par().
for example;
par(mfrow=c(2,2))
Error in c(2, 2) : unused argument(s) (2)
That's not an error from par(), it's an error from c(). I woul
On Tue, 2008-07-22 at 16:31 -0400, Jia Ying Mei wrote:
> Hi everyone,
>
> I am not new to R, but its been over a year since I've used it, so I
> don't remember how to do some things.
>
> I have a data set (in excel currently, but will be converted to text),
> that has date, country and price, w
On Tue, 8 Jul 2008, Duncan Murdoch wrote:
On 7/8/2008 10:53 AM, Sergi M.Garrido wrote:
Hello,
I have tried to create a package, and I have got it. I checked the files
and
I built the package. Nevertheless, I want a .pdf file with the package's
documentation. Anyone know what I have to do?
silvia narduzzi wrote:
Dear R users,
I use the glm() function to fit a generalized linear model with gamma
distribution function and log link.
I have read in the help page that the default method used by R is "glm.fit" (iteratively reweighted least squares, IWLS).
Is it possible to use maximum
simultron
On Wed, Jul 23, 2008 at 4:04 AM, Hans-Peter Suter <[EMAIL PROTECTED]> wrote:
> > Thanks for the answers,
> > but I'm looking for an editor like Tinn-R.
>
> What about VM Fusion and continue to use Tinn-R then?
>
> --
> Regards,
> Hans-Peter
>
> PS: I use TextMate (and like it)
>
> _
Thank you all,
I accidentally loaded a variable named "c".
All the best,
Fabio
On Wed, Jul 23, 2008 at 1:08 PM, Prof Brian Ripley <[EMAIL PROTECTED]>
wrote:
> Did you start R with --vanilla to check that this is not something you have
> done? It is good practice, and I suspect will show you t
Fabio Sanchez wrote:
Dear R-nautes,
I installed the 2.7.1 version of R and found it is not possible to modify
graphical parameters with par().
for example;
par(mfrow=c(2,2))
Error in c(2, 2) : unused argument(s) (2)
par$mfrow
NULL
Does any one know what is the cause of thi
It would be helpful if you included a sample of the data so that we
could understand what you would like to do with it (before/after
pictures).
?aggregate
On Tue, Jul 22, 2008 at 9:57 PM, Kaposi-Novak, Pal
<[EMAIL PROTECTED]> wrote:
> Hi,
>
> Could somebody tell me how I can average expression va
On Tue, 2008-07-22 at 16:18 -0400, [EMAIL PROTECTED] wrote:
> Hi,
>
> I have a CSV file with various biological reactions. Subscripts, superscripts,
> and italics are encoded in carats, and I was wondering if R can actually
> recognize those and print actual superscripts, etc. Here's an example:
>
Hello,
I am new to the RODBC package, but I have looked over the PDF as well as a few
websites that go over the SQL language. I can connect to my database fine using
>channel<-odbcConnect("Oracle ODBC")
# then am prompted to enter my user id and password
After that I'd like to use the odbcQuery
Hi R,
If
x=c(1,3,5)
y=c(2,4,6)
I need a vector which is c(1,2,3,4,5,6) from x and y.
How do I do it? I mean the best way
Thanks, Shubha
This e-mail may contain confidential and/or privileged i...{{dropped:13}}
__
R-help@r-proje
I think the argument supporting the use of bootstrap to determine
coefficients, as opposed to just running linear regression on the whole
dataset, is the comparison of Rsq and prediction errors between these
two approaches - page 1502. There's a substantial difference in favor of
the bootstrap app
If I understand:
sort(c(x,y))
or if you want combine the elements:
as.vector(mapply(c, x, y))
On Wed, Jul 23, 2008 at 9:54 AM, Shubha Vishwanath Karanth
<[EMAIL PROTECTED]> wrote:
> Hi R,
>
>
>
> If
>
> x=c(1,3,5)
>
> y=c(2,4,6)
>
>
>
> I need a vector which is c(1,2,3,4,5,6) from x and y.
>
Shubba
I'm confused. Your first post said the result should be c(1,2,3,4,5,6)
when x and y are combined. The code I sent does that. But here you say
your result should be c(4,1,2,5,2,3).
What do you want your result to actually be?
> -Original Message-
> From: Shubha Vishwanath Karanth
Thank you Gustaf,
I apologize for not including an example data in my first email.
Nevertheless, your code worked for me excellently - I only added "55" as
the size of sample.
I must admit this code looks so much simpler, compared to SAS. I am
beginning to love R, despite some disrespectful
Guess this should be fine
c(rbind(x,y))
Please let me know if there are some better ways...
Thanks, Shubha
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Shubha Vishwanath Karanth
Sent: Wednesday, July 23, 2008 6:25 PM
To: [EMAIL PROTECTED]
Subje
x <- c(1,3,5)
y <- c(2,4,6)
sort(c(x,y))
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On Behalf Of Shubha
> Vishwanath Karanth
> Sent: Wednesday, July 23, 2008 8:55 AM
> To: [EMAIL PROTECTED]
> Subject: [R] Simple... but...
>
> Hi R,
>
>
>
> If
>
>
Shubha Vishwanath Karanth wrote:
> Hi R,
>
>
>
> If
>
> x=c(1,3,5)
>
> y=c(2,4,6)
>
>
>
> I need a vector which is c(1,2,3,4,5,6) from x and y.
>
>
>
> How do I do it? I mean the best way
>
>
>
the absolutely best way is:
?c
vQ
__
R-hel
This thread may help
http://www.nabble.com/adding-the-mean-and-standard-deviation-to-boxplots-td15271398.html
--- On Wed, 7/23/08, Fernando Marmolejo-Ramos <[EMAIL PROTECTED]> wrote:
> From: Fernando Marmolejo-Ramos <[EMAIL PROTECTED]>
> Subject: Re: [R] adding the mean and standard deviation to
Z=NULL;for (i in 1:3) Z=c(Z,c(x[i],y[i]))
On Wed, Jul 23, 2008 at 8:54 AM, Shubha Vishwanath Karanth
<[EMAIL PROTECTED]> wrote:
> Hi R,
>
>
>
> If
>
> x=c(1,3,5)
>
> y=c(2,4,6)
>
>
>
> I need a vector which is c(1,2,3,4,5,6) from x and y.
>
>
>
> How do I do it? I mean the best way
>
>
>
> Th
OK,
Let x=c(4,2,2)
y=c(1,5,3)
My result should be c(4,1,2,5,2,3)
Thanks, Shubha
-Original Message-
From: Doran, Harold [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 23, 2008 6:47 PM
To: Shubha Vishwanath Karanth; [EMAIL PROTECTED]
Subject: RE: [R] Simple... but...
x <- c(1
This is definitely the best way:
c(lapply(1:length(x), function(i, x, y) c(x[i], y[i]), x, y),
recursive=TRUE)
JS
---
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Shubha Vishwanath Karanth
Sent: 23 July 2008 13:55
To: [EMAIL PROTECTED]
Sub
For a function that takes an argument as a list of lists of parameters,
I'd like to be able to convert that
to a data.frame and vice versa, but can't quite figure out how.
pats <- list(structure(list(shape = 0, shape.col = "black", shape.lty = 1,
cell.fill = "white", back.fill = "white", labe
How about this
as.vector(t(cbind(x,y)))
> -Original Message-
> From: Shubha Vishwanath Karanth [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, July 23, 2008 9:17 AM
> To: Doran, Harold; [EMAIL PROTECTED]
> Subject: RE: [R] Simple... but...
>
> OK,
>
> Let x=c(4,2,2)
> y=c(1,5,3)
>
It seems you have accidentally hit a surgeons' mailing list where all
you wanted was some advice how to use this scalpel on your body.
Sorry if we can't be of any help without intimidating you with
unrelated and pompous terms -- like coagulation.
Michal J. Figurski <[EMAIL PROTECTED]> [Wed, Jul 23
Something like sort(c(x, y)) should do the trick.
HTH,
Thierry
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, methodologie en kwaliteitszorg / Sec
G'day Shubha,
On Wed, 23 Jul 2008 18:24:49 +0530
"Shubha Vishwanath Karanth" <[EMAIL PROTECTED]> wrote:
> Hi R,
>
>
>
> If
>
> x=c(1,3,5)
>
> y=c(2,4,6)
>
>
>
> I need a vector which is c(1,2,3,4,5,6) from x and y.
>
>
>
> How do I do it? I mean the best way
R> as.vector(rbind
check the following:
x <- c(1,3,5)
y <- c(2,4,6)
c(t(cbind(x, y)))
c(matrix(c(x, y), 2, by = TRUE))
I hope it helps.
Best,
Dimitris
Dimitris Rizopoulos
Biostatistical Centre
School of Public Health
Catholic University of Leuven
Address: Kapucijnenvoer 35, Leuven, Belgium
Tel: +32/(0)16
You should at least start with higher-level functions like sqlFetch(). Oh,
and reading the posting guide (you show us no examples let alone error
message) and the tests.R examples file which comes with RODBC.
SQL syntax is DBMS-specific, so we can't comment on abstract examples (and
it is a lo
Hi Shubha,
Assuming you are after ordering by position in x and y (and not
values), how about
as.vector(t(cbind(x, y)))
HTH,
Jim Porzak
Responsys, Inc.
San Francisco, CA
http://www.linkedin.com/in/jimporzak
On Wed, Jul 23, 2008 at 5:54 AM, Shubha Vishwanath Karanth
<[EMAIL PROTECTED]> wrote:
>
> x <- c(1,3,5)
> y <- c(2,4,6)
> xy <- sort(c(x,y))
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
On Behalf Of Shubha Vishwanath Karanth
Sent: Wednesday, July 23, 2008 8:55 AM
To: [EMAIL PROTECTED]
Subject: [R] Simple... but...
Hi R,
If
x=c(1,3,5)
y=c(2,4,6)
On 23-Jul-08 12:54:49, Shubha Vishwanath Karanth wrote:
> Hi R,
> If
> x=c(1,3,5)
> y=c(2,4,6)
>
> I need a vector which is c(1,2,3,4,5,6) from x and y.
> How do I do it? I mean the best way
> Thanks, Shubha
Your query is ambiguous, in that it is not clear whether you want
a) The elements of
Try c(rbind(x, y))
On Wed, Jul 23, 2008 at 8:54 AM, Shubha Vishwanath Karanth
<[EMAIL PROTECTED]> wrote:
> Hi R,
>
>
>
> If
>
> x=c(1,3,5)
>
> y=c(2,4,6)
>
>
>
> I need a vector which is c(1,2,3,4,5,6) from x and y.
>
>
>
> How do I do it? I mean the best way
>
>
>
> Thanks, Shubha
>
>
>
> Thi
On Wed, Jul 23, 2008 at 3:23 PM, Doran, Harold <[EMAIL PROTECTED]> wrote:
> Shubba
>
> I'm confused. Your first post said the result should be c(1,2,3,4,5,6)
> when x and y are combined. The code I sent does that. But here you say
> your result should be c(4,1,2,5,2,3).
>
> What do you want your re
Doran, Harold air.org> writes:
>
> Shubba
>
> I'm confused. Your first post said the result should be c(1,2,3,4,5,6)
> when x and y are combined. The code I sent does that. But here you say
> your result should be c(4,1,2,5,2,3).
>
> What do you want your result to actually be?
>
I think
Shubha Vishwanath Karanth wrote:
> Hi R,
>
>
>
> If
>
> x=c(1,3,5)
>
> y=c(2,4,6)
>
>
>
> I need a vector which is c(1,2,3,4,5,6) from x and y.
>
>
>
> How do I do it? I mean the best way
>
>
... but seriously, rbind(x,y)[1:6] is one concise way to do it (x and y
are bound into rows i
Megan J Bellamy schrieb:
> After that I'd like to use the odbcQuery function and the SQL statement:
>
> SELECT * FROM table_name WHERE SAMPLE_YEA LIKE "1965%"
> According to the RODBC PDF, the odbcQuery command should accept any
valid SQL statement. Is there something wrong with my syntax? I have
Hi R,
Let,
x=1:80
I want to sum up first 8 elements of x, then again next 8 elements of x,
then again another 8 elements. So, my new vector should look like:
c(36,100,164,228,292,356,420,484,548,612)
I used:
aggregate(x,list(rep(1:10,each=8)),sum)[-1]
or
rowsum(x,group=r
The easiest way to do with this ggplot2 is to melt your data first:
dfm <- melt(df, id = "date", measure = c("theta","vega","delta"))
qplot(date, value, data=dfm, geom="line", colour = variable)
Hadley
On Tue, Jul 22, 2008 at 6:05 PM, R_Learner <[EMAIL PROTECTED]> wrote:
>
> Hi,
> I'm trying to
Firas Swidan gmail.com> writes:
>
> Hi,
>
> I am having difficulties in finding ways to analyse scatter plots and
> quantitatively differentiate between them.
Try quantile regression, implemented in Roger Koenker's quantreg
package. There's a very thorough vignette (library(quantreg); vig
On Wed, Jul 23, 2008 at 3:14 PM, Michal Figurski
<[EMAIL PROTECTED]> wrote:
> I think the argument supporting the use of bootstrap to determine
> coefficients, as opposed to just running linear regression on the whole
> dataset, is the comparison of Rsq and prediction errors between these
> two app
On Wed, 23 Jul 2008, Shubha Vishwanath Karanth wrote:
If
x=c(1,3,5)
y=c(2,4,6)
I need a vector which is c(1,2,3,4,5,6) from x and y.
I am assuming that you want to interleave the vectors, but that is not the
only algorithm giving that result.
How do I do it? I mean the best way
as.
Thank you very much. As for the second part, for every price change, the
percentage of every price change can be calculated (i.e. amount of
change divided by previous price). I was looking for a way to merely
find the mean and median of all price change percentages for each
country. I don't kno
it's clear, he wants to combine x and y s that the result is (x[1],
y[1], x[2], y[2], ...), unless i am confused as well ;)
now, both rbind(x,y)[1:length(x)] and as.vector(mapply(c,x,y)) do the
job, but the former is *much* faster:
t1 = function(n) as.vector(mapply(c, 1:n, 1:n))
t2 = function(n)
Not very elegant but seems to work:
pats.df <- as.data.frame(t(sapply (1:length(pats), function (i)
do.call(cbind,pats[[i]]
colnames(pats.df) <- names(pats[[1]])
# then
pats2 <- lapply (1:nrow(pats.df), function (i) as.list(t(pats.df)[,i]))
Nael
On Wed, Jul 23, 2008 at 3:23 PM, Michael Frie
I thinks this is the solution that you want!
as.vector(matrix(c(x,y),byrow=T,ncol=3))
-Mensagem original-
De: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
nome de Wacek Kusnierczyk
Enviada em: quarta-feira, 23 de julho de 2008 10:25
Para: R help
Assunto: Re: [R] Simple... but...
Shubha V
john seers (IFR) wrote:
>
>
>
>
> This is definitely the best way:
>
> c(lapply(1:length(x), function(i, x, y) c(x[i], y[i]), x, y),
> recursive=TRUE)
>
>
>
you'd better test it yourself; it simply won't do the job -- you get a
list of vectors, no?
(hint: replace the initial 'c' with 'unlis
On Wed, Jul 23, 2008 at 4:08 PM, Michal Figurski
<[EMAIL PROTECTED]> wrote:
> Gustaf,
>
> I am sorry, but I don't get the point. Let's just focus on predictive
> performance from the cited passage, that is the number of values predicted
> within 15% of the original value.
> So, the predictive perfo
Try this:
pats.df <- do.call(rbind, pats)
On Wed, Jul 23, 2008 at 10:23 AM, Michael Friendly <[EMAIL PROTECTED]> wrote:
> For a function that takes an argument as a list of lists of parameters, I'd
> like to be able to convert that
> to a data.frame and vice versa, but can't quite figure out how.
Hi Shubha,
Is this what you want?
x=c(4,2,2)
y=c(1,5,3)
c(rbind(x,y))
[1] 4 1 2 5 2 3
HTH,
Jorge
On Wed, Jul 23, 2008 at 9:17 AM, Shubha Vishwanath Karanth <
[EMAIL PROTECTED]> wrote:
> OK,
>
> Let x=c(4,2,2)
>y=c(1,5,3)
>
> My result should be c(4,1,2,5,2,3)
>
> Thanks, Shubha
>
on 07/23/2008 08:23 AM Michael Friendly wrote:
For a function that takes an argument as a list of lists of parameters,
I'd like to be able to convert that
to a data.frame and vice versa, but can't quite figure out how.
pats <- list(structure(list(shape = 0, shape.col = "black", shape.lty = 1,
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 2
Many Thanks Jorge... That was one more way...Is it possible if I can do
this without using rep(1:10,each=8) or the groupingbecause I feel
the number 8 here is fixed... If there is some technique of tracking the
position of first 8, then next 8... don't know whether I am clear in
conveying...
Michael Friendly yorku.ca> writes:
>
> For a function that takes an argument as a list of lists of parameters,
> I'd like to be able to convert that
> to a data.frame and vice versa, but can't quite figure out how.
>
[snip data]
pats.df <- do.call("rbind",pats)
pats2 <- apply(pats.df,1,
on 07/23/2008 09:03 AM Shubha Vishwanath Karanth wrote:
Hi R,
Let,
x=1:80
I want to sum up first 8 elements of x, then again next 8 elements of x,
then again another 8 elements. So, my new vector should look like:
c(36,100,164,228,292,356,420,484,548,612)
I used:
a
> x=1:80
>
> I want to sum up first 8 elements of x, then again next 8 elements of x,
> then again another 8 elements. So, my new vector should look like:
>
> c(36,100,164,228,292,356,420,484,548,612)
>
> I used:
>
> aggregate(x,list(rep(1:10,each=8)),sum)[-1]
>
> or
>
> rowsum(x,group=r
Dear Shubha,
Try this:
x=1:80
tapply(x,rep(1:10,each=8),sum)
1 2 3 4 5 6 7 8 9 10
36 100 164 228 292 356 420 484 548 612
HTH,
Jorge
On Wed, Jul 23, 2008 at 10:03 AM, Shubha Vishwanath Karanth <
[EMAIL PROTECTED]> wrote:
> Hi R,
>
>
>
> Let,
>
>
>
> x=1:80
>
>
>
> I want to
Hi all,
Again I have searched the net and so on, without finding an answer to this
surely simple problem. A short bit of code would be appreciated.
I have a object named `data' with the following column headings.
Date, maxitemp, minitemp, admissions, d.o.w.
Where d.o.w. is day of the week,
At 7:33 PM +0530 7/23/08, Shubha Vishwanath Karanth wrote:
Hi R,
Let,
x=1:80
I want to sum up first 8 elements of x, then again next 8 elements of x,
then again another 8 elements. So, my new vector should look like:
c(36,100,164,228,292,356,420,484,548,612)
I used:
aggregate(x,list(rep(1:10
Maybe:
tapply(x, gl(10, 8), sum)
or
unlist(lapply(split(x, gl(10, 8)), sum))
On Wed, Jul 23, 2008 at 11:03 AM, Shubha Vishwanath Karanth
<[EMAIL PROTECTED]> wrote:
> Hi R,
>
>
>
> Let,
>
>
>
> x=1:80
>
>
>
> I want to sum up first 8 elements of x, then again next 8 elements of x,
> then again a
Have u checked skewness of data?
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On
Behalf Of Firas Swidan
Sent: 23 July 2008 18:38
To: r-help@r-project.org
Subject: [R] Quantitative analysis of non-standard scatter plots.
Hi,
I am having difficulties in finding ways
Dear Michael,
Perhaps,
data.frame(do.call(rbind,lapply(pats,function(x) t(as.matrix(x,ncol=10)
HTH,
Jorge
On Wed, Jul 23, 2008 at 9:23 AM, Michael Friendly <[EMAIL PROTECTED]> wrote:
> For a function that takes an argument as a list of lists of parameters, I'd
> like to be able to conv
On Wed, Jul 23, 2008 at 4:03 PM, Shubha Vishwanath Karanth
<[EMAIL PROTECTED]> wrote:
> Hi R,
>
>
>
> Let,
>
>
>
> x=1:80
>
>
>
> I want to sum up first 8 elements of x, then again next 8 elements of x,
> then again another 8 elements. So, my new vector should look like:
>
> c(36,100,164,228,29
Hello all,
I have been using R's time series capabilities to perform analysis for quite
some time now and I am having some questions regarding its reliability. In
several cases I have had substantial disagreement between R and other packages
(such as gretl and the commercial EViews package).
I
on 07/23/2008 09:42 AM Henrique Dallazuanna wrote:
Try this:
pats.df <- do.call(rbind, pats)
Henrique,
Take note of the object that results from this:
> do.call(rbind, pats)
shape shape.col shape.lty cell.fill back.fill label label.size
[1,] 0 "black" 1 "white" "white"
Hi, I have a huge data set to deal with. Sometimes I got warning message
about limitation of memory, sometimes R reads in the data but it is very
slow.
My question is, is there anything I can do to lift the memory limitation (I
did memory.limit(4095), anything else I can do?). I know I can also
Oh, you are rigth Marc, thanks.
Another option is:
pats.df <- do.call(rbind.data.frame, pats)
On Wed, Jul 23, 2008 at 1:10 PM, Marc Schwartz
<[EMAIL PROTECTED]> wrote:
> on 07/23/2008 09:42 AM Henrique Dallazuanna wrote:
>>
>> Try this:
>>
>> pats.df <- do.call(rbind, pats)
>
> Henrique,
>
> Tak
I have written some programs in Common Lisp and I have been using SAS to pipe
those programs to my lisp compiler in batch mode by using the %xlog and
%xlst SAS commands. I wonder if there is in R a similar way to pipe commands
to LISP so that all my work would be concentrated in R even when I have
Dear R-users,
It is my understanding that cat(shQuote(a.string)) should print the origintal
a.string. Is this right?
I am not sure cat() correctly prints strings which are generated by
triple-shQuote():
> shQuote(shQuote("a"))
[1] "\"\\\"a\\\"\""
> cat(shQuote(shQuote(shQuote("a"))), '\n')
"\"\
Hi,
I am using an if else statement inside a function …. If I use that function I
have no problems …. If I use the function with the if else statement inside a
second function I get the following waring:
Warning message:
In if (pval == 0) p_value <- "< 2.2e-16" else p_value <- pval :
the con
Thank you all for your words of wisdom.
I start getting into what you mean by bootstrap. Not surprisingly, it
seems to be something else than I do. The bootstrap is a tool, and I
would rather compare it to a hammer than to a gun. People say that
hammer is for driving nails. This situation is a
Dear Patrizio and all,
Do you know a similar approach to this, so that *any* function is sequentially
applied on a matrix?
Particularly, instead of wanting to sum columns every 8 rows, how could we
apply a linear regression to the columns of a matrix every 8 rows?
ie, if we have a matrix say of
Hello,
I have a problem to flip a 200x200 matrix, which is imported by a .asc file.
I want to flip the matrix like in a created example below:
> b <- matrix(1:9,3,3,byrow=T)
> b
[,1] [,2] [,3]
[1,]123
[2,]456
[3,]789
> b1 <- apply(t(b),1,rev)
> b1
You would have something that looks like this:
if (data$d.o.w == "Sat") data$admission <- round(data$admission * 1.21)
if (data$d.o.w == "Sun") ...
On Wed, Jul 23, 2008 at 11:44 AM, Robin Williams <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> Again I have searched the net and so on, without find
My fingers slipped on the keyboard. Here what they intended to write.
This sets up a list of the data and the matches on a subset for
processing
days <- list(list("Sat", 1.21), list("Sun", 1.22), list("Mon", 0.91))
for (i in days){
.subset <- data$d.o.w == i[[1]] # subset of data that matc
1 - 100 of 176 matches
Mail list logo