Re: [R] 3D interpolation with R

2018-12-19 Thread Eric Berger
You can do a web search that focuses on R related hits via step 1: go to rseek.org step 2: do your search there - e.g. 3d krig This returns a lot of "hits" that seem to address your question. HTH, Eric On Thu, Dec 20, 2018 at 5:56 AM Francois Chartier wrote: > Hi, > > I would like to create a

[R] test of independence

2018-12-19 Thread km
Dear All, How do I do a test of independence with 16x16 table of counts. Please suggest. Regards, KM [[alternative HTML version deleted]] __ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinf

Re: [R] Combine recursive lists in a single list or data frame and write it to file

2018-12-19 Thread Jim Lemon
Hi Ek, It looks to me as though you are not joining the lists into a single list, then calling FillList and then converting to a data frame. If you can send some data (if it's not too big) I can test it and make sure that it works, as it did every time for me. Jim On Thu, Dec 20, 2018 at 2:22 PM

[R] 3D interpolation with R

2018-12-19 Thread Francois Chartier
Hi, I would like to create a 3D interpolation of soil texture with a data set of 280K points. What package exist for 3D interpolation? Can R do 3D kriging? thanks F [[alternative HTML version deleted]] __ R-help@r-project.org mailing list --

Re: [R] Combine recursive lists in a single list or data frame and write it to file

2018-12-19 Thread Ek Esawi
Thank you Jim. I did use unlist with the recursive option which converted the 3 levels list to a list of 38 matrices. I tried your earlier function to join the 38 matrices, all of which have different number of columns and rows, but i kept getting an error. fillList<-function(x) { + maxrows<-m

Re: [R] Combine recursive lists in a single list or data frame and write it to file

2018-12-19 Thread Jim Lemon
Hi Ek, Look at unlist and the argument "recursive". You can step down through the levels or a nested list to convert it to a single level list. Jim On Thu, Dec 20, 2018 at 1:33 PM Ek Esawi wrote: > > Thank you Bert. I don't see how unlist will help. I want to combine > them but keep the "rectang

Re: [R] Combine recursive lists in a single list or data frame and write it to file

2018-12-19 Thread Ek Esawi
Thank you Bert. I don't see how unlist will help. I want to combine them but keep the "rectangular structure",e.g. list, data frame, matrix because i want to get the tables in their original form. Unlist converts the whole output to a single vector; unless i am missing something. On Wed, Dec 19,

Re: [R] Combine recursive lists in a single list or data frame and write it to file

2018-12-19 Thread Bert Gunter
Does ?unlist not help? Why not? Bert On Wed, Dec 19, 2018, 5:13 PM Ek Esawi Hi All— > > I am using the R tabulizer package to extract tables from pdf files. > The output is a set of lists of matrices. The package extracts tables > and a lot of extra stuff which is nearly impossible to clean wi

Re: [R] geom_ribbon function in ggplot2 package

2018-12-19 Thread John
Thanks, Eik! Eik Vettorazzi 於 2018年12月19日 週三 下午5:12寫道: > Hi, > just add +scale_fill_discrete(name=NULL) > > Cheers > > Am 19.12.2018 um 07:05 schrieb John: > > Hi, > > > > When using the geom_ribbon function in gglot2 package, I got the text > > "fill" above the legend "A" and "B". How can I

[R] Combine recursive lists in a single list or data frame and write it to file

2018-12-19 Thread Ek Esawi
Hi All— I am using the R tabulizer package to extract tables from pdf files. The output is a set of lists of matrices. The package extracts tables and a lot of extra stuff which is nearly impossible to clean with RegEx. So, I want to clean it manually. To do so I need to (1) combine all lists in

Re: [R] Filtering data with dplyr or grep and losing data?

2018-12-19 Thread Sarah Goslee
Hi, What does, "it almost seems like I am losing data mean? Are you losing data? If so, what rows are being excluded that you think should be included? There are 90 rows in the test file that meet your criterion, as far as I can tell, and 90 rows in my R output. So apparently "almost seems like

[R] Filtering data with dplyr or grep and losing data?

2018-12-19 Thread Satish Vadlamani
Hello Experts: I have this log file that has about 1200 characters (max) on a line. What I want to do is read this first and then extract certain portions of the file into new columns. I want to extract rows that contain the text “[DF_API: input string]”. When I read it and then filter based on th

Re: [R] Problem with Plotting in R

2018-12-19 Thread MacQueen, Don via R-help
You haven't described what you are trying to get with the command that doesn't work. My guess is that this might be what you want: plot( x, MyData$NWorth, type="l" ) lines( x, MyData$NWorthSm) However, you might also have to calculate and supply a for the ylim argument to plot(

Re: [R] convert columns of dataframe to same factor levels

2018-12-19 Thread William Dunlap via R-help
You can abuse the S4 class system to do this. setClass("Size") # no representation, no prototype setAs(from="character", to="Size", # nothing but a coercion method function(from){ ret <- factor(from, levels=c("Small","Medium","Large"), ordered=TRUE) class(ret) <- c("Size", class(ret))

Re: [R] R code for if-then-do code blocks

2018-12-19 Thread Paul Miller via R-help
Hi Gabor, Richard, and Thierry, Thanks very much for your replies. Turns out I had already hit on Gabor's idea of "factor out" in writing an initial draft of the code converting from SAS to R. Below is the link Gabor sent describing this and other approaches. https://stackoverflow.com/questio

Re: [R] rewrite code from Deducer to run on R-Studio

2018-12-19 Thread David L Carlson
Since R is open source, you can download the source package file for Deducer, extract the code for the descriptive.table function, and continue to use it without installing the whole package. Alternatively, there are descriptive stats functions in many R packages. You might try numSummary() in

Re: [R] convert columns of dataframe to same factor levels

2018-12-19 Thread Duncan Murdoch
On 19/12/2018 6:48 AM, Luigi Marongiu wrote: Thank you, that worked fine for me. Best wishes of merry Christmas and happy new year, Luigi Actually it's wrong! Sorry about that. If you look at my.data.new$column_2, you'll see that the levels have changed: > my.data column_1 column_2 colu

Re: [R] Trying to fix code that will find highest 5 column names and their associated values for each row in a data frame in R

2018-12-19 Thread PIKAL Petr
Hi generated DF is not what you expect it is > set.seed(1) > DF <- matrix(sample(1:9,9),ncol=10,nrow=9) > DF [,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10] [1,]333333333 3 [2,]999999999 9 [3,]5

Re: [R] convert columns of dataframe to same factor levels

2018-12-19 Thread Luigi Marongiu
Thank you, that worked fine for me. Best wishes of merry Christmas and happy new year, Luigi On Wed, Dec 19, 2018 at 12:19 PM Duncan Murdoch wrote: > > On 19/12/2018 5:58 AM, Luigi Marongiu wrote: > > Dear all, > > I have a data frame with character values where each character is a > > level; how

[R] rewrite code from Deducer to run on R-Studio

2018-12-19 Thread Neotropical bat risk assessments
Hi all, Apparently Deducer (a GUI for R) is no longer supported or being updated. What is the easiest way to re-write code to run using R-Studio? An example: BatStats<- Deducer::descriptive.table (vars = d (Dur,Fmin,Fmax,Fmean,Fk,Fc,Sc,Pmc),data= BatStats,func.names =c("Valid N","Minimum","M

Re: [R] convert columns of dataframe to same factor levels

2018-12-19 Thread Duncan Murdoch
On 19/12/2018 5:58 AM, Luigi Marongiu wrote: Dear all, I have a data frame with character values where each character is a level; however, not all columns of the data frame have the same characters thus, when generating the data frame with stringsAsFactors = TRUE, the levels are different for eac

[R] convert columns of dataframe to same factor levels

2018-12-19 Thread Luigi Marongiu
Dear all, I have a data frame with character values where each character is a level; however, not all columns of the data frame have the same characters thus, when generating the data frame with stringsAsFactors = TRUE, the levels are different for each column. Is there a way to provide a single ve

Re: [R] Plotting rgb proportions in R

2018-12-19 Thread PIKAL Petr
Hi > -Original Message- > From: R-help On Behalf Of Bert Gunter > Sent: Wednesday, December 19, 2018 5:26 AM > To: Jim Lemon > Cc: R-help > Subject: Re: [R] Plotting rgb proportions in R > > 3-d Proportions must sum to 1and are thus actually 2-d and should preferaby > be plotted as a te

Re: [R] uniroot problem

2018-12-19 Thread Troels Ring
Thanks a lot - f was renamed FF and things are OK BW Troels -Oprindelig meddelelse- Fra: Berwin A Turlach Sendt: 19. december 2018 10:27 Til: Troels Ring Emne: Re: [R] uniroot problem G'day Troels, On Wed, 19 Dec 2018 10:03:09 +0100 "Troels Ring" wrote: > Dear friends and helpers -

Re: [R] geom_ribbon function in ggplot2 package

2018-12-19 Thread Eik Vettorazzi
Hi, just add +scale_fill_discrete(name=NULL) Cheers Am 19.12.2018 um 07:05 schrieb John: Hi, When using the geom_ribbon function in gglot2 package, I got the text "fill" above the legend "A" and "B". How can I get rid of the text "fill" above the legend? Thanks! The code is as follow

[R] uniroot problem

2018-12-19 Thread Troels Ring
Dear friends and helpers - in the script below, uniroot is called with a function CHB that calls a function, Charge. On its own, CHB apparently does what is expected, but from within uniroot, problems appear. An error is thrown Error in f(lower, ...) : could not find function "f" So CHB is not s