Re: [R] about saving format

2017-08-05 Thread Ulrik Stervbo
I have no clue how Rstudio saves plots, but when I was writing directly to the pdf plot device I had similar problems. Setting useDingbats = TRUE made everything work well. I think it is more prudent - and less clicking here and there - to save plots from within the script. I imagine this works

Re: [R] SPSS R Factor v2.4.2

2017-08-05 Thread David Winsemius
> On Aug 5, 2017, at 7:02 PM, Gavin Brown wrote: > > I am not an R-Head, hence I use nice utilities that integrate R into SPSS > I have SPSS v24, R3.20 and R3.40 > I have run IBM SPSS R Integration which requires linking to R3.20 > I have installed R Factor v2.4.2 >

Re: [R] SPSS R Factor v2.4.2

2017-08-05 Thread Bert Gunter
Well, you could download and install it into R! https://cran.r-project.org/web/packages/polycor/index.html However, as this seems to be about how SPSS integrates R, maybe you should post on their support list for help. Cheers, Bert Bert Gunter "The trouble with having an open mind is that

[R] SPSS R Factor v2.4.2

2017-08-05 Thread Gavin Brown
I am not an R-Head, hence I use nice utilities that integrate R into SPSS I have SPSS v24, R3.20 and R3.40 I have run IBM SPSS R Integration which requires linking to R3.20 I have installed R Factor v2.4.2 This package requires 'polycor' library Unfortunately, 'polycor' does not exist in R3.20

Re: [R] about saving format

2017-08-05 Thread Duncan Murdoch
On 05/08/2017 9:10 PM, Bert Gunter wrote: If the OP is using RStudio and not using R (i.e. pdf()) directly, it sounds like this query should be directed to RStudio support, not here. Two things: First, to Lily: "‰" is the "per mil" symbol, not percent; it's not an ASCII symbol, which is why

Re: [R] about saving format

2017-08-05 Thread Bert Gunter
If the OP is using RStudio and not using R (i.e. pdf()) directly, it sounds like this query should be directed to RStudio support, not here. Cheers, Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley

Re: [R] about saving format

2017-08-05 Thread Ismail SEZEN
> On 6 Aug 2017, at 03:47, lily li wrote: > > In the lower right panel of R-studio interface, there is the "Export" button. > I saved as PDF from there directly, rather than using functions > > On Sat, Aug 5, 2017 at 6:18 PM, Ismail SEZEN wrote: >

Re: [R] about saving format

2017-08-05 Thread lily li
In the lower right panel of R-studio interface, there is the "Export" button. I saved as PDF from there directly, rather than using functions On Sat, Aug 5, 2017 at 6:18 PM, Ismail SEZEN wrote: > > > On 6 Aug 2017, at 03:01, lily li wrote: > > > > I

Re: [R] about saving format

2017-08-05 Thread Ismail SEZEN
> On 6 Aug 2017, at 03:01, lily li wrote: > > I am using the plot() function, but have a problem. When saving as pdf > format, the ‰ sign in the x-axis label becomes (...) sign. I prefer to save > in pdf, as this format has a higher resolution than jpeg or other picture >

[R] about saving format

2017-08-05 Thread lily li
Hi R users, I am using the plot() function, but have a problem. When saving as pdf format, the ‰ sign in the x-axis label becomes (...) sign. I prefer to save in pdf, as this format has a higher resolution than jpeg or other picture formats. Could anyone tell me how to do then? Thanks.

Re: [R] Error in setwd("dir") :

2017-08-05 Thread Rui Barradas
Hello, Inline. Em 05-08-2017 15:55, ? ? escreveu: Hello, I got some of the R source code and not being able to Run it If you have the source code, why can't you change it and replace that "dir" with yours, as returned by getwd()? Hope this helps, Rui Barradas in RStudio. I get the

Re: [R] Error in setwd("dir") :

2017-08-05 Thread Duncan Murdoch
On 05/08/2017 10:55 AM, ? ? wrote: Hello, I got some of the R source code and not being able to Run it in RStudio. I get the error: Error in setwd("dir") : cannot change working directory I have gone through forums but nothing seemed relevant to my issue. What bugs me the most is the

Re: [R] Error in setwd("dir") :

2017-08-05 Thread mark . hogue
Did you put the directory in quotes with forward slashes? Please show command used. Sent from my iPhone > On Aug 5, 2017, at 1:10 PM, ? ? wrote: > > Hello, I got some of the R source code and not being able to Run it in > RStudio. > I get the error: > > Error in

[R] Error in setwd("dir") :

2017-08-05 Thread ? ?
Hello, I got some of the R source code and not being able to Run it in RStudio. I get the error: Error in setwd("dir") : cannot change working directory I have gone through forums but nothing seemed relevant to my issue. What bugs me the most is the ("dir") that the error shows, is of those

Re: [R] by() subset by factor gives unexpected results

2017-08-05 Thread Mark Leeds
Putting answer here for future posterity. Didn't send to R-help initially because I wasn't sure what OP wanted. I guessed right. Sorry for confusion in thread. GUESSING THAT YOU WANT IS BELOW #=== i <- data.frame(x=c(1,2,3),

Re: [R] by() subset by factor gives unexpected results

2017-08-05 Thread Bert Gunter
... and, of course, by() should not be used at all for this sort of thing in practice, as the "col" argument can be a vector. See ?plot.default if you you were not aware of this already. j <- data.frame(x=c(1,2,3), y=c(1,1,1), B=c("red","blue","green"), stringsAsFactors = FALSE)

[R] Nested for loop

2017-08-05 Thread Kirsten Morehouse
Hi! Thanks for taking the time to read this. The code below creates a graph that takes 100 samples that are between 5% and 15% of the population (400). What I'd like to do, however, is add two other sections to the graph. It would look something like this: from 1-100 samples take 100 samples

Re: [R] Ussing assign

2017-08-05 Thread Jim Lemon
Hi Jesus, You probably want: assign(paste0("model",i),lm(y~x,data=get(paste0("variable",i Jim On Sat, Aug 5, 2017 at 7:01 PM, Jesús Para Fernández wrote: > Hi there, > > > Imagine I want to use a variable created with assign,but automatically. I > have an

Re: [R] by() subset by factor gives unexpected results

2017-08-05 Thread Myles English
The answer was (thanks to Mark Leeds) to do with the use of a factor instead of a vector. on [2017-08-05] at 08:57 Myles English writes: > I am having trouble understanding how the 'by' function works. Using > this bit of code: > > i <- data.frame(x=c(1,2,3), y=c(0,0,0),

[R] by() subset by factor gives unexpected results

2017-08-05 Thread Myles English
I am having trouble understanding how the 'by' function works. Using this bit of code: i <- data.frame(x=c(1,2,3), y=c(0,0,0), B=c("red","blue","blue")) j <- data.frame(x=c(1,2,3), y=c(1,1,1), B=c('red','blue','green')) plot(0, 0, type="n", xlim=c(0,4), ylim=c(0,1)) by(i, i$B, function(s){