Re: [R] how to assign a value to a specific position of a list

2017-05-01 Thread Jeff Newmiller
The only thing "compelling" about your example is that you have the pre-conceived (wrong) notion that you have to store your objects under separate names in your global environment. That is not only wrong, it handicaps you for future unified processing of these data. I see a lot of constructs

Re: [R] Example of the use of the "crt" graphical parameter?

2017-05-01 Thread Michael Hannon
Bendy like spaghetti :-) Thanks, Jim. I wasn't aware of plotrix, and it does seem to be a cornucopia of useful, graphical stuff. In this case, my quest for rotating characters stemmed from what you might call a PHB request that I was eventually able to work around. I posed my original question

Re: [R] [FORGED] Re: Example of the use of the "crt" graphical parameter?

2017-05-01 Thread Michael Hannon
Hmm. Thanks, Paul. That would explain the dearth of examples. -- Mike On Mon, May 1, 2017 at 4:42 PM, Paul Murrell wrote: > Hi > > I do not recall ever using crt. A grep of the source code suggests that no > user-level functions ever refer to it either. In other

Re: [R] how to assign a value to a specific position of a list

2017-05-01 Thread Jinsong Zhao
Thank you very much, and your reply is helpful. I don't like assign, and even don't use parse in my previous codes. However, in the case I encountered, assign and parse may be the right tools. Here is the code I used: # in the workspace, there are tens directory. # In each directory, there

Re: [R] Example of the use of the "crt" graphical parameter?

2017-05-01 Thread Jim Lemon
Hi Michael, The arctext function (plotrix) does something similar, and the code could be modified to do what you request. If you do want a working function, it wouldn't be too hard to program. Jim On Tue, May 2, 2017 at 6:57 AM, Michael Hannon wrote: > Hi, folks.

Re: [R] [FORGED] Re: Example of the use of the "crt" graphical parameter?

2017-05-01 Thread Paul Murrell
Hi I do not recall ever using crt. A grep of the source code suggests that no user-level functions ever refer to it either. In other words, it appears to be basically unimplemented. Specifically with regard to text in the margins of a base plot, in addition to every function ignoring crt,

Re: [R] Example of the use of the "crt" graphical parameter?

2017-05-01 Thread William Dunlap via R-help
Perhaps R does what S+ does with par("crt"). S+'s help(par) says: crt=x character rotation in degrees measured counterclockwise from horizontal. When srt is set, crt is automatically set to the same value, unless crt appears later in the command than srt. Many

Re: [R] Example of the use of the "crt" graphical parameter?

2017-05-01 Thread Bert Gunter
FWIW: "srt = 90" should rotate the whole string "aa" 90 degrees in a call to text(), and it does. I interpret "crt =90" to rotate the individual letters of "aa" 90 degrees, but it does not on my graphic device, RStudioGD. It probably works on some other devices, but I don't know which

Re: [R] Example of the use of the "crt" graphical parameter?

2017-05-01 Thread Michael Hannon
Thanks, Bert. I *did* mean crt, and I did read (and re-read) the man page. What I'm lacking, and the only thing I'm asking for, is a working example of the use of that parameter. -- Mike On Mon, May 1, 2017 at 2:08 PM, Bert Gunter wrote: > Hard to know what you want

Re: [R] Example of the use of the "crt" graphical parameter?

2017-05-01 Thread Bert Gunter
Hard to know what you want or did without code. But, a guess: did you want the "srt" parameter and not "crt"? Of course, it's always useful to read the man page, in this case for ?par, where it says: (for crt): "A numerical value specifying (in degrees) how **single characters** should be

[R] Example of the use of the "crt" graphical parameter?

2017-05-01 Thread Michael Hannon
Hi, folks. This is an issue that we've defined away, but I recently thought it would be useful to rotate characters in some marginal text in a base-R plot. I made a few stabs on using the "crt" parameter but was unsuccessful. I'm deliberately omitting details of my attempts, as I want just to

Re: [R] Lattice xyplot

2017-05-01 Thread peter dalgaard
> On 1 May 2017, at 17:59 , Bert Gunter wrote: > > (Too trivial for the list) ...so you decided to include us only once? >;-) -pd > > I debated saying something similar but decided not to, as polygons can > be drawn e.g. via panel.polygon. > > Cheers, > Bert > > >

Re: [R] Finding nrows with specefic values a matrix into a table

2017-05-01 Thread David L Carlson
Copy your queries to the help list. Do not use html (google "send plain text email using hotmail"). Copy your actual code creating the object and writing with any warning or error message into your email. Do not just give us a description of what you did. Include information about the object

Re: [R] how to assign a value to a specific position of a list

2017-05-01 Thread MacQueen, Don
It's not clear what you're trying to do. However, to "assign a value to a specific position of a list", this example should show you how. lst <- vector('list', 10) ## see the help page for list names(lst) <- paste0('list.',1:10) ## to assign 'a' to position 3: pos <- 3 lst[[pos]] <- 'a'

Re: [R] survival package can't find Ccoxfit6

2017-05-01 Thread SeshanV
Thank you everyone for all your help. Dr. Therneau and I had some offline email exchange and he offered to add resid= and concordance= options which will reduce the computational overhead in resampling scenarios such as mine. It will also avoid having to access unexported internals. Thanks,

Re: [R] cannot load .sav-files in R 3.4.0

2017-05-01 Thread Anthony Damico
did my code work? thanks On Mon, May 1, 2017 at 11:35 AM, wrote: > hi, thanks for the reply! > it always worked until 3.4.0. i got warning but they did not stop R > loading the file ... > > Am 01.05.2017 16:10 schrieb Anthony Damico: > >> hi, i don't think

Re: [R] Lattice xyplot

2017-05-01 Thread Bert Gunter
(Too trivial for the list) I debated saying something similar but decided not to, as polygons can be drawn e.g. via panel.polygon. Cheers, Bert On Mon, May 1, 2017 at 8:25 AM, Jeff Newmiller wrote: > It is not a question of whether lattice "understands" the

Re: [R] Lattice xyplot

2017-05-01 Thread Jeff Newmiller
It is not a question of whether lattice "understands" the unsorted data... imagine trying to plot 4 points to form a square instead of a trend line... you would NOT want lattice to sort those points for you. That lattice leaves your data alone gives you more flexibility, even while it adds work

Re: [R] Lattice xyplot

2017-05-01 Thread Duncan Mackay
In addition to Berts comments Once you change the order you change the non factored id' ordering. If you make it a factor it may be easier to see what is going on I think I have copied correctly - see the differences # original data xyplot(y ~ time, data=dat, groups=id, aspect = "fill", type

Re: [R] Lattice xyplot

2017-05-01 Thread Bert Gunter
Yes. type = "l" connects the points in the order given in the data, so if the x's are not already ordered, the plots will be different after ordering the x's. e.g. > x <- c(3,1,2,4,6,5) > y <- 11:16 > xyplot(y~x. type = "l") As for why ... that's just the way it was designed. You can always

Re: [R] problem loading spss-files

2017-05-01 Thread Bilonick, Richard Anthony
I pasted some of the error/warning message into Google and among other things: http://stackoverflow.com/questions/21228518/what-is-attr-value-labels-when-reading-spss-into-r This might begin to explain what is happening. Is a data.frame created? Rick B.

Re: [R] cannot load .sav-files in R 3.4.0

2017-05-01 Thread Anthony Damico
hi, i don't think foreign::read.spss or haven::read_spss have ever worked with a handful of the ess files, but library(memisc) does. you are better off loading ess with library(lodown) because the drudge work has already been done-- library(devtools)

[R] cannot load .sav-files in R 3.4.0

2017-05-01 Thread katharina . manderscheid
after updating R from 3.3.3. to 3.4.0 i cannot import spss-data files anymore. for the european social survey (europeansocialsurvey.org) i get this warning: re-encoding from CP1252 Fehler in levels<-(*tmp*, value = if (nl == nL) as.character(labels) else paste0(labels, : factor level [3] is

[R] problem loading spss-files

2017-05-01 Thread Siouxsie
after updating R from 3.3.3. to 3.4.0 i cannot import spss-data files anymore. for the european social survey (europeansocialsurvey.org) i get this warning: re-encoding from CP1252 Fehler in levels<-(*tmp*, value = if (nl == nL) as.character(labels) else paste0(labels, : factor level [3] is

Re: [R] Whitespace

2017-05-01 Thread Barry Rowlingson
That looks like an error from Stan parsing your stan file, but the code you put in the message doesn't look like Stan code, it looks like R code, so maybe you've tried to parse your R code with Stan There's no mention of stan in the code either, like the rstan package, so somehow you've got a

Re: [R] Whitespace

2017-05-01 Thread Jim Lemon
Hi Miguel, You don't seem to have defined "J" before line 2. Maybe that is the problem. Jim On Mon, May 1, 2017 at 2:57 PM, Miguel Angel Hombrados Herrera wrote: > Hello > > > Ive been working on a stan program in Rstudio. Im kind of new on this, so > probably my

[R] Whitespace

2017-05-01 Thread Miguel Angel Hombrados Herrera
Hello Ive been working on a stan program in Rstudio. Im kind of new on this, so probably my question is trivial, However I was not able to find information about this. The error Im getting when I run my stan code is: PARSER EXPECTED: whitespace to end of file. FOUND AT line 2: The code

Re: [R] R-help Digest, Vol 170, Issue 29

2017-05-01 Thread Adrian Trapletti
> Message: 1 > Date: Fri, 28 Apr 2017 11:07:40 + > From: T.Riedle > To: "R-help@r-project.org" > Subject: [R] Augmented Dickey Fuller test > Message-ID: <1493377701072.16...@kent.ac.uk> > Content-Type: text/plain; charset="UTF-8" > > Dear all, > > I am

[R] Lattice xyplot

2017-05-01 Thread array chip via R-help
Dear all, I am new to lattice, so would appreciate anyone's help on the questions below. I am using xyplot to plot some trend in my dataset. Using the example dataset attached, I am trying to plot variable "y" over variable "time" for each subject "id":

Re: [R] Finding nrows with specefic values a matrix into a table

2017-05-01 Thread abo dalash
I'm trying to write the table I have created from the matrix using write.table(mytable, file= "mytable.txt"). I have imported this txt. file into an Excel sheet but all data have been typed in one column (Var1,Var2,) and I want to see each vector in one column. Have I used the correct syntax?