Displaying 20 results from an estimated 10000 matches similar to: "bug? in first plot"
2018 Feb 13
0
plotting the regression coefficients
Hi
scale_colour_gradient(?red?, ?blue?)
should do the trick.
Actually I found it by Google
ggplot colour
http://www.cookbook-r.com/Graphs/Colors_(ggplot2)/
http://www.sthda.com/english/wiki/ggplot2-colors-how-to-change-colors-automatically-and-manually#gradient-colors-for-scatter-plots
question. So you could find it too and probably far more quickly then myself as I have also other duties.
Cheers
2018 Feb 12
2
plotting the regression coefficients
Hi Petr and Richard;
Thanks for your responses and supports. I just faced a different problem.
I have the following R codes and work well.
p <- ggplot(a, aes(x=Phenotypes, y=Metabolites, size=abs(Beta),
colour=factor(sign(Beta)))) +
theme(axis.text=element_text(size = 5))
p1<-p+geom_point()
p2<-p1+theme(panel.grid.major = element_blank(),
panel.grid.minor = element_blank(),
2018 Feb 12
0
plotting the regression coefficients
Petr, there was a thinko in your response.
tmp <- data.frame(m=factor(letters[1:4]), n=1:4)
tmp
tmp$m <- factor(tmp$m, levels=c("c","b","a","d")) ## right
tmp[order(tmp$m),]
tmp <- data.frame(m=factor(letters[1:4]), n=1:4)
levels(tmp$m) <- c("c","b","a","d") ## wrong
tmp[order(tmp$m),]
changing levels
2006 Feb 07
1
(second round) creating a certain type of matrix
Hi R users
Here is what I got with help from Petr Pikal (Thanks Petr Pikal). I modified
Petr Pikal's code to a little
to meet my purpose.
I created a function to generate a matrix
generate.matrix<-function(n.variable)
{
mat<-matrix(0,n.variable,(n.variable/2)/5+1) #matrix of zeroes
dd<-dim(mat) # actual dimensions
mat[1:(dd[1]/2),1]<-1 #put 1 in first half of first column
2018 Feb 12
3
plotting the regression coefficients
Hi
After melt you can change levels of your factor variable. Again with the toy example.
> levels(temp$variable)
[1] "y1" "y2" "y3" "y4"
> levels(temp$variable) <- levels(temp$variable)[c(2,4,1,3)]
> levels(temp$variable)
[1] "y2" "y4" "y1" "y3"
>
And you will get graphs with this new levels ordering.
2020 Oct 26
0
How to shade area between lines in ggplot2
Hi
Put fill outside aes
p+geom_ribbon(aes(ymin = slope_1*x + intercept_1 - 1/w[2],
ymax = slope_1*x + intercept_1 + 1/w[2]), fill = "blue", alpha=0.1)
The "hole" is because you have two levels of data (red and blue). To get rid
of this you should put new data in ribbon call.
Something like
newdat <- trainset
newdat$z <- factor(0)
p+geom_ribbon(data=newdat, aes(ymin =
2006 Apr 05
1
(Fwd) Re: Reading xyz data from a file and plotting a cont
BTW. I checked help page of contour and maybe it could mention a note
about akima package or interp function.
Petr
------- Forwarded message follows -------
From: Petr Pikal <petr.pikal at precheza.cz>
To: "Abhinav Verma" <abhinav1205 at gmail.com>, r-help at stat.math.ethz.ch
Subject: Re: [R] Reading xyz data from a file and plotting a
2023 Mar 21
1
Rprofile.site and automatic installation of missing packages
On 21/03/2023 9:58 a.m., PIKAL Petr wrote:
> Hallo Duncan
>
> Tested but does not work so something other must be wrong.
>
> R version 4.2.2.
>> installed.packages()[,"Package"]
> base boot class cluster codetools compiler datasets foreign graphics grDevices grid KernSmooth
2009 Jul 29
1
Add a line in a Pairs2 and mark the axis length
Hi,
I have finally installed TeachingDemos trough zip file and installed on
lbrary.
One new question:
I want to draw a line (like abline) on diagonal or the result of running a
ols.
How can I do it.
On the other hand, I want to mark the length on each sub plot y axis.
It is possible?
My function is
sca<-function(){
z2<-read.table("Ase.txt",header=T)
2020 Oct 23
2
How to shade area between lines in ggplot2
Thank you, but this split the area into two and distorts the shape of
the plot. (compared to
```
p + geom_abline(slope = slope_1, intercept = intercept_1 - 1/w[2],
linetype = "dashed", col = "royalblue") +
geom_abline(slope = slope_1, intercept = intercept_1 + 1/w[2],
linetype = "dashed", col = "royalblue")
```
Why there
2017 Oct 13
2
How to define proper breaks in RFM analysis
> On Oct 13, 2017, at 2:51 AM, PIKAL Petr <petr.pikal at precheza.cz> wrote:
>
> Hi
>
> You expect us to solve your problem but you ignore advice already recieved.
>
> Your data are unreadable, use dput(yourdata) instead. see ?dput
>
>> test<-read.table("clipboard", heade=T)
> Error in scan(file = file, what = what, sep = sep, quote = quote,
2018 Feb 12
0
plotting the regression coefficients
Hi Petr;
Thanks so much. This is great! Although last Sunday, alternatively, I have
solved the problem using the following statement at the very end of the
program.
* ggsave('circle.pdf', p4, height = 70, width = 8, device=pdf, limitsize =
F, dpi=300).*
This works very well too.
Asa my categorical variables are in my Y axis, my R program reorders the
names on Y-axis. However, I would
2017 Oct 13
0
How to define proper breaks in RFM analysis
Hemant's problem is that the indicators are not distributed uniformly.
With a uniform distribution, categorization gives a reasonably optimal
separation of cases. One approach would be to drop categorization and
calculate the overall score as the mean of the standardized indicator
scores. Whether this is an option I do not know. I did offer an
"eyeball" set of breaks in a previous
2004 Jun 15
1
R: slope estimations of teeth like data
On 15 Jun 2004 at 13:52, Vito Muggeo wrote:
> Dear Petr,
> Probably I don't understand exactly what you are looking for.
>
> However your "plot(x,c(y,z))" suggests a broken-line model for the
> response "c(y,x)" versus the variables x. Therefore you could estimate
> a segmented model to obtain (different) slope (and breakpoint)
> estimates. See
2017 Aug 01
0
Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
Hi
Keep your messages coppied to R helplist, others could give you answers too.
See in line
From: Rosa Oliveira [mailto:rosita21 at gmail.com]
Sent: Tuesday, August 1, 2017 4:38 PM
To: PIKAL Petr <petr.pikal at precheza.cz>
Subject: Re: [R] Superscript and subscrib R for legend x-axis and y-axis and colour different subjects in longitudinal data with different colours
Hi Pikal,
I looked
2020 Oct 13
0
Please need help to finalize my code
What do you *mean* "when you want to use the kernels".
WHICH kernels?
Use to do WHAT?
In your browser, visit cran.r-project.org
then select "Packages" from the list on the left.
Then pick the alphabetic list.
Now search for 'kernel'.
You will find dozens of matches.
On Wed, 14 Oct 2020 at 05:15, PIKAL Petr <petr.pikal at precheza.cz> wrote:
> Hm. Google tells
2018 Feb 19
0
Putting 733 discrete categories on Y-axis in qqplot2 as they are
Hi
When you load external file to R, character variables are converted to factors by default and alphabetically sorted. I have limited connection to internet, so I cannot find the answer, you could try it yourself. Maybe you could try not to convert vector with names to factor, which, for plotting issue is not different from factor coding.
See ?read.table for details
However I am not sure if it
2005 Feb 09
2
[Fwd: Re: Fw: Contour plot]
Petr,
It works perfectly! But I still have a question;
I have fit the following data;
x,y,z
1,10,11
2,11,15
3,12,21
4,13,29
5,14,39
6,15,51
7,16,65
8,17,81
9,18,99
10,19,119
>dat.lm <- lm(z~I(x^2)+y, data=dat)
>dat.lm
Call:
lm(formula = z ~ I(x^2) + y, data = dat)
Coefficients:
(Intercept) I(x^2) y
1.841e-14 1.000e+00 1.000e+00
How do I create the
2017 Oct 23
1
How to define proper breaks in RFM analysis
hello,
I'm confused what you guys are talking about.
i just want to set ideal threshold values for my RFM scores which can be
done using Quantiles but i don't want to use quantiles because my data is
not normally distributed so it will lead to wrong ranges of breaks. to fix
this problem I'm looking for an approach which can define the ideal range
to breaks to categorize RFM scores into
2003 May 20
3
plot POSIX class and identify
Hallo all
just a small question I did not find an answer in help pages.
Is it possible to use identify() after plotting with plot.POSIX to
label points and/or to find out some points?
Thanks a lot.
Best regards
Petr Pikal
petr.pikal at precheza.cz
p.pik at volny.cz