yes, this works, thank yo. very smart solution!
-R
> Date: Sat, 19 Jul 2008 19:55:58 -0400
> From: [EMAIL PROTECTED]
> To: [EMAIL PROTECTED]
> Subject: Re: [R] replicate matrix blocks different numbers of times into new
> matrix
> CC: r-help@r-project.org
On Fri, Jul 18, 2008 at 10:15 PM, Roland Rau <[EMAIL PROTECTED]> wrote:
> Spencer Graves wrote:
>>
>> I found the first chapter of Paul Dierckx (1993) Curve and Surface Fitting
>> with Splines (Oxford U. Pr.). Beyond that, I've learned a lot from the
>> 'fda' package and the two companion volumes
Fair enough. FOr a spline interpolation I can do the following:
> n <- 9
> x <- 1:n
> y <- rnorm(n)
> plot(x, y, main = paste("spline[fun](.) through", n, "points"))
> lines(spline(x, y))
Then look at the coefficients generated as:
> f <- splinefun(x, y)
> ls(envir = environment(f))
[1] "ties" "
The Ryacas package is an interface between
R and the computer algebra system, yacas.
It includes an R to yacas parser/translator and an
OpenMath/XML to R parser/translator.
See:
http://ryacas.googlecode.com
On Sat, Jul 19, 2008 at 11:03 PM, Stuart Nettleton
<[EMAIL PROTECTED]> wrote:
> Tolga,
> Y
Tolga,
Your issue seems to be a common one at present. While I am relatively new
to R (and would welcome being corrected), I haven't been able to find an
existing module to parse algebraic equations and build acyclic networks
(for the objective function and each constraint) to submit to solv
milicic.marko wrote:
Frank/Danial,
Thank you for very good discussion on this.
The reason I'm doing this is because is it common industrial practice
to group continous varible (say age) in couple of buckets while
developming scorecards to be used by business people. I don't see the
reason why I
Hi Jim,
Thank you for the response. Your suggestion will help me avoid the whole
text to number conversion process that I perform using LookUp in excel. I will
definitely give it a shot. But it still doesn't address the vector conversion
since a graph file is drawn only using the vectors. As
Will this do it:
> # determine the row numbers of each of the factors
> x.row <- split(seq(nrow(x)), x[,1])
> # process the data and replicate the rows
> result <- lapply(seq_along(x.row), function(.fact){
+ x[rep(x.row[[.fact]], n[.fact]),]
+ })
> do.call(rbind, result)
[,1] [,2]
[1,]
Actually not quite - my mistake, since I oversimplified the problem I have.
Here is a more realistic x matrix (plus some additional information):
# the data
x<-matrix(c(1,1,2,1,3,4),3,2)
# number of factors
n_f<-2
# number of rows taken by each factor
f_length <- c(2,1)
# number of repetition
Johannes Huesing wrote:
Frank E Harrell Jr <[EMAIL PROTECTED]> [Sat, Jul 19, 2008 at 08:03:01PM CEST]:
But even then
why condition on incomplete information when complete information is
available? I.e., why compute Pr(Y=1 | X>x) in place of Pr(Y=1 | X=x)?
Because regulatory bodies demand i
Frank E Harrell Jr <[EMAIL PROTECTED]> [Sat, Jul 19, 2008 at 08:03:01PM CEST]:
> But even then
> why condition on incomplete information when complete information is
> available? I.e., why compute Pr(Y=1 | X>x) in place of Pr(Y=1 | X=x)?
Because regulatory bodies demand it? Being employed in
Given that you have the data, exactly what are you expecting the
charts to look like? You mention vectors, but are you trying to
create a directed graph? It would be useful to show a small subset of
the data and then how you would expect to process it and what type of
graphs you would like to see
Dear R Users,
I am looking for some guidance on setting up an optimisation in R with
non-linear constraints.
Here is my simple problem:
- I have a function h(inputs) whose value I would like to maximise
- the 'inputs' are subject to lower and upper bounds
- however, I have some further constraints
Frank/Danial,
Thank you for very good discussion on this.
The reason I'm doing this is because is it common industrial practice
to group continous varible (say age) in couple of buckets while
developming scorecards to be used by business people. I don't see the
reason why I shouldn't discretize v
This particular case with a random intercept model can be handled by
glmmML, by bootstrapping the p-value.
Best, Göran
On Thu, Jul 17, 2008 at 1:29 PM, Douglas Bates <[EMAIL PROTECTED]> wrote:
> On Thu, Jul 17, 2008 at 2:50 AM, Rune Haubo <[EMAIL PROTECTED]> wrote:
>> 2008/7/16 Dimitris Rizopoulo
Dear all,
I have several sets of x-y-z points and I need to estimate the volume that
encompass all my points.
Recently I got some adivice to show the "convex hull" of my points using
geometry package (see code below).
But now I need to calculate the volume of my set of points.
Any advice are wellc
Hi Milton, I tried this and it worked.
But the block structure isn't right because when I try to plot this I still
get an error message
traps<-groupedData(mice~tree|plotID,outer=~time*fruit*veget|block,data=trap)
> plot(traps,outer=T)
I guess my question is should I try to fit a more simple group
Hi (sorry, I don´t got your name)
May be this help you.
trap$time<-factor(trap$time)
trap$block<-factor(trap$block)
All the best,
miltinho astronauta
brazil
On 7/19/08, hpdutra <[EMAIL PROTECTED]> wrote:
>
>
> Hi everyone. I am trying to add a formula to my data using the
> groupedData
>
Hi everyone. I am trying to add a formula to my data using the groupedData
function.
My experiment consists of randomized block design using fruits, vegetation
and time as factors. The idea is to see if fruits, vegetation and time
explain the abundance of mice. I am using tree density as a covar
Ralph S. wrote:
Hi,
I am trying to replicate blocks of a matrix (defined by factors) into another matrix, but an unequal, consecutive number of times for each factor.
I need to find an elegant and fast way to do this, so loops will not work.
An example of what I am trying to do is the follow
Christophe Genolini wrote:
Hi the list,
I do not understand what change in my configuration, but Sweave add
the code \201 before each special characters é è à ç ...
Does someone know when it come from ?
MULE (multilingal environment) in Emacs used to be prone to do this,
but I haven't seen
Hi,
I am trying to replicate blocks of a matrix (defined by factors) into another
matrix, but an unequal, consecutive number of times for each factor.
I need to find an elegant and fast way to do this, so loops will not work.
An example of what I am trying to do is the following:
# the data
Hi the list,
I do not understand what change in my configuration, but Sweave add the
code \201 before each special characters é è à ç ...
Does someone know when it come from ?
Thanks
Christophe
__
R-help@r-project.org mailing list
https://stat.ethz
Daniel Malter wrote:
True. Thanks for the clarification. Is your conclusion from that that the
findings in such case should only be interpreted in the specific context
(with the awareness that it does not apply to changing contexts) or that
such an approach should not be taken at all?
The latte
Dear Ted and Jim,
Many thanks.
Tolga
(Ted Harding) wrote:
On 19-Jul-08 10:29:43, Tolga Uzuner wrote:
Dear R Users,
I am attempting to place a title to a graph with multiple plots that
should go across the top of all the graphs, and not just one of them. I
am using mfrow in par to plot. Can
http://finzi.psych.upenn.edu/R/Rhelp02a/archive/99281.html
RSiteSearch("overall title")
On Sat, Jul 19, 2008 at 6:29 AM, Tolga Uzuner <[EMAIL PROTECTED]> wrote:
> Dear R Users,
> I am attempting to place a title to a graph with multiple plots that should
> go across the top of all the graphs, and
True. Thanks for the clarification. Is your conclusion from that that the
findings in such case should only be interpreted in the specific context
(with the awareness that it does not apply to changing contexts) or that
such an approach should not be taken at all?
Frank E Harrell Jr wrote:
>
>
On 19-Jul-08 10:29:43, Tolga Uzuner wrote:
> Dear R Users,
> I am attempting to place a title to a graph with multiple plots that
> should go across the top of all the graphs, and not just one of them. I
> am using mfrow in par to plot. Can anyone suggest if and how this could
> be done ?
> Thanks
Firstly thank you for answering so quickly. I hope I used the good
mailing list!
Secondly, I check that I make call to the 'randomize' function.
anyway, I will look more closely to the R source and also try
QueryPerformanceCounter.
Thirdly, maybe I will remove time machine for quasi rando
I am looking at data of the following structure:
n <- 100
dataset <- data.frame(gender=NULL,subject=NULL,outcome=NULL)
for (i in 1:n){
gender <- c(rep("m",5),rep("f",5))
subject <- letters[1:10]
outcome <- c(rbinom(5,1,0.6),rbinom(5,1,0.4))
dataset <- rbind(dataset,cbind(gender,sub
Dear R Users,
I am attempting to place a title to a graph with multiple plots that
should go across the top of all the graphs, and not just one of them. I
am using mfrow in par to plot. Can anyone suggest if and how this could
be done ?
Thanks in advance,
Tolga
___
On Sat, Jul 19, 2008 at 12:42 PM, stephen sefick <[EMAIL PROTECTED]> wrote:
> I can fix the par settings. I am new to function writing. I would like to
> use the na.method in the
> d<- (x-y)
>
> how?
>
> I don't know what a driver is sorry for my ignorance
1. As stated in the prior post its code
h <- structure(c(1L, 2L, 3L, 4L, NA, 6L, 7L, 8L, NA, 10L, 1L, NA,
8L, 7L, 6L, 5L, 4L, 3L, 2L, 1L), .Dim = c(10L, 2L), .Dimnames = list(
c("1", "2", "3", "4", "5", "6", "7", "8", "9", "10"), c("site1",
"site2")), index = c(1, 2, 3, 4, 5, 6, 7, 8, 9, 10), class = "zoo")
diff.temp <- function
I can fix the par settings. I am new to function writing. I would like to
use the na.method in the
d<- (x-y)
how?
I don't know what a driver is sorry for my ignorance
On Sat, Jul 19, 2008 at 12:36 PM, Gabor Grothendieck <
[EMAIL PROTECTED]> wrote:
> See ?paste and the collapse argument, in pa
Somehow the mail system garbled my last sentence.
It should read:
You want to call 'factor' on the result of the call to 'c'.
Pat
Patrick Burns wrote:
'c' does not have a method for factors. If you were
to try implementing one, you would probably quickly
figure out why not.
You want to call
See ?paste and the collapse argument, in particular:
plot(d, main = paste(paste(colnames(x), collapse = " "),
paste(colnames(y), collapse = " "), sep = " - "))
Also your function sets na.method but never uses it and leaves the par settings
changed afterwards. See ?par. It could also
#this is what I came up with
diff.temp <- function(x, a, b,use="pairwise.complete.obs")
{
library(zoo)
library(chron)
na.method <- pmatch(use, c("all.obs", "complete.obs",
"pairwise.complete.obs"))
par(mfrow=c(2,1))
f <- colnames(x)
d <- (x[,a]-x[,b])
plot(d, main= p
jim holtman wrote:
Is this what you want:
plot(0,main=expression(paste("test ", italic("italic"), " and more")))
On Sat, Jul 19, 2008 at 11:31 AM, Albin Blaschka
<[EMAIL PROTECTED]> wrote:
Dear List,
Is there a possibility to change the font-face for a part of the title of a
plot?
Hello
Daniel Malter wrote:
This time I agree with Rolf Turner. This sounds like homework. Whether or
not, type
?ifelse
in the R-prompt.
Frank is right, it leads to a loss in information. However, I think it
remains interpretable. Further, it is common practice in certain fields, and
I have to disa
#this is my little function that I would like to use the column names of the
x and y arguments in the function. I would like it to read
#site1-site2 how would I do this
diff.temp <- function(x, y ,use="pairwise.complete.obs")
{
na.method <- pmatch(use, c("all.obs", "complete.obs",
Or this which looks slightly better:
plot(1, type="l", xlab="Wellenlänge [nm]", col="darkslategray",
main = ~ Spektrum ~ italic("Deschampsia caespitosa"))
On Sat, Jul 19, 2008 at 11:56 AM, Gabor Grothendieck
<[EMAIL PROTECTED]> wrote:
> Try this:
>
> plot(1, type="l", xlab="Wellenlänge [nm
Is this what you want:
plot(0,main=expression(paste("test ", italic("italic"), " and more")))
On Sat, Jul 19, 2008 at 11:31 AM, Albin Blaschka
<[EMAIL PROTECTED]> wrote:
>
>
> Dear List,
>
> Is there a possibility to change the font-face for a part of the title of a
> plot?
>
> For example I ha
Try this:
plot(1, type="l", xlab="Wellenlänge [nm]", col="darkslategray",
main = ~ Spektrum ~ italic(Deschampsia ~ caespitosa))
On Sat, Jul 19, 2008 at 11:31 AM, Albin Blaschka
<[EMAIL PROTECTED]> wrote:
>
>
> Dear List,
>
> Is there a possibility to change the font-face for a part of the ti
Hi,
Is there a function to do principal factor analysis in R?
I am reading through ``A user's guide to principal components'' by J. E.
Jackson. In Table 17.1, a comparison between principal components and
common factors, and there is obvious difference between them. However, I
don't know how to g
Dear List,
Is there a possibility to change the font-face for a part of the title
of a plot?
For example I have the following...
plot(nirs, type="l", xlab="Wellenlänge [nm]", col="darkslategray",
main = "Spektrum Deschampsia caespitosa")
...and I would like to change the part of the tit
Em Sáb, 2008-07-19 às 11:07 -0300, Thiago Souza escreveu:
> Hi folks!
>
> I'm a beginner and I'm learning how to use R.
>
> I need to calculate the value of Simpson Diversity Index (*D*=1-Σ*pi*^2;
> where *p* is the relative abundance of the species* i*) of one sample (e.g.,
> diversity of bromel
'c' does not have a method for factors. If you were
to try implementing one, you would probably quickly
figure out why not.
You want to call 'call' factor on the result of the call
to 'c'.
Patrick Burns
[EMAIL PROTECTED]
+44 (0)20 8525 0696
http://www.burns-stat.com
(home of S Poetry and "A Gu
This time I agree with Rolf Turner. This sounds like homework. Whether or
not, type
?ifelse
in the R-prompt.
Frank is right, it leads to a loss in information. However, I think it
remains interpretable. Further, it is common practice in certain fields, and
it maybe a reasonable way to check whe
As others have mentioned, there is no "official" GUI for R under
Linux. I suggest you have a look at the "Related Projects" area of the
R Project web site, there is a link to a section devoted to GUIs.
I would personally recommend the Emacs + ESS combo as a powerful (if
not entirely intuiti
milicic.marko wrote:
Hi R helpers,
I'm preparing dataset to fir logistic regression model with lrm(). I
have various cointinous and discrete variables and I would like to:
1. Optimaly discretize continous variables (Optimaly means, maximizing
information value - IV for example)
This will res
Hi folks!
I'm a beginner and I'm learning how to use R.
I need to calculate the value of Simpson Diversity Index (*D*=1-Σ*pi*^2;
where *p* is the relative abundance of the species* i*) of one sample (e.g.,
diversity of bromeliad spiders) and test the significance of this value. For
this I'll nee
I have found that factor vectors are shy beasts.
Consider:
> empty <- factor(levels=c("eins", "zwei"))
> value <- factor("eins", levels=c("eins", "zwei"))
> c(empty, value)
[1] 1
> empty[1] <- value
> empty
[1] eins
Levels: eins zwei
>
I could not exactly predict this behaviour, but ?c says:
Hi R helpers,
I'm preparing dataset to fir logistic regression model with lrm(). I
have various cointinous and discrete variables and I would like to:
1. Optimaly discretize continous variables (Optimaly means, maximizing
information value - IV for example)
2. Regroup discrete variables to achie
It would seem that you can output the initial file from EXCEL, read it
into R with 'read.csv' and then use 'factor' to convert the characters
for City1 and City2 to the numbers that you want to use. Have you
tried this approach?
On Fri, Jul 18, 2008 at 3:51 PM, Senthil Purushothaman
<[EMAIL PROTE
François Aucoin wrote:
>
> Hey,
> I was wondering if there existed a R function similar to 'fsolve' or
> 'fzero' Matlab functions?
>
>
For a single function of one variable you can use uniroot.
Use ?uniroot in R to find out more.
You can also try general purpose optimisation algorithms such
On 18/07/2008 5:26 PM, Christophe Dutang wrote:
Hi all,
I'm currently implementing quasi random generation (torus) on R
(package randtoolbox available on CRAN). Even if it is not a great
idea, I decided to use the machine time to initiate the seed. So when
the seed is not specified by the
Hi Henning,
Henning Wildhagen wrote:
i tried your code, but it results in an error:
"error in var(x) : `x` is empty"
Do you have an idea what the reason might be?
If you ask questions on this list, please provide some code snippets,
which the others can copy and paste to reproduce your error
Nataraj biotech2.sastra.edu> writes:
>
> Dear list members,
>
> I have installed R in Ubuntu successfully but issuing
> command like R in terminal will able to see only the R
> working in command mode, the regular GUI which I use to
> have in my windows installation of R missing in linux..I am
You can't run the Windows GUI in Ubuntu (unless you run it in a Windows
virtual machine). Try installing rkward and using rkward for an alternative
(you will probably be pleasantly surprised):
sudo apt-get install rkward
rkward
http://rkward.sourceforge.net/
-Mose
On Fri, Jul 18, 2008 at 11:09
Buffer works on a 2D dataset like a matrix. Have a look at the examples
in ?buffer. But you probably will have to create a set of coordinaten of
the points you want to buffer.
HTH,
Thierry
ir. Thierry Onkelinx
Instit
Hi Jaap,
With all those packages loading it could take some time, unless it's a known
problem (?). Why don't you do a vanilla start (add switch --vanilla to
startup) and do some simple core-related stuff. Then add packages
one-by-one...
Or: search through the source code of the packages for the
Hi
I have installed the new version 2.7.1, and get the following messages. Is
there some way I can "fix it" ?
I use SciViews as well, so the problem may be with one of the libraries that is
loaded at start-up:
Start-up:
Loading required package: datasets
Loading required package: utils
Loading
Dear list members,
I have installed R in Ubuntu successfully but issuing
command like R in terminal will able to see only the R
working in command mode, the regular GUI which I use to
have in my windows installation of R missing in linux..I am
new to linux and so clueless how I can go about that a
63 matches
Mail list logo