similar to: single character in R, and how to manipulate it

Displaying 20 results from an estimated 10000 matches similar to: "single character in R, and how to manipulate it"

2023 Mar 31
1
single character in R, and how to manipulate it
Hi Jinsong, Maybe "srt" will do what you want. As you noted non-orthogonal rotations may not work on some devices. You may be able to download mirror fonts from places like fontmirror.com, but it more complicated. Jim On Thu, Mar 30, 2023 at 7:25?PM Jinsong Zhao <jszhao at yeah.net> wrote: > > Hi there, > > > I just noticed that "crt" is a graphical
2023 Mar 31
1
single character in R, and how to manipulate it
Also see the "arctext" function in the plotrix package. Jim On Fri, Mar 31, 2023 at 11:12?AM Jim Lemon <drjimlemon at gmail.com> wrote: > > Hi Jinsong, > Maybe "srt" will do what you want. As you noted non-orthogonal > rotations may not work on some devices. You may be able to download > mirror fonts from places like fontmirror.com, but it more
2008 May 27
5
Rotated text on a regression line
Dear all, I stumbled over a problem recently when trying to use srt with text() on a windows device. What I intended to do was to plot a simple regression line, and to rotate a piece of text such that the text has the same angle as the regression line. However, the text is always plotted in a slightly wrong angle: #### x=1:10 #create arbitrary x and y values y=x*2-rnorm(1:10)
1999 Aug 16
2
axis ignores srt/crt (PR#249)
Rotated text for axis labels should be possible with one of par(srt=90) axis(1,at,labels) par(srt=0) or axis(1,at,labels,srt=90) (or similar with crt instead of srt) None of these works in pre0.65 or in 0.64.2 _ platform sparc-sun-solaris2.7 arch sparc os solaris2.7 system sparc,
2012 Feb 02
2
Vertical string with horizontal letters
I'm trying to format text on a plot such that the string is vertical but the letters are horizonal. I tried text(1,1,label="output", srt=270) This gives the string rotation I want, but that rotates the entire "output" so the letters are also rotated. I've also tried text(1,1,label="output", srt=270, crt=270) to no avail. par()$crt doesn't seem to affect
2005 Nov 29
1
rotated ylab with xyplot
hi all, in R, what's the best way to have a rotated ylab in a graph plotted with either xyplot or xYplot? I tried this but it didn't work. xyplot(y~x,data.frame(x=1:10,y=runif(10)),ylab=list(srt=90,crt=90,rot=90,label="my label")) more generally, how do you output a text at an angle in a lattice graph? what would be a good reference for R lattice graphics? I need more
2012 Oct 27
2
why sd() can be applied to character vector?
Hi there, In the following example, sd() can be applied to a character vector. However, mean() can not be run in a similar way. Why? I have read sd() man page, however, I don't find information about that behavior. > x <- as.character(1:10) > sd(x) [1] 3.02765 > mean(x) [1] NA Warning message: In mean.default(x) : argument is not numeric or logical: returning NA Regards,
2002 Nov 15
1
Plotting in the margin
Hi, I would like to place a line (tilted at an angle) in the margin of an R plot. Is there any way to place such an annotation outside the plotting area? As an alternative, being able to plot a rotated character (the pipe, |) in the margin would be sufficient. The problem is that mtext doesn't work with the srt option. As a further alternative, if I could put a legend in the margin, I
2010 Jun 29
5
More than two font in a plot
Hi there, I am a Chinese R user. I hope to display Chinese character in a plot, and than save it in PostScript format. I have read the article titled "Non-Standard Fonts in PostScript and PDF Graphics", especially the section about CJK fonts. I also tried the code: > pdf("chinese.pdf", width=3, height=1) > grid.text("\u4F60\u597D", y=2/3,
2017 Dec 13
4
difference between ifelse and if...else?
Hi there, I don't know why the following codes are return different results. > ifelse(3 > 2, 1:3, length(1:3)) [1] 1 > if (3 > 2) 1:3 else length(1:3) [1] 1 2 3 Any hints? Best, Jinsong
2005 Jun 11
1
Wishlist: strwidth allow for rotation of text (PR#7931)
Hi, This is not a bug, but an enhancement suggestion. "strwidth" only gives the width of the text according to the x-axis user coordinates, and similarly for "strheight". Even if the par setting "srt" is changed to rotate the text, the resulting width (resp. height) is in terms of the non-rotated text. Currently, if I want to know how much space to leave for
2008 Oct 13
3
rotating points on a plot
Anybody know how to rotate shapes generated with the 'points' function? I'm trying to place points around a radial diagram such that the y-axis of individual shapes are oriented with the radii of the circle rather than the y-axis of the larger plot area. Perhaps something analogous to the 'srt' and 'crt' functions for text that appear under 'par'?
2020 Oct 20
1
write.csv covert Åland to <c5>land
It looks like an encoding problem. It works fine for me with R encoding set to UTF-8 Here is part of my sessionInfo() results [1] LC_CTYPE=en_CA.UTF-8 LC_NUMERIC=C [3] LC_TIME=en_CA.UTF-8 LC_COLLATE=en_CA.UTF-8 [5] LC_MONETARY=en_CA.UTF-8 LC_MESSAGES=en_CA.UTF-8 I would suggest issuing the command sessionInfo() and seeing what your encoding is. On Tue, 20 Oct 2020 at 08:22,
2009 Dec 01
1
Aligning Diagonally Oriented Labels Under Bar Chart
I searched the forms (i.e., R Search)?and come up with the following suggested link: ?http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-create-rotated-axis-labels_003f I tried to implement what I believe was being implied by that URL and came up with the below: barplot(WorldPhones[1,], ??????? ylim=c(0, 50000), ??????? axes=FALSE, ann=FALSE, ???????
2009 Mar 26
3
How to rotate axis labels? 2009
Hi, while searching for a solution i found many solutions in the internet. But the postings seemed to be many years old and the workaround was a dirty hack like this: http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-create-rotated-axis-labels_003f Now its the year 2009 and there might have been some improvement... Does anyone know a nice and easy way to turn labels on the y axis in the
2010 Jun 30
2
plain text in Chinese can not be set
Hi there, According to ?par, 'font' is an integer which specifies which font to use for text, that 1 corresponds to plain text (the default), 2 to bold face, 3 to italic and 4 to bold italic. When I test Chinese character in pdf(), I found that 1 to bold face, 2 to italic, 3 to bold italic, 4 to symbol. and I don't find how to set plain text. In the following code, the font to use
2011 Apr 16
2
Rotating the x-axis labels of a barplot
Dear listserv, Here is my latest formatting problem. I would like to rotate the x-axis labels by 45 degrees on a _barplot_. Apparently this is slightly different from the example given in the R FAQ, which is for rotating the x-axis labels on a scatterplot (http://cran.r-project.org/doc/FAQ/R-FAQ.html#How-can-I-create-rotated-axis-labels_003f). I have adapted that code, as best I could, and
2007 Feb 22
2
question about boxplot
Here is a question from an old guy: I want to use the boxplot function as follows: boxplot( p.prop ~ R + bins ) This command makes nice boxplot for the factor "R" crossed with the factor "bins". I am having alot of trouble getting control of the labels on the X axis. I want to control it more by specifying what the labels are, controling the 'size' of those
2020 Oct 20
5
write.csv covert Åland to <c5>land
Hi there, I tried to export the names of country to a csv file with write.csv(). In the resulted file, ?land was coverted to <c5>land. Is there any way could prevent this happening? Thanks! > abc [1] "?land" > write.table(abc, file = "") "x" "1" "<c5>land" Best, Jinsong
2020 Oct 20
0
write.csv covert Åland to <c5>land
Hi there, Why the same string is displayed in different form? > abc[,1] [1] "?land" "Afghanistan" > abc name 1 <c5>land 2 Afghanistan And more... > dput(abc, "aa.txt") > dget("aa.txt") name 1 <c5>land 2 Afghanistan > dget("aa.txt")[,1] [1] "<c5>land"