Try this:
> # Taken from combinations(gtools)
> # library(gregmisc)
> # Function permutations
> fn_perm_list <-
+ function (n, r, v = 1:n)
+ {
+if (r == 1)
+ matrix(v, n, 1)
+else if (n == 1)
+ matrix(v, 1, r)
+else {
+ X <- NULL
+ for (i in 1:n) X <- rbind(X, c
Hi. Does anyone know of a function which will take as input a number n (or a
set of n letters) and will give out, one at a time, the permutations of n
(or of those n letters) as a vector?
So that I can use the permutations one at a time. And such that it will
exhaust all the permutations with no r
Dear all,
I have been using normalize.loess and I get the following error
message when my matrix contains NA values:
> my.mat = matrix(nrow=100, ncol=4, runif(400) )
> my.mat[1,1]=NA
> my.mat.n = normalize.loess(my.mat, verbose=TRUE)
Done with 1 vs 2 in iteration 1
Done with 1 vs 3 in iteration 1
On Fri, Mar 13, 2009 at 12:17 PM, Duncan Murdoch wrote:
> On 3/13/2009 12:07 PM, Ptit_Bleu wrote:
>>
>> Thanks Dieter for the link.
>
> You can use \includegraphics explicitly yourself, and avoid the automatic
> code generated by Sweave. For example,
>
> <>=
> curve(f, from = 1, to = 5)
> @
>
>
Hi fellow R-users,
I am (attempting) to take a formula object, and convert it into a
function which I can feed into optim. Basically, I have several
functions that fit the formula object to data, and analyze the
results. The next step would be to combine the fitting function
coefficient results
On Fri, Mar 13, 2009 at 6:28 PM, Lars Bishop wrote:
> Dear All,
>
> I need to write 'n' functions on 'm' variables. The functions should be
> constructed according to the values of an (nxm) matrix of '1/0' values as
> follows. For example,
>
> if row1 is equal to ,say [1 0 ...0 0] then f1 <-
Dear All,
I need to write 'n' functions on 'm' variables. The functions should be
constructed according to the values of an (nxm) matrix of '1/0' values as
follows. For example,
if row1 is equal to ,say [1 0 ...0 0] then f1 <- (1+x1)
if row 2 is equal to, say [1 1 1 0...0 1] then f2
<-(1+x1)
use sprintf:
> sprintf("%04d",15)
[1] "0015"
On Fri, Mar 13, 2009 at 6:17 PM, Jonathan Greenberg
wrote:
> I have a numerical vector which contains a (poorly) formatted time column,
> which, in theory, should be HHMM, but was distributed as an integer, so, for
> 12:15 am, it is saved as "15" (e.
If you want zero if only one variable:
> DF2
sid pid slope
1 1.1 1.1 2
2 1.1 4.1 3
3 1.1 5.1 2
4 2.1 5.1 3
5 3.2 1.2 2
6 3.2 1.7 3
> tapply(DF2$slope, DF2$sid, function(x) if(length(x) == 1) 0 else mean(x))
1.1 2.1 3.2
2.33 0.00 2.50
>
On Fri,
DF2 <- read.table(textConnection("sidpidslope
+ 1.11.12
+ 1.14.13
+ 1.15.12
+ 2.15.13
+ 3.21.22
+ 3.21.73"), header = TRUE)
> tapply(DF2$slope, as.factor(DF2$pid), mean)
1.1 1.2 1.7 4.
If you have a function that just works on one item at a time then
sapply will cure that hormonal deficiency. It will even let you
forward arguments to ... if such are allowed:
> sapply(vec, "+", 1)
[1] 2 3 4 5 6
> vec
[1] 1 2 3 4 5
> sapply(vec, "+", 1)
[1] 2 3 4 5 6
--
David Winsemius, MD
Hi,
I was hoping someone could help figure out how to write code for R to do the
below.
I have data that looks like below. Variables, sid and pid are strings, slope is
numeric. I need R to get me the mean of slopes for all pid's nested within each
sid if there are more than one pid's nested wi
I'm on a Windows XP student's computer. When we get busy and start
running R stuff, it hangs at random with the hour glass showing, but
the system's cpu is not running at 100%. We sit and watch for a
while, and then try alt-ctl-delete to kill the not responding program.
In this case, I'm able to
I have a numerical vector which contains a (poorly) formatted time
column, which, in theory, should be HHMM, but was distributed as an
integer, so, for 12:15 am, it is saved as "15" (e.g. HHMM = 0015 with
the zeroes stripped). I'm trying to use this in conjunction with
strptime, but I'm thinki
This is a simple question, but I'm going on the supposition that the
only stupid question is the one not asked.
1. I have many sets of 5 proportions that are different from each
other (prop.test), and want to know which proportions are different
from each other. In other words, I want the equiva
I don't know why sprintf does not work for you. Here is something
close; you will have to work on the spacing but the formating in
sprintf lets you specify the field size:
> sprintf("%2s %-20s%6d%14.5f", "7", "WORD", 5550, 3.14158)
[1] " 7 WORD 5550 3.14158"
>
On Fri, Mar
Am I correct in thinking that you actually want a function that will
take the three row matrix
Ystart <- matrix(c(1:3, 34,-56,27), ncol=2) and return the 4 column
matrix offered?
As it is I see no way that we could know what rule you wanted to apply
to that four row X matrix to get the 9
Hi everyone! I am a biologist from Argentina and have to solve this problem.
I have an insect population obtained from 10 different nests and need to
know its sex ratio. But as I cannot ensure insects independence I need to
run a model where I can include the variable nest as with a random effect
Without data it is a bit difficult. However, you may want to check out the
following:
library(prob)
That is from:
http://finzi.psych.upenn.edu/R/R-devel/archive/26683.html
It allows you to diff the data.frames, so you can see what is missing.
This should allow you to find out what rows are
Within R I need to reformat my data so that the output looks like the following:
" 7 WORDS 5550 3.14159 -6. 6."
Previous folks were doing this by hand, but I would like to have a formula do
it.
That is,
(a) 7 (place holder) on second column, then a spac
2009/3/13 jatwood :
> Good Afternoon
> I have noticed results similar to the following several times as I have used
> R over the past several years.
> My .csv file has a header row and 3073 rows of data.
>
>> rskreg<-read.table('D:/data/riskregions.csv',header=T,sep=",")
>> dim(rskreg)
> [1] 2722
Good Afternoon
I have noticed results similar to the following several times as I
have used R over the past several years.
My .csv file has a header row and 3073 rows of data.
> rskreg<-read.table('D:/data/riskregions.csv',header=T,sep=",")
> dim(rskreg)
[1] 2722 13
> rskreg<-read.csv('D:/dat
That might be done by splitting the string into the portion before
dtest, the portion from dtest to the number but not including it,
the number and the rest. The s<- line splits it up into a list and
the next line reforms it into a character matrix replacing NULL
list items with NA:
> library(gsub
Gabor Grothendieck wrote:
> There is aaply in the plyer package that does not
> require a transpose:
>
> aaply(test, 1, sort)
>
what about a yaaply?
vQ
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read
Hello,
I have a matrix such as
> X = matrix(c(1:4,29,32,56,-45), ncol=2)
and I want one like
> Y=matrix(c(
1 , 34 , 1 , 34 ,
2 , -56 , 1 , 34 ,
3 , 27 , 1 , 34 ,
1 , 34 , 2 , -56 ,
2 , -56 , 2 , -56 ,
3 , 27 , 2 , -56 ,
1 , 34 , 3 , 27 ,
2 , -56 , 3 , 27 ,
3 , 27 , 3 , 27 ), ncol=4, byrow=T)
Ho
Just a word of caution. Having done a lot of work with 24 hour blood
pressure and ecg recordings, these series are seldom stationary which
presents problems with spectral analysis. I don't know what your ultimate
goal is, but in my work I found it often better to work with subsets, of the
serie
Mark Wilkinson gmail.com> writes:
> I'm using panel.polygon inside a custom panel function to generate
> filled polygons for an xyplot. Everything is as expected until I
> specify a value < 1 for alpha to fill with a semi-transparent color
> and output to pdf. The plot symbols appear malformed.
It seems almost too simple. Check to see if stripchart has an add= or
other argument that lets you overlay charts. It does, so try this:
boxplot(x$earned ~ x$movie)
stripchart(x$earned ~ x$movie, vertical=T,data=x, method="jitter",
add=TRUE, pch=19)
--
David Winsemius
On Mar 13, 2009, at
Hi,
I'm using panel.polygon inside a custom panel function to generate
filled polygons for an xyplot. Everything is as expected until I
specify a value < 1 for alpha to fill with a semi-transparent color
and output to pdf. The plot symbols appear malformed. Am I doing
something wrong here?
Tha
hello,
I would like to obtain a coefficient correlation between residuals and their
expected value. in order to do that I need to run a z.test but non of the
command available do not work, Im using z.score(x) or scores(x, type=z)
commands . my R version is R 2.8.1 GUI 1.27 Tiger build 32-bit (5
That works. I want the position just for the purpose of my later manual check.
Thanks a lot Gabor.
-Original Message-
From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com]
Sent: Friday, March 13, 2009 2:18 PM
To: Tan, Richard
Cc: r-help@r-project.org
Subject: Re: [R] search for str
Have you done any homework. help.search() or ... spectrum will
produce a spectrum and fft is the underlying function.
On Fri, Mar 13, 2009 at 2:46 PM, Vittorio Colagrande
wrote:
> Dear R-help members,
>
> To whom it may concern, our research group is conducting a study to evaluate
> the predic
Hi,
I have a data.frame of this kind:
x
obs movie earned rating
1P1 3.2xx
2P1 4.2xx
3P1 5.2xx
4P1 6.2xx
5P2 3.5xx
6P2 6.5xx
7P2 7.5xx
8P2 4.5xx
9P2 4.5xx
10 P3 4.8
There is aaply in the plyer package that does not
require a transpose:
aaply(test, 1, sort)
On Fri, Mar 13, 2009 at 11:14 AM, Kevski wrote:
>
> Oh, this seemed so simple (and I'm sure the answer will be, as usual, so
> thanks in advance for enlightening me). I need to sort each row of a matrix
>
David Winsemius wrote:
>> Now I just need the resulting matrix:
>> 2 8 9
>> 4 6 7
>> 1 3 5
>
>
>
>
> On Mar 13, 2009, at 1:26 PM, Wacek Kusnierczyk wrote:
>
>> Kevski wrote:
>>> Oh, this seemed so simple (and I'm sure the answer will be, as
>>> usual, so
>>> thanks in advance for enlightening me).
Debabrata Midya commerce.nsw.gov.au> writes:
> 2. Is there any possibility to have a copy of Windows binary of
> DPpackage in the near future in the site http://www.cran.r-project.org/?
>
I contacted Alejandro (now Conception/Chile), and he will upload a new
version this weekend, with his
Hi Friends,
I'm trying to model the consumer decisions (Click-Through Rate and
Conversion) in Search Engine Advertising using a hierarchical Bayesian
binary logit. The input data is the weekly CTRs and Avg. Position for each
search keyword.
CTR is modeled as (for each keyword i and week j):
Pij =
Dear R-help members,
To whom it may concern, our research group is conducting a study to evaluate
the predictive
value of 24 hour blood pressure variability.
We are looking for an R routine that performs a fast Fourier transform spectral
analysis
(with an output of the approximation function o
Thanks for the reply. I'll look into this.
Chris
On Mar 13, 2009, at 8:31 AM, hadley wickham wrote:
On Thu, Mar 12, 2009 at 5:37 PM, Christopher David Desjardins
wrote:
I get the following error when I run qplot()
qplot(grade, read,data = hhm.long.m, geom = c("point", "smooth"))
Error in sm
In discrete math, first differences are the analogues of first
derivatives and second differences are the analogues of second
derivatives. (I thought I learned this in Knuth, vol 1 25 years ago,
but I cannot find it, so maybe it was in some the time series stuff I
read 20 years ago). So a
Try this. We use regexpr to get the positions and
strapply puts the values in list s. The unlist statement
converts NULL to NA and simplifies the list, s, to a
numeric vector. For more info on strapply see
http://gsubfn.googlecode.com
library(gsubfn) # strapply
x <- c"test1", "bcdtestblabla2.
On Wed, Mar 11, 2009 at 11:49 PM, Sundar Dorai-Raj wrote:
> Does this help?
>
> A <- matrix(0, 6, 6)
> vec <- 1:5
> A[row(A) == col(A) + 1] <- vec
Maybe, more simply:
A <- matrix(0, 6, 6)
vec <- 1:5
diag(A[-1,]) <- vec
Paul
__
R-help@r-project.org ma
Got the answer:
> t(apply(test,1,sort))
I had played with the apply fn at one point, but noticed the results were
not quite right. Wrapping it in t was the trick! Thanks!
Now to use the nicely sorted rows in my "real" problem at hand...
Cheers,
Kev-
--
View this message in context:
http://w
Thanks for your ideas.
I would like to find all possible maximums - "mountains" on a graph of a
given density function but I have no ideas. In calculus, there is a
general approach for a given function f(x): Find derivative of f(x) and
estimate all zeros of f'(x). These zeros give us locations of m
On Fri, Mar 13, 2009 at 5:26 PM, Wacek Kusnierczyk
wrote:
>> Oh, this seemed so simple (and I'm sure the answer will be, as usual, so
>> thanks in advance for enlightening me). I need to sort each row of a matrix
>> independent of the others. For example,
>>
> apply(matrix, 1, sort)
t(apply(te
Now I just need the resulting matrix:
2 8 9
4 6 7
1 3 5
On Mar 13, 2009, at 1:26 PM, Wacek Kusnierczyk wrote:
Kevski wrote:
Oh, this seemed so simple (and I'm sure the answer will be, as
usual, so
thanks in advance for enlightening me). I need to sort each row of
a matrix
independent o
Kevski wrote:
> Oh, this seemed so simple (and I'm sure the answer will be, as usual, so
> thanks in advance for enlightening me). I need to sort each row of a matrix
> independent of the others. For example,
>
>
apply(matrix, 1, sort)
vQ
__
R-he
On 3/13/2009 12:07 PM, Ptit_Bleu wrote:
Thanks Dieter for the link.
In fact it may be a problem with R.
The .tex created with R for the table put \begin{table}[ht] and \end{table}\
between \begin{minipage} and \end{minipage} (see below)
If I manually change these positions, according to your li
If you are trying to build your own function then presumably you do
not want the global maximum, since that is trivially returned by max.
So what do you really want? Is this a programming question or just a
general statistics question?
If you want to search along a (specific) sequence for l
Thank you all,
I did it with "write.table"...
greetings,
johnh
johnhj wrote:
>
> Hii,
>
> I will save the elements of the vector median<-with(x, tapply(V3, grup,
> median)). The output of this vector is:
>
> 25 50 75 100 125 150 175 200 225 250 275 300 325 350 375
> 40
Dear:
I am trying to plot x against y for a particular subset of data, say z=1,
and labelling data by another variable say, k.
My data are:
y<-c(69.7, 82.3, 66.3, 107.3, 90.1, 63.7, 82, 74.4, 61.7, 93.4,
73.4, NA, NA, 70.7, 67.7, NA, NA)
x<-c(71.2, 82.6, 67.4, 107.1, 90.5, 66.7, 83.9, 73.9, 61
Oh, this seemed so simple (and I'm sure the answer will be, as usual, so
thanks in advance for enlightening me). I need to sort each row of a matrix
independent of the others. For example,
> test <- matrix(c(8,7,1,2,6,5,9,4,3),nrow=3)
> test
[,1] [,2] [,3]
[1,]829
[2,]76
Ok, sorry...
here is my code so far...
x <-read.table(file="D:/output.txt")
x$grup <- 25*rep(1:144, each=5)
median<-with(x, tapply(V3, grup, median))
sd<-with(x, tapply(V3, grup, sd))
I will plot to types of graph. One graph with the median values for example
with the "plot()" function,
Hi Ross,
If you really need 15 colors, maybe you can use the Set3 palette
provided by RColorBrewer (this is the one used by TraMineR up to 12
states) and add yourself 3 more colors ?
For example (you can mix the hexadecimal color numbers from the
RColorBrewer palette and real color names in
This is a simple question, but I'm going on the supposition that the
only stupid question is the one not asked.
1. I have many sets of 5 proportions that are different from each
other (prop.test), and want to know which proportions are different
from each other. In other words, I want t
Yes, a random variable, discrete or continuous one, should associate with
a probability space and a measurable space.
I thought that graph of density(rv) below could give us an example of a
density function. I am very sorry for confusing you.
My question is how to find/estimate maximum values of a
Hi Alexis,
In my opinion you are nothing short of genius! That worked a treat, i
thought it would be something simple, but i could not find the script or an
example anywhere!!!
That was a massive help and has salvaged my day! :clap:
Thanks very much to everyone else that helped, it was much app
Hi Ross,
If you really need 15 colors, maybe you can use the Set3 palette
provided by RColorBrewer (this is the one used by TraMineR up to 12
states) and add yourself 3 more colors ?
For example (you can mix the hexadecimal color numbers from the
RColorBrewer palette and real color names in
Hi, sorry if it is a too stupid question, but how do I a string search
in R:
I have a dataframe A with A$test like:
test1
bcdtestblabla2.1bla
cdtestblablabla3.88blabla
and I want to search for string that start with 'dtest' and ends with
number and return the location of that substring and th
This may be somewhat useful, but I might have more later.
http://florence.acadiau.ca/collab/hugh_public/index.php?title=R:CheckBinFit
(the code below is copied from the URL above)
CheckBinFit <- function(y,phat,nq=20,new=T,...) {
if(is.factor(y)) y <- as.double(y)
y <- y-mean(y)
y[y>0
Thanks Dieter for the link.
In fact it may be a problem with R.
The .tex created with R for the table put \begin{table}[ht] and \end{table}\
between \begin{minipage} and \end{minipage} (see below)
If I manually change these positions, according to your link, there is no
more error ... but the ta
I did similar things with polygon().
Le mar. 10 mars à 13:30, g...@ucalgary.ca a écrit :
For a given random variable rv, for instance, rv = rnorm(1000),
I plot its density curve and calculate some quantiles:
plot(density(rv))
P10P50P90 = = quantile(rv,probs = c(10,50,90)/100)
I would like to co
Hi, Kent
Thank you for that!
I'll pass the info to our systems administrator, he is the only one
who is allowed to do things like that.
Have a nice weekend!
Best,
Serge
On Fri, Mar 13, 2009 at 15:32, Voss, Kent wrote:
> Sergey,
>
> Sorry I missed your post earlier. I had this same problem and
?cat
On Mar 13, 2009, at 10:59 AM, johnhj wrote:
Hii,
I will save the elements of the vector median<-with(x, tapply(V3,
grup,
median)). The output of this vector is:
25 50 75 100 125 150 175 200 225 250 275 300 325 350
375
400 425 450 475 500
17.8 17.8 17.5 17.8 17
Ptit_Bleu yahoo.fr> writes:
> Concerning the point 3, I'm a bit lost. Is it a problem of place to put the
> table and the graph side by side (my english is quite as low as my skills in
> Latex) ?
> I tried with \begin{minipage}{0.45\textwidth} instead of 0.7 and I put
> "//tiny" but no success.
Hi,
take a look to
?write.table
regards
2009/3/13 johnhj
>
> Hii,
>
> I will save the elements of the vector median<-with(x, tapply(V3, grup,
> median)). The output of this vector is:
>
> 25 50 75 100 125 150 175 200 225 250 275 300 325 350 375
> 400 425 450 475 500
> 17
'str(x)' would help. I assume that this is a named list, so this
might plot it for you:
plot(names(x), x)
On Fri, Mar 13, 2009 at 10:59 AM, johnhj wrote:
>
> Hii,
>
> I will save the elements of the vector median<-with(x, tapply(V3, grup,
> median)). The output of this vector is:
>
> 25 50
Can you provide a reproducible example with the data so that we
understand what you are working with. Need to see what the structure
of 'x' and 'median' are.
On Fri, Mar 13, 2009 at 8:35 AM, johnhj wrote:
>
> Hii Jholtman,
>
> I will make a graph of the median values and not to print to the cons
Sergey,
Sorry I missed your post earlier. I had this same problem and I reinstalled
the DDE Server and Excel Add-In, rebooted and it fixed it. I thought they were
already installed as I could pull down data in Excel from Bloomberg, but
reinstalling them fixed my R problem. You can find the d
> library(colorRamps)
> image(matrix(1:150, 10), col = blue2green2red(15))
Regards,
Olivier Delaigue
Ross Culloch wrote:
>
> Dear all,
>
> This seems like a simple problem but i've searched the help files and
> tried various options but failed, so apologies in advance for asking what
> i'm s
Hii,
I will save the elements of the vector median<-with(x, tapply(V3, grup,
median)). The output of this vector is:
25 50 75 100 125 150 175 200 225 250 275 300 325 350 375
400 425 450 475 500
17.8 17.8 17.5 17.8 17.7 17.6 17.7 17.6 17.8 17.7 17.6 17.7 17.8 17.7 17.8
17.
> library(ROCR)
> library(randomForest)
> plot(results,significant)
Error in as.double(x) :
cannot coerce type 'S4' to vector of type 'double'
After try with all the possibilities, it shows same error in simpleaffy data
plot for the results.
please someone guide me
wiener30 wrote:
>
> I
Hii Jholtman,
I will make a graph of the median values and not to print to the console.
I tried to plot with:
plot(V3 ~ grup, data = median) ??
but I get an error message.
I also tried to print the output of median<-with(x, tapply(V3, grup,
median)) to a text file with the X and Y Koordinates
thanks for your supportive comments!
by that time r programs will be scanned directly from your head, i
suppose, and the intelligent scanner will as gladly take <- as it will
=, so the problem will rather vanish.
Yes, and maybe the scanner will be more intelligent than the programmer so
when th
Maybe they are loaded, use search() to see if they are. If yes, then
use detach() to unload them first.
Best
2009/3/13 :
> I am trying to update the packages that I have installed but I get the
> following warning messages:
>
> package 'tseries' successfully unpacked and MD5 sums checked
> Warn
If your subsets are to be taken from the rows of a dataframe, df, and
the size is r, then something like this could satisfy:
apply(combn(nrow(df), r), 2, function(x) df[x, ])
(Although these are not really permutations as I understand that term.)
--
David Winsemius
On Mar 13, 2009, at 8:35 A
I am trying to update the packages that I have installed but I get the
following warning messages:
package 'tseries' successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package 'tseries'
bundle 'forecasting' successfully unpacked and MD5 sums checked
Warning: c
I am trying to update the packages that I have installed but I get the
following warning messages:
package 'tseries' successfully unpacked and MD5 sums checked
Warning: cannot remove prior installation of package 'tseries'
bundle 'forecasting' successfully unpacked and MD5 sums checked
Warning: c
Alan Zaslavsky wrote:
> I would argue that this is a matter of preference and the arguments on
> "principle" for one side or another are not particularly compelling.
indeed; i have argued (i think...) for treating them as equals, the
vhoice being a matter of taste.
> When the "=" was introduce
Dear Ingmar,
Thank you for your reply, I hope I answer your question ---
A couple specific applications I have in mind:
* We work with customers to reduce energy consumption from use of hot
water. Baseline data was gathered at several locations by attaching a
temperature sensor downstream from
Gabor Grothendieck wrote:
> On Fri, Mar 13, 2009 at 10:11 AM, Wacek Kusnierczyk
> wrote:
>
>> Gabor Grothendieck wrote:
>>
>>> If all your code has semicolons you could write a program that
>>> puts each statement on one line based on the semicolons and
>>> then passing it through R will r
I would argue that this is a matter of preference and the arguments on
"principle" for one side or another are not particularly compelling.
When the "=" was introduced for assignment, an argument was made that
name=value function arguments are also implicitly a kind of assignment.
While Duncan
On Fri, Mar 13, 2009 at 10:11 AM, Wacek Kusnierczyk
wrote:
> Gabor Grothendieck wrote:
>> If all your code has semicolons you could write a program that
>> puts each statement on one line based on the semicolons and
>> then passing it through R will reformat it in a standard way.
>> See Rtidy.bat
On 13-Mar-09 12:55:35, Paul Suckling wrote:
> Dear all.
> After much grief I have finally found the source of some weird
> discrepancies in results generated using R. It turns out that this is
> due to the way R handles multi-line expressions. Here is an example
> with R version 2.8.1:
>
> ---
Gabor Grothendieck wrote:
> If all your code has semicolons you could write a program that
> puts each statement on one line based on the semicolons and
> then passing it through R will reformat it in a standard way.
> See Rtidy.bat in the batchfiles distribution for the reformatting part:
> http:/
Hi Kingsford,
Thanks yet again for your help! I have tried this, and once again i have
failed! I have put the code that i've used below (i'm sure you'll note some
bad practice) if that is any use to help explain where i'm going wrong, it
seems to run fine and feeds back just what you noted it wou
Hi Hadley,
Many thanks for your post. You're not wrong - i'm certainly finding it
challenging, but i assumed it was because i was making some basic errors. My
data are 15 types of behaviour, e.g. resting, alert, locomotion, etc. so i
need to use 15 colours to tell each appart in a barplot which
Hello Dieter,
And thank you for the corrections.
Concerning the point 3, I'm a bit lost. Is it a problem of place to put the
table and the graph side by side (my english is quite as low as my skills in
Latex) ?
I tried with \begin{minipage}{0.45\textwidth} instead of 0.7 and I put
"//tiny" but no
On Fri, Mar 13, 2009 at 7:19 AM, Ross Culloch wrote:
>
> Many thanks yet again for your reply, thanks for that method, i gave it a go
> and i checked 'mycols' and sure enough it had selected the chosen colours
> and listed their names, but when i used it for making the graph warnigs
> informed me
On Thu, Mar 12, 2009 at 5:37 PM, Christopher David Desjardins
wrote:
> I get the following error when I run qplot()
>
> qplot(grade, read,data = hhm.long.m, geom = c("point", "smooth"))
>
> Error in smooth.construct.cr.smooth.spec(object, data, knots) :
> x has insufficient unique values to suppo
If all your code has semicolons you could write a program that
puts each statement on one line based on the semicolons and
then passing it through R will reformat it in a standard way.
See Rtidy.bat in the batchfiles distribution for the reformatting part:
http://batchfiles.googlecode.com
On Fri,
jim holtman wrote:
>
>
>> if (1 == 1) {print (TRUE)
>>
> + } else {print (FALSE)}
> [1] TRUE
>
>
> so the parse knows that the initial 'if' is not complete on the single line.
>
... and likewise the original code could be rewritten as
f <- { a
+ b
+ c }
vQ
__
Hi Oliver,
Thanks very much for your reply. I have tried your script, but when the
script for the graph runs it comes up with several error messages repeating
that 'supplied colour is not numeric or character'
Olivier Delaigue wrote:
>
>> library(colorRamps)
>> image(matrix(1:150, 10), col =
I get it. Thanks everyone for the feedback.
Now that I understand how it works, my comment would be that this
system is dangerous since it makes it difficult to read the code and
easy to make errors when typing it. I recognise that this is something
so fundamental that it is unlikely to be changed
For permutations a couple of options are 'permutations' in package
gtools, and 'urnsamples' in package prob
hth,
Kingsford Jones
On Fri, Mar 13, 2009 at 6:35 AM, Dale Steele wrote:
> I'm doing a permutation test and need to efficiently generate all
> distinct subsets of size r from a set of size
> Thanks for the reply - some of the sets/palettes in the RColorBrewer are
> ideal, but the problem with the problem i have is that they only go up to 12
> colours, and i need 15 colours - so i assume the only thing i can do is
> create my own palette, but i'm having limited success in trying to wo
Paul Suckling wrote:
<...>
>
> # R-script...
>
> r_parse_error <- function ()
> {
>
<...>
> f <- a
> + b
> + c;
> }
>
>
<...>
> f 1
>
>
> As far as I am concerned f should hav
Many thanks yet again for your reply, thanks for that method, i gave it a go
and i checked 'mycols' and sure enough it had selected the chosen colours
and listed their names, but when i used it for making the graph warnigs
informed me that the supplied colour in not numeric or character.
Ross
Did you read the help for cor.test? Test statistics, references
looks pretty complete to me. If the descriptions are too terse,
then the references given would be the next step.
Sarah
Excerpted from ?cor.test
If 'method' is '"pearson"', the test statistic is based on
Pearson's pro
On Fri, 13 Mar 2009, Paul Suckling wrote:
Dear all.
After much grief I have finally found the source of some weird
discrepancies in results generated using R. It turns out that this is
due to the way R handles multi-line expressions. Here is an example
with R version 2.8.1:
---
1 - 100 of 143 matches
Mail list logo