Re: [R] [Rd] italic font on cairo devices in R 3.4

2017-07-07 Thread Yixuan Qiu
Hi Ilia, You may want to have a try of the showtext package (https://github.com/yixuan/showtext). Below is a quick example: library(showtext) showtext.auto() pdf("test.pdf") ## Use the "sans" font family provided by the showtext package ## font == 3 means italic font face plot(1, xlab = "Unicode

Re: [R] Factor vs character in a data.frame vs vector

2017-07-07 Thread John Kane via R-help
Thanks Marc. It never occurred to me that I would need a ""stringsAsFactors" expression in a data.frame.  I could have sworn I never did before when mocking up some data but clearly I was wrong or there has been a change in R v. 3.4.1 which seems unlikely. On Friday, July 7, 2017, 10:37:29 AM

Re: [R] Factor vs character in a data.frame vs vector

2017-07-07 Thread Marc Schwartz
> On Jul 7, 2017, at 7:03 PM, John Kane wrote: > > Thanks Marc. > It never occurred to me that I would need a ""stringsAsFactors" expression in > a data.frame. I could have sworn I never did before when mocking up some > data but clearly I was wrong or there has been a change in R v. 3.4.1 wh

Re: [R] Beginner s quwry about cfa in lavaan

2017-07-07 Thread Bert Gunter
Google is your friend. Also rseek.org Bert On Jul 7, 2017 3:48 PM, "Martina Hulešová" wrote: > Dear all, > I am trying to learn about R. As a Phd student, I would like to use R for > Krippendorff s alpha and later for a series of CFA. Is there any good > introduction to these kind of analyse

Re: [R] [Rd] italic font on cairo devices in R 3.4

2017-07-07 Thread Ilia Kats
Interesting. I did not have the package installed, but I did at some point extract Helvetica from some MacOSX font files and R was using that just fine until 3.3. This is how the plot looks in 3.4 (still using Helvetica): https://ptpb.pw/HikX.pdf . After removing Helvetica, installing the ttf-m

[R] Beginner s quwry about cfa in lavaan

2017-07-07 Thread Martina Hulešová
Dear all, I am trying to learn about R. As a Phd student, I would like to use R for Krippendorff s alpha and later for a series of CFA. Is there any good introduction to these kind of analyses, or could you recommend me some tutorials on youtube, for example? I am new to R, so I need something b

Re: [R] [Rd] italic font on cairo devices in R 3.4

2017-07-07 Thread frederik
On Fri, Jul 07, 2017 at 07:08:52PM +0200, Ilia Kats wrote: > Interesting. I did not have the package installed, but I did at some point > extract Helvetica from some MacOSX font files and R was using that just fine > until 3.3. This is how the plot looks in 3.4 (still using Helvetica): > https://pt

Re: [R] [Rd] italic font on cairo devices in R 3.4

2017-07-07 Thread frederik
Hi Ilia, I'm running Arch Linux, R 3.4.0. Here's my test.pdf from your minimal example: https://ptpb.pw/HxsA.pdf It doesn't look pixelated to me... Here's a post that I wrote when I solved my last font problem in R, almost 2 years ago: https://stackoverflow.com/a/40940331/5087283 I had to ins

Re: [R] R loop function in Tableau

2017-07-07 Thread David Winsemius
> On Jul 6, 2017, at 2:19 PM, Dai, Shengyu wrote: > > Hi R helpers, > > > > I hope this email finds you well. > > > > I am having trouble with R loop function in Tableau. > There is no "R loop function". (There is an R `for`-function.) If you are having trouble with code then it should

Re: [R] Scoring and Ranking Methods

2017-07-07 Thread David Winsemius
> On Jul 7, 2017, at 2:29 AM, Dhivya Narayanasamy wrote: > > Hi, > > I am doing predictive modelling of Multivariate Time series Data of a Motor > in R using various models such as Arima, H2O.Randomforest, glmnet, lm and > few other models. > > I created a function to select a model of our cho

Re: [R] Factor vs character in a data.frame vs vector

2017-07-07 Thread Marc Schwartz
> On Jul 7, 2017, at 6:03 AM, John Kane via R-help wrote: > > This is not serious problem but I just wonder if someone can explain what is > happening. > The same command within a dataframe is giving me a factor and as a plain > vector is giving me a character. It's probably something simple

[R] Factor vs character in a data.frame vs vector

2017-07-07 Thread John Kane via R-help
This is not  serious problem but I just wonder if someone can explain what is happening. The same command within a dataframe is giving me a factor and as a plain vector is giving me a character.  It's probably something simple that I have read and forgotten but I thought I'd ask. Thanks #==

[R] R loop function in Tableau

2017-07-07 Thread Dai, Shengyu
Hi R helpers, I hope this email finds you well. I am having trouble with R loop function in Tableau. Please see the attachment of a simple dataset. The problem is to test whether the value of columns is match. Because Tableau do not have iteration function, I coded “if statement” in

[R] Scoring and Ranking Methods

2017-07-07 Thread Dhivya Narayanasamy
Hi, I am doing predictive modelling of Multivariate Time series Data of a Motor in R using various models such as Arima, H2O.Randomforest, glmnet, lm and few other models. I created a function to select a model of our choice and do prediction. Model1 <- function(){ .. return() } Model2 <- fu

Re: [R] Efficient swapping

2017-07-07 Thread Anthoni, Peter (IMK)
how about gdata functions? set.seed(1) (tmp <- data.frame(x = 1:10, R1 = sample(LETTERS[1:5], 10, replace = TRUE), R2 = sample(LETTERS[2:6], 10, replace = TRUE))) tmp.orig=tmp library(gdata) bigMap=mapLevels(x=list(factor(tmp[,"R1"]),factor(tmp[,"R2"])),combine = T,codes=FALSE) mapLevels(tmp[,"