Hi Ray,
2012/7/31 Ray Brownrigg :
> On 07/28/12 23:46, Thomas Steiner wrote:
>> Hi,
>> I'd like to have a low resolution word map in R.
>> The "maps" package has this option, but if I use the argument, the map
>> looses sense: Russia and Australia get em
Hi,
I'd like to have a low resolution word map in R.
The "maps" package has this option, but if I use the argument, the map
looses sense: Russia and Australia get empty etc
library("maps")
m=map(col="skyblue",fill=TRUE,plot=TRUE,resolution=10)
length(m$x)
If I drop the "fill=TRUE", the effect of
Hi,
I'd like to have a low resolution word map in R.
The "maps" package has this option, but if I use the argument, the map
looses sense: Russia and Australia get empty etc
library("maps")
m=map(col="skyblue",fill=TRUE,plot=TRUE,resolution=10)
length(m$x)
If I drop the "fill=TRUE", the effect of
Hi,
I'd like to add a world map (equirectangular projection) in the
background of a normal R-plot and the world map should be shifted (the
center of the map should be c(163.87,23.581) where the center of the
plot is c(180,35)):
plot(c(0,360),c(0,70),type="n",main="My worldmap")
m=map("world", proj
ting guide http://www.R-project.org/posting-guide.html
>
> and make sure at a minimum to report your sessionInfo(). That
> increases your chances to get a response.
>
> /Henrik
>
> On Sat, Jun 5, 2010 at 11:42 AM, Thomas Steiner
> wrote:
>> OK, no reply. :-(
>
OK, no reply. :-(
I'm more offensive: this is a bug!
the font-parameter of the text fucntion does not work properly in the
Cairo-package
thomas
2010/6/4 Thomas Steiner :
> Hi,
> could it be that the text() fuction gives different output for normal
> png() and CarioPNG()?
>
oordinates. An example result is
attached.
The negative vales where just a stupid try from my side, it does of
course make no sense.
Best,
Thomas
2010/6/4 Jim Lemon :
> On 06/04/2010 05:05 AM, Thomas Steiner wrote:
>>
>> Thank you Greg,
>>
>> I'll add 180 t
Hi,
could it be that the text() fuction gives different output for normal
png() and CarioPNG()?
See the following example and the attached images: the font=2 and
font=3 seem to be exchanged!
Thanks for help,
Thomas
CairoPNG("Test-cairo.png",width=750,height=690)
#png("Test-normal.png",width=750,he
tes.
>
> --
> Gregory (Greg) L. Snow Ph.D.
> Statistical Data Center
> Intermountain Healthcare
> greg.s...@imail.org
> 801.408.8111
>
>
>> -Original Message-
>> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
>> project.org] On Behalf
Hi,
I'd like to plot in in polar coordinates a line which is given as a
vector of lengths and angles.
library("plotrix")
polar.plot(length=c(1,-13,3,-1),polar.pos=c(20,20,45,55),rp.type="p",line.col="red",lwd=3,clockwise=TRUE,label.pos=seq(30,360,by=30),labels=c("ESE","SSE","S","SSW","WSW","W","WN
Hi,
when I create huge pdf files (width is 6meters) with R I cannot open
them in Adobe Acrobat reader (I tried version 9 and some lower). I use
pdf() of grDevices version 2.8.1 and CairoPDF from Cairo version
1.4-4. When I add the (perhaps since pdf version 1.7 pagesizes of more
than 200in are poss
I have integers and I want R to give them back/output as Roman numerals:
s=c(7,17)
format(s,roman=T)
is obviously wrong. Is there any other way/function to do this?
Thanks,
Thomas
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo
Thanks Paul.
I'm still struggeling with some beginners issues on the ps-import
(windows troubles with installing ghostscript), but when I resolved
them I'm sure that I can use your example code which loos great to me.
Thanks a lot,
Thomas
2009/11/4 Paul Murrell :
> Hi
>
>
>
Hi,
I'd like to fill an existing svg (or png) map with gradient colors.
In detail: The file
http://commons.wikimedia.org/wiki/File:Karte_%C3%96sterreich_Bundesl%C3%A4nder.svg
should be filled with the population density data from this table:
http://de.wikipedia.org/wiki/%C3%96sterreich#Verwaltungsg
Hi,
how can I reverse the radius axis of plotrix's polar.plot function?
Perhaps this sounds strange, but I use the radians for angles as well:
In the center is zenith and the corresponding angle is 90°, not 0. See
an example plot at
http://www.mysundial.ca/tsp/images/sun_chart_50_solar_polar.jpg
d
Thanks you, this helps.
Great,
Thomas
2009/8/3 Michael Denslow :
> Hi Thomas,
>
> On Sun, Aug 2, 2009 at 11:02 AM, Thomas Steiner wrote:
>> Is there a R-package with a function that returns me the timezone, if
>> I hand over longitude and latitude?
>> I know o
Is there a R-package with a function that returns me the timezone, if
I hand over longitude and latitude?
I know online services like
http://ws.geonames.org/timezone?lat=-38.01&lng=147 and
http://www.earthtools.org/webservices.htm#timezone and wodner if this
exists for R too.
Thanks for helping,
th
Hi Greg and Paul,
I tried several things, but I did not succeed:
* I could not find the library(EBImage) on CRAN in Austria to open an
png image in R.
* I could not import the image via pixmap (read.pnm) as described on
http://wiki.r-project.org/rwiki/doku.php?id=tips:graphics-misc:translucency
Hi,
thanks for all your hints.
> One of the points of my.symbols is that you can define your own symbols to
> use with it (hence the my).
I tried this and it works fine. I need all the symbols and I will
probably not trace them, but copy the svg code and modify them from
http://commons.wikimedia
unfortunately in my.symbols there are no zodiac signs, so I have to
choose unicode which does not work for me yet.
Thomas
2009/3/31 Thomas Steiner :
> Thanks for the feedback.
> I did now try Vista (2.8.1), XP (2.9.0alpha) and Win2000 (2.8.1) and
> non did work compeletely, only on Vist
Thanks for the feedback.
I did now try Vista (2.8.1), XP (2.9.0alpha) and Win2000 (2.8.1) and
non did work compeletely, only on Vista/2.8.1 I got some symbols if I
add the other sign. I will try the my.symbols later today, when i am
at home.
Thomas
__
R-
ics grDevices utils datasets methods base
and from http://www.mail-archive.com/r-help@r-project.org/msg44163.html
I learned that it depends on my runing OS / installation. I know that
this is not an R question, but I have no idea how to proceed...
Thomas
2009/3/29 Thomas Steiner :
> I now t
I now tried a differnt R version under a drifferent OS, even worse: R
version 2.9.0 alpha (2009-03-23 r48200) with Windwos XP does only show
"\u2642". Do I need to install some fonts or so?
Thanks
Thomas
2009/3/28 Thomas Steiner :
> I'd like to paste a zodiac sign on a graph,
I'd like to paste a zodiac sign on a graph, but it only prints it when
I add another unicode ( \u3030) to the desired \u2648 - why?
See the examplecode (compare the orange with the skyblue):
plot(c(-1,1),c(-4,-2),type="n")
text(x=0,y=-3.0,labels="\u2648 \u3030",cex=2.3,col="skyblue")
text(x=0,y=-3
Hi,
I'd like to execute simple commands and functions in R through a
website, is there any service like this somewhere?
I only found http://www.osvisions.com/r-online/ but it does not work
(last update 2003) and the links to releated websites only give errors
(if I calculate 7+3).
Thanks for help &
very cool, easier than I thought... (although I am not fully familiar
with sapply() and friends)
quick reality-check (no proof!) at
http://icon.cat/util/elections/isuHqUyDYh shows that the results
coincide:
votes <- c(42201,38635,247736,170627,48236,117151,61379,35889,92321)
dHont(c("BGLD","KTN",
Is there a R function to calculate the seats in parliament given the
total number of seats and the votes for each party -- for different
methods including the method of D'Hont?
http://en.wikipedia.org/wiki/D%27Hondt_method
Thanks,
thomas
__
R-help@r-proj
Brian, thank you for your reply.
> Why do you expect this to be vectorized when the help page clearly says
> otherwise?
Sure, it's in line with the help, no problem there. I just asked if
this feature is somehow possible.
I expected it, because "pos" does take arrays and it "overrides any
adj val
...and the offset argument can't handle arrays either:
text(c(0,0),c(0,0),c("a","b"),pos=c(1,2),offset=c(1,0.5),col="darkgreen")
The second argument does not have any effect.
Can I pass arrays to text and use diffent locations?
Thomas
PS: I use R version 2.5.0 (2007-04-23) under Win2000.
__
Hi,
text()'s pos does handle more dimensional labels, while adj does not -
or how can I pass an array to text() and use the adj argument (skyblue
text)?
plot(-1:1,-1:1)
text(c(0,0),c(0,0),c("a","b"),pos=c(1,2),col="red")
text(c(0,0),c(0,0),c("a","b"),adj=cbind(c(1,2),c(1,1)),col="skyblue")
Thoma
Ok, thanks Peter, I try to be more accurate:
pdf("test.pdf",width=(20+2+4)/2.54,height=(10+3+1)/2.54)
x=seq(0,pi,length=100)
par( mai=c(2,3,4,1)/2.54 )
plot(x,cos(x),type="l",xlim=c(0,3),ylim=c(-1.2,1.2),xaxs="i",yaxs="i",asp=1)
conv=par("mar")/par("mai")
box("figure", col="darkblue")
dev.off()
T
Hi,
how can I convert the unit "lines" of par("mar") into inches?
par("mai") could help, but does not (see code below).
I want to plot a curve in a predefined size in pdf (I add some margin
space to the plot width&height, everything is in cm):
pdf("test.pdf",width=(20+2+4)/2.54,height=(10+3+1)/2.
Thanks Erik,
grid.lines() gives me exactly what I wanted.
Have a nice weekend!
Thomas
library(grid)
pdf("rect.pdf", paper="a4r")
grid.lines(x=c(1,1,3),c(1,2,2),default.units="cm")
grid.lines(x=c(1,1,3)+1,c(1,2,2)+0.5,default.units="cm",gp=gpar(col="blue"))
dev.off()
_
Hi I want to draw sth in a pdf file with a predefined defined size.
Say a 5cm x 3cm rectangle (a ruler):
pdf("rect.pdf", paper="a4")
plot(c(1,5,5,1,1),c(1,1,3,3,1),asp=1,axes="n")
dev.off()
but how do I fix that one unit is 1cm?
Thanks
thomas
__
R-help
Matthias Kohl was so kind and provided me the following lines in this issue:
library(distrEx)
chf <- function(t, D){
E(D, function(x){exp(1i*t*x)}, useApply = FALSE)
}
## Normalverteilung
D <- Norm()
t <- seq(-3, 3, by = 0.05)
chf.norm <- sapply(t, chf, D = D)
chf.exakt <- exp(-t^2/2)
chf.diff
Thank you Prof Ripley for your answer.
> > The characteristic function is the inverse Fourier transform of the
> > distribution function. The characteristic function of a normaly
> > distributed random variable is exp(-t^2/2).
> >
>
> The fft is a discrete Fourier transforn, not a continuous one.
The characteristic function is the inverse Fourier transform of the
distribution function. The characteristic function of a normaly
distributed random variable is exp(-t^2/2).
x=seq(-2,2,length=100)
fft(pnorm(x),inverse=T)/length(x)
exp(-x^2/2)
Why aren't the inverse fft and the mentioned functio
Wonderful, thanks a lot.
I just have to call the plot first and then the rect (and then I can
plot it again)... %D
Have a nice day,
Thomas
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
Henrique,
Although your solution is perfect, I had later a problem with setting
the background. Perhaps you know how to get this as well:
set.seed(24032008)
plot(rnorm(10),type="l",col="red")
grid()
front=c(0.5, .97, 0.5, .97)
par(fig=front, new=T)#, bg="skyblue" does not work
rec=c(par("usr")[1]
Dear all,
thank you very much for continuing to look into this issue!
I checked the versions and in Gabor's code the spaces and tabs, but
still the problem remains (see code and error below).
To install quantmod, I used this time Rforge and it did not work. I
had to install the "Defaults" package
Hi,
on
http://cran.at.r-project.org/bin/windows/base/rw-FAQ.html#Where-can-I-find-the-latest-version_003f
it says:
... The current release is distributed as an installer
`R-2.6.1-win32.exe' of about 30Mb. ...
however I find this file as well:
http://cran.at.r-project.org/bin/windows/base/R-2.6.2-w
Dear Gabor and Jeff,
thanks for your hint! I tried it out and played around but could not
succeed completely:
> library(quantmod)
> raw=read.table(file="eurusd-id.csv",sep="\t",dec=",",header =T)
> date.d=as.POSIXct(raw$Date..GMT)
> z=zoo(cbind(raw$Open,raw$High,raw$Low,raw$Close),order.by=date.d
I want to create a open/high/low/last plot of intraday data.
I try to use the function plotOHLC from the tsteries package. I create
my own multiple time series and then try to plot it.
raw Data Format (file eurusd2.csv):
"Date (GMT)""Open" "High" "Low" "Last"
17-03-2008 00:00:00 1,5764
perfect, exactly what I was looking for. Thanks a lot!
many eggs to you...
Thomas
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide c
I want to draw a little subplot ("overview") into my detailed plot. It
should be placed in say the top right corner and have the size of some
legend (like legend(x="topright", inset=0.03, ...)
#main plot
plot(rnorm(100))
#give little density in corner
plot(seq(-2,2,length=300),dnorm(seq(-2,2,lengt
Hi Jim,
thank you very much for your answers!
> > How do I write bold face in the legend - the function does not accept
> > font=2 as argument?
> par(font=2)
perfect, thanks.
> > How do I plot a legend box with a background color, but not a border?
> > Or, better: How do I specify the col
How do I write bold face in the legend - the function does not accept
font=2 as argument?
How do I plot a legend box with a background color, but not a border?
Or, better: How do I specify the color of the legend-box-borderline?
Okay, I abuse the legend, but have a look at
http://de.wikipedia.org
Thank you Philipp for your suggestions.
In Rprofile.site every line is commented out and I could not find any
.Rprofile. I even tried starting R with additional cmdline arguments
--no-environ and --no-init-file.
Still
> update.packages(ask='graphics')
--- Please select a CRAN mirror for use in this
Thanks Liviu, I am trying out what is proposed in the mentioned thread.
I start R by
"C:\Program Files\R\R-2.6.2\bin\Rgui.exe"
http_proxy="http://proxy.haifis.org:8080";
Then I do the following (selecting "Austria" as mirror)
> install.packages("package", method="wget")
--- Please select a CRAN
> OK, that's perfect. Then the proxy configuration is still wrong. MAybe
> you want to try the other way given in the R for Windows FAQs and
> re-check your proxy settings.
I did try the other ways and the above trial shows some progress:
> utils:::menuInstallPkgs()
--- Please select a CRAN mirror
> Which mirror do you use?
As I am living in Vienna, I use "Austria". Which should I try?
Thomas
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.ht
I cannot access internet through R.
My IT-guys told me that I should set the proxy and the port and then
everything will be fine. Where can I set them?
I use R 2.6.2 under Windows 2000 and these settings are those of the
Internet Explorer (no password).
I read
http://cran.at.r-project.org/bin/win
Dear Duncan,
thanks a lot for your answer. I was think a was distracted by the FED
rate cut ;)
Now it works.
Have a nice day
Thomas
myfun1<-function(x,pa) {
return(pa[1]*x^2+pa[2]*x+pa[3])
}
myfun2<-function(x,param,myfunk1,pa) {
return(param[1]*myfunk1(x,pa)+param[2]*myfunk1(-x,pa))
}
test<-
Thank you very much Duncan for your quick answers.
> You're not passing a function as myfunk1, you're passing mf, which is
> the result of evaluating myfun1, so it's a numeric vector.
Yes, this is exacty my problem.
If I leave it away, the problem will not be resolved (it needs pa or not)
myfun1
Okay, let me try to better say what I meant:
myfun1<-function(x=5,pa) {
return(pa[1]*x^2+pa[2]*x+pa[3])
}
myfun2<-function(x=5,param,myfunk1) {
return(param[1]*myfunk1(x)+param[2]*myfunk1(x))
}
test<-function(pars1,pars2,lo,up){
mf=myfun1(x=2,pa=8*pars1)
integ=integrate(f=myfun2,lower=lo,u
I want to use a function as an argument to ingtegrate it twice.
See the following (senseless) example of a double integration:
test<-function(sf,lo,up,rest) {
innerFkn<-function(sf,lo) {
inte=integrate(f=sf,lower=lo,upper=4)
return( inte$value )
}
integral=integrate(f=innerFkn,lower=
How can I choose the (line/plot) type "b"oth in the legend?
plot(1:5,rnorm(1:5),type="b")
legend("topright","random",lty=10)
Thanks,
Thomas
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting gui
57 matches
Mail list logo