Re: [R] Error messages using nonlinear regression function (nls)

2017-10-19 Thread PIKAL Petr
Hi Keep your messages in the list, you increase your chance to get some answer. I changed your data to groupedData object (see below), but I did not find any problem in it. plot(wlg) gives reasonable picture and I am not such expert to see any problem with data. Seems to me, that something has

Re: [R] [FORGED] can't print ggplot with Chinese characters to pdf files

2017-10-19 Thread John
Hi, Following Paul's instruction, I have installed the Cairo. I tried to run the program, and there is no error message at all. I did see the Chinese title in the plot if I ask my RStudio to show the plot (if I type "p1"), but the pdf file shows the plots without the Chinese titles. library(gg

Re: [R] overlaying points and lines on a surface3d rgl plot with axes

2017-10-19 Thread Vivek Sutradhara
Hi R-users, I think that I have figured out what I should do. But I would welcome any comments clarifying any of the questions that I have raised. (I am showing my revised code below). The questions which are still unresolved for me are the following : 1. With the points3d or the plot3D function,

Re: [R] Select part of character row name in a data frame

2017-10-19 Thread Jeff Newmiller
(Re-)read the discussion of indexing (both `[` and `[[`) and be sure to get clear on the difference between matrices and data frames in the Introduction to R document that comes with R. There are many ways to create numeric vectors, character vectors, and logical vectors that can then be used as

[R] overlaying points and lines on a surface3d rgl plot with axes

2017-10-19 Thread Vivek Sutradhara
Hi R users and experts, I am interested in learning more about the use of 3D plots. Specifically, I want to add points and lines to a surface plot. And get the axes and labels plotted also. Here is what I have tried with an example data set : library(rgl) vol2 <- 2*volcano # Exaggerate the relief

Re: [R] looping using 'diverse' package measures

2017-10-19 Thread David L Carlson
You really need to spend some time learning the basics of R. There are thousands of R packages, so you also need to spend time reading the documentation for the package so that you can show us what the data format should be like. Here are some simple ways to transform the data. You should also

Re: [R] looping using 'diverse' package measures

2017-10-19 Thread Michael Dewey
Dear Li Not absolutely sure what you want to do but try ?aggregate ?by ?apply (or one of the other apply functions, possibly tapply On 19/10/2017 11:29, Li Jiang wrote: Hi everyone, I'm new at R (although I'm a Stata user for some time and somehow proficient in it) and I'm trying to use the '

[R] looping using 'diverse' package measures

2017-10-19 Thread Li Jiang
Hi everyone, I'm new at R (although I'm a Stata user for some time and somehow proficient in it) and I'm trying to use the 'diverse' R package to compute a few diversity measures on a sample of firms for a period of about 10 years. I was wondering if you can give me some hints on how to best proce

Re: [R] Select part of character row name in a data frame

2017-10-19 Thread Francesca PANCOTTO
Thanks a lot, so simple so efficient! I will study more the grep command I did not know. Thanks! Francesca Pancotto > Il giorno 19 ott 2017, alle ore 12:12, Enrico Schumann > ha scritto: > > df[grep("strat", row.names(df)), ] [[alternative HTML version deleted]]

Re: [R] Select part of character row name in a data frame

2017-10-19 Thread Enrico Schumann
Quoting Francesca PANCOTTO : Dear R contributors, I have a problem in selecting in an efficient way, rows of a data frame according to a condition, which is a part of a row name of the table. The data frame is made of 64 rows and 2 columns, but the row names are very long but I need to s

[R] Select part of character row name in a data frame

2017-10-19 Thread Francesca PANCOTTO
Dear R contributors, I have a problem in selecting in an efficient way, rows of a data frame according to a condition, which is a part of a row name of the table. The data frame is made of 64 rows and 2 columns, but the row names are very long but I need to select them according to a small part

[R] looping using 'diverse' package measures

2017-10-19 Thread Li Jiang
Hi everyone, I'm new at R (although I'm a Stata user for some time and somehow proficient in it) and I'm trying to use the 'diverse' R package to compute a few diversity measures on a sample of firms for a period of about 10 years. I was wondering if you can give me some hints on how to best proce