Re: [R] Vargha and delaney effect size
On Sun, Oct 6, 2019 at 4:24 PM Eric Berger wrote: > [Sending your follow-on question to the full R-help list] > > On Fri, Oct 4, 2019 at 7:13 PM javed khan wrote: > > > Thanks for your reply. I checked the example of treatment and control but > > I can not understand the first four lines. How can we do it if we have > the > > data (both columns) in excel and we read it in code with read.csv. > > > > Best regards > > > > On Friday, October 4, 2019, Eric Berger wrote: > > > >> For general documentation about the effsize package you would do: > >> > help(package="effsize") > >> > >> For information on calculations related to vargha: > >> >??vargha > >> This command displays effsize::VD.A, which you can find out about via > the > >> command > >> >?effsize::VD.A > >> This displays the documentation for the function VD.A. At the top of the > >> documentation you have the Description and Usage sections. At the bottom > >> there are some examples of using the function. > >> > >> HTH, > >> Eric > >> > >> > >> On Fri, Oct 4, 2019 at 10:44 AM javed khan > wrote: > >> > >>> I am new to R language. I have two column data I.e X= 0.23, 0.04, 0.5, > - > >>> 0.20 etc and B= 0.34, 0.01, 0.1, 0.09 etc. The number of observations > are > >>> 100. How can I apply vargha and delaney effect size in R? I load the > data > >>> as, read.csv(mydata.csv) and load the library effsize. Please if > someone > >>> can help because I have no idea about the next step to follow. > >>> > >>> Thanks > >>> > >>> [[alternative HTML version deleted]] > >>> > >>> __ > >>> R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > >>> https://stat.ethz.ch/mailman/listinfo/r-help > >>> PLEASE do read the posting guide > >>> http://www.R-project.org/posting-guide.html > >>> and provide commented, minimal, self-contained, reproducible code. > >>> > >> > > [[alternative HTML version deleted]] > > __ > R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide > http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > # -*- coding: utf-8 -*- """ Created on Sun Oct 6 13:19:06 2019 @author: khh """ ### print(' plottong ##') ### import matplotlib.pyplot as plt # plt.rcParams["font.family"] = "Times New Roman" params = { 'font.family': 'Times New Roman', 'axes.labelsize': 8, 'text.fontsize': 8, 'legend.fontsize': 10, 'xtick.labelsize': 7, #8 'ytick.labelsize': 9, 'text.usetex': False, 'figure.figsize': [7, 4] # instead of 4.5, 4.5 } plt.rcParams.update(params) ### descriptive statistics # X.describe() ### num_dpi = 300, 600 def export_plot (plot_name, num_dpi): plt.savefig('Fig_' + plot_name + '_plot1.png', dpi = num_dpi, bbox_inches='tight', pad_inches = 0.01) plt.savefig('Fig_' + plot_name + '_plot1.tiff', dpi = num_dpi, bbox_inches='tight', pad_inches = 0.01, format="tiff", pil_kwargs={"compression": "tiff_lzw"}) # = # ### save plots # plt.savefig('SHOPA_' + area_type2 + '_plot1.png', dpi=600, bbox_inches='tight', pad_inches = 0.01) # plt.savefig('SHOPA_' + area_type2 + '_plot1.tiff', dpi=600, bbox_inches='tight', pad_inches = 0.01, format="tiff", pil_kwargs={"compression": "tiff_lzw"}) # # = ### plot histo plt.figure(); X.plot.hist(alpha = 0.5) plt.show() export_plot('testplot' , 600) plt.show() # X.diff().hist(color='k', alpha=0.5, bins=50) # plt.show() # = # # Plot the raw time series # fig = plt.figure(constrained_layout=True) # gs = gridspec.GridSpec(2, 3, figure=fig) # ax = fig.add_subplot(gs[0, :]) # ax.plot(t, y) # ax.set_xlabel('time [s]') # ax.set_ylabel('signal') # # = ### Good plt.figure() # fig, (ax0, ax1) = plt.subplots(ncols=2, constrained_layout=True) fig, ax1 = plt.subplots(ncols=1, constrained_layout=True) X.plot.box() fig = X.plot(subplots=True, figsize=(6, 6)); fig.X.subplot() ### Stacking subplots in two directions ### When stacking in two directions, the returned axs is a 2D numpy array. # # If you have to set parameters for each subplot it's handy to iterate over all subplots in a 2D grid using for ax in axs.flat:. # ### 'q_hosheal2_MEAN', 'q_khos2_MEAN', 'q_dhos3_MEAN' fig, axs = plt.subplots(2, 2) axs[0, 0].plot(X['q_hos1_MEAN'], bins = 10) axs[0,
Re: [R] Error of Stepwise Regression with number of rows in use has changed: remove missing values?
This solution such as data-na.omit(original database) before you run step() or stepAIC() has some limitations, I think. I reduced the number of data lines, and it enhance R square value. If you have some tips or advices for another solution, I welcome. Kum Urban and Regional Planning, GRI On Sat, Feb 20, 2010 at 5:57 AM, Greg Snow greg.s...@imail.org wrote: Have you considered the implications of that solution? -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare greg.s...@imail.org 801.408.8111 -Original Message- From: r-help-boun...@r-project.org [mailto:r-help-boun...@r- project.org] On Behalf Of Kum-Hoe Hwang Sent: Wednesday, February 17, 2010 1:41 AM To: r-help@r-project.org Subject: Re: [R] Error of Stepwise Regression with number of rows in use has changed: remove missing values? I thank those who helped to solve a error in stepwise regression with missing values. Kum * * A good solution that I have tried was Andreas's advice. = Try data-na.omit(original database) before you run step() or stepAIC() On Tue, Feb 16, 2010 at 8:09 PM, Peter Ehlers ehl...@ucalgary.ca wrote: On 2010-02-16 1:24, Kum-Hoe Hwang wrote: Howdy, R Grues I have enjoyed R, but I cannot solve one problem easily. Please help my problem. When I tried the R script, I got the following Error. This error results from input data file exported through a Excel spreadsheet software. Error in step(lm(pop.rate ~ as.numeric(year) + as.factor(policy) + as.numeric(nation.grant) + : number of rows in use has changed: remove missing values? Could you direct me to solve the Error? Thanks in advance, This is a common situation when you use step() on data where the predictors have missing values. A case (row) is included in the model only if all the predictors for that model are non-missing for the case. As you vary which predictors are to be in the model, the included cases will vary, resulting in models based on different data. (Think of your cases as subjects; you want all your models to be based on the same set of subjects.) Finally: (Re-)read the help page and note the 'warning'. -Peter Ehlers ### outputs from R console ### pop- step( + lm(pop.rate ~ as.numeric(year) + as.factor(policy) + as.numeric(nation.grant) + + as.numeric(do.grant) + as.numeric(city.grant) + as.numeric(DMZ.dist) + as.numeric(Seoul.dist), data=borderI.data, na.action = na.omit) + ) Start: AIC=494.27 pop.rate ~ as.numeric(year) + as.factor(policy) + as.numeric(nation.grant) + as.numeric(do.grant) + as.numeric(city.grant) + as.numeric(DMZ.dist) + as.numeric(Seoul.dist) Df Sum of Sq RSS AIC - as.numeric(do.grant) 1 0.71 6622.9 492.28 - as.factor(policy) 1 1.21 6623.4 492.29 - as.numeric(DMZ.dist) 1 1.91 6624.1 492.30 - as.numeric(city.grant) 1 5.07 6627.3 492.36 - as.numeric(nation.grant) 1 11.51 6633.7 492.47 - as.numeric(year) 1 29.58 6651.8 492.80 none 6622.2 494.27 - as.numeric(Seoul.dist) 1 673.22 7295.4 503.79 Step: AIC=492.28 pop.rate ~ as.numeric(year) + as.factor(policy) + as.numeric(nation.grant) + as.numeric(city.grant) + as.numeric(DMZ.dist) + as.numeric(Seoul.dist) Df Sum of Sq RSS AIC - as.factor(policy) 1 1.99 6624.9 490.32 - as.numeric(DMZ.dist) 1 2.09 6625.0 490.32 - as.numeric(city.grant) 1 7.18 6630.1 490.41 - as.numeric(nation.grant) 1 20.08 6643.0 490.64 - as.numeric(year) 1 28.89 6651.8 490.80 none 6622.9 492.28 - as.numeric(Seoul.dist) 1 697.46 7320.4 502.20 Step: AIC=490.32 pop.rate ~ as.numeric(year) + as.numeric(nation.grant) + as.numeric(city.grant) + as.numeric(DMZ.dist) + as.numeric(Seoul.dist) Df Sum of Sq RSS AIC - as.numeric(DMZ.dist) 1 2.08 6627.0 488.35 - as.numeric(city.grant) 1 10.65 6635.6 488.51 - as.numeric(nation.grant) 1 31.30 6656.2 488.88 - as.numeric(year) 1 31.44 6656.4 488.88 none 6624.9 490.32 - as.numeric(Seoul.dist) 1 732.88 7357.8 500.80 Step: AIC=488.35 pop.rate ~ as.numeric(year) + as.numeric(nation.grant) + as.numeric(city.grant) + as.numeric(Seoul.dist) Df Sum of Sq RSS AIC - as.numeric(city.grant) 1 9.86 6636.9 486.53 - as.numeric(year) 1 31.42 6658.4 486.92 - as.numeric(nation.grant) 1 33.33 6660.3 486.95 none 6627.0 488.35 - as.numeric(Seoul.dist
Re: [R] Error of Stepwise Regression with number of rows in use has changed: remove missing values?
I thank those who helped to solve a error in stepwise regression with missing values. Kum * * A good solution that I have tried was Andreas's advice. = Try data-na.omit(original database) before you run step() or stepAIC() On Tue, Feb 16, 2010 at 8:09 PM, Peter Ehlers ehl...@ucalgary.ca wrote: On 2010-02-16 1:24, Kum-Hoe Hwang wrote: Howdy, R Grues I have enjoyed R, but I cannot solve one problem easily. Please help my problem. When I tried the R script, I got the following Error. This error results from input data file exported through a Excel spreadsheet software. Error in step(lm(pop.rate ~ as.numeric(year) + as.factor(policy) + as.numeric(nation.grant) + : number of rows in use has changed: remove missing values? Could you direct me to solve the Error? Thanks in advance, This is a common situation when you use step() on data where the predictors have missing values. A case (row) is included in the model only if all the predictors for that model are non-missing for the case. As you vary which predictors are to be in the model, the included cases will vary, resulting in models based on different data. (Think of your cases as subjects; you want all your models to be based on the same set of subjects.) Finally: (Re-)read the help page and note the 'warning'. -Peter Ehlers ### outputs from R console ### pop- step( + lm(pop.rate ~ as.numeric(year) + as.factor(policy) + as.numeric(nation.grant) ++ as.numeric(do.grant) + as.numeric(city.grant) + as.numeric(DMZ.dist) + as.numeric(Seoul.dist), data=borderI.data, na.action = na.omit) + ) Start: AIC=494.27 pop.rate ~ as.numeric(year) + as.factor(policy) + as.numeric(nation.grant) + as.numeric(do.grant) + as.numeric(city.grant) + as.numeric(DMZ.dist) + as.numeric(Seoul.dist) Df Sum of SqRSSAIC - as.numeric(do.grant) 1 0.71 6622.9 492.28 - as.factor(policy) 1 1.21 6623.4 492.29 - as.numeric(DMZ.dist) 1 1.91 6624.1 492.30 - as.numeric(city.grant)1 5.07 6627.3 492.36 - as.numeric(nation.grant) 1 11.51 6633.7 492.47 - as.numeric(year) 1 29.58 6651.8 492.80 none6622.2 494.27 - as.numeric(Seoul.dist)1673.22 7295.4 503.79 Step: AIC=492.28 pop.rate ~ as.numeric(year) + as.factor(policy) + as.numeric(nation.grant) + as.numeric(city.grant) + as.numeric(DMZ.dist) + as.numeric(Seoul.dist) Df Sum of SqRSSAIC - as.factor(policy) 1 1.99 6624.9 490.32 - as.numeric(DMZ.dist) 1 2.09 6625.0 490.32 - as.numeric(city.grant)1 7.18 6630.1 490.41 - as.numeric(nation.grant) 1 20.08 6643.0 490.64 - as.numeric(year) 1 28.89 6651.8 490.80 none6622.9 492.28 - as.numeric(Seoul.dist)1697.46 7320.4 502.20 Step: AIC=490.32 pop.rate ~ as.numeric(year) + as.numeric(nation.grant) + as.numeric(city.grant) + as.numeric(DMZ.dist) + as.numeric(Seoul.dist) Df Sum of SqRSSAIC - as.numeric(DMZ.dist) 1 2.08 6627.0 488.35 - as.numeric(city.grant)1 10.65 6635.6 488.51 - as.numeric(nation.grant) 1 31.30 6656.2 488.88 - as.numeric(year) 1 31.44 6656.4 488.88 none6624.9 490.32 - as.numeric(Seoul.dist)1732.88 7357.8 500.80 Step: AIC=488.35 pop.rate ~ as.numeric(year) + as.numeric(nation.grant) + as.numeric(city.grant) + as.numeric(Seoul.dist) Df Sum of SqRSSAIC - as.numeric(city.grant)1 9.86 6636.9 486.53 - as.numeric(year) 1 31.42 6658.4 486.92 - as.numeric(nation.grant) 1 33.33 6660.3 486.95 none6627.0 488.35 - as.numeric(Seoul.dist)1754.40 7381.4 499.18 Error in step(lm(pop.rate ~ as.numeric(year) + as.factor(policy) + as.numeric(nation.grant) + : --- number of rows in use has changed: remove missing values? -- -- Kum-Hoe Hwang, Ph.D. Phone : 82-31-250-3516 Email : phdhw...@gmail.com -- Peter Ehlers University of Calgary -- Kum-Hoe Hwang, Ph.D. Phone : 82-31-250-3516 Email : phdhw...@gmail.com [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Error of Stepwise Regression with number of rows in use has changed: remove missing values?
Sorry for my faulty email and another correct email I thank those who helped to solve a error in stepwise regression with missing values. A good solution that I have tried was Andreas's advice. = Try data-na.omit(original database) before you run step() or stepAIC() Kum On Tue, Feb 16, 2010 at 8:09 PM, Peter Ehlers ehl...@ucalgary.ca wrote: On 2010-02-16 1:24, Kum-Hoe Hwang wrote: Howdy, R Grues I have enjoyed R, but I cannot solve one problem easily. Please help my problem. When I tried the R script, I got the following Error. This error results from input data file exported through a Excel spreadsheet software. Error in step(lm(pop.rate ~ as.numeric(year) + as.factor(policy) + as.numeric(nation.grant) + : number of rows in use has changed: remove missing values? Could you direct me to solve the Error? Thanks in advance, This is a common situation when you use step() on data where the predictors have missing values. A case (row) is included in the model only if all the predictors for that model are non-missing for the case. As you vary which predictors are to be in the model, the included cases will vary, resulting in models based on different data. (Think of your cases as subjects; you want all your models to be based on the same set of subjects.) Finally: (Re-)read the help page and note the 'warning'. -Peter Ehlers ### outputs from R console ### pop- step( + lm(pop.rate ~ as.numeric(year) + as.factor(policy) + as.numeric(nation.grant) + + as.numeric(do.grant) + as.numeric(city.grant) + as.numeric(DMZ.dist) + as.numeric(Seoul.dist), data=borderI.data, na.action = na.omit) + ) Start: AIC=494.27 pop.rate ~ as.numeric(year) + as.factor(policy) + as.numeric(nation.grant) + as.numeric(do.grant) + as.numeric(city.grant) + as.numeric(DMZ.dist) + as.numeric(Seoul.dist) Df Sum of Sq RSS AIC - as.numeric(do.grant) 1 0.71 6622.9 492.28 - as.factor(policy) 1 1.21 6623.4 492.29 - as.numeric(DMZ.dist) 1 1.91 6624.1 492.30 - as.numeric(city.grant) 1 5.07 6627.3 492.36 - as.numeric(nation.grant) 1 11.51 6633.7 492.47 - as.numeric(year) 1 29.58 6651.8 492.80 none 6622.2 494.27 - as.numeric(Seoul.dist) 1 673.22 7295.4 503.79 Step: AIC=492.28 pop.rate ~ as.numeric(year) + as.factor(policy) + as.numeric(nation.grant) + as.numeric(city.grant) + as.numeric(DMZ.dist) + as.numeric(Seoul.dist) Df Sum of Sq RSS AIC - as.factor(policy) 1 1.99 6624.9 490.32 - as.numeric(DMZ.dist) 1 2.09 6625.0 490.32 - as.numeric(city.grant) 1 7.18 6630.1 490.41 - as.numeric(nation.grant) 1 20.08 6643.0 490.64 - as.numeric(year) 1 28.89 6651.8 490.80 none 6622.9 492.28 - as.numeric(Seoul.dist) 1 697.46 7320.4 502.20 Step: AIC=490.32 pop.rate ~ as.numeric(year) + as.numeric(nation.grant) + as.numeric(city.grant) + as.numeric(DMZ.dist) + as.numeric(Seoul.dist) Df Sum of Sq RSS AIC - as.numeric(DMZ.dist) 1 2.08 6627.0 488.35 - as.numeric(city.grant) 1 10.65 6635.6 488.51 - as.numeric(nation.grant) 1 31.30 6656.2 488.88 - as.numeric(year) 1 31.44 6656.4 488.88 none 6624.9 490.32 - as.numeric(Seoul.dist) 1 732.88 7357.8 500.80 Step: AIC=488.35 pop.rate ~ as.numeric(year) + as.numeric(nation.grant) + as.numeric(city.grant) + as.numeric(Seoul.dist) Df Sum of Sq RSS AIC - as.numeric(city.grant) 1 9.86 6636.9 486.53 - as.numeric(year) 1 31.42 6658.4 486.92 - as.numeric(nation.grant) 1 33.33 6660.3 486.95 none 6627.0 488.35 - as.numeric(Seoul.dist) 1 754.40 7381.4 499.18 Error in step(lm(pop.rate ~ as.numeric(year) + as.factor(policy) + as.numeric(nation.grant) + : --- number of rows in use has changed: remove missing values? -- -- Kum-Hoe Hwang, Ph.D. Phone : 82-31-250-3516 Email : phdhw...@gmail.com -- Peter Ehlers University of Calgary -- Kum-Hoe Hwang, Ph.D. Phone : 82-31-250-3516 Email : phdhw...@gmail.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Error of Stepwise Regression with number of rows in use has changed: remove missing values?
Howdy, R Grues I have enjoyed R, but I cannot solve one problem easily. Please help my problem. When I tried the R script, I got the following Error. This error results from input data file exported through a Excel spreadsheet software. Error in step(lm(pop.rate ~ as.numeric(year) + as.factor(policy) + as.numeric(nation.grant) + : number of rows in use has changed: remove missing values? Could you direct me to solve the Error? Thanks in advance, ### outputs from R console ### pop - step( + lm(pop.rate ~ as.numeric(year) + as.factor(policy) + as.numeric(nation.grant) + + as.numeric(do.grant) + as.numeric(city.grant) + as.numeric(DMZ.dist) + as.numeric(Seoul.dist), data=borderI.data, na.action = na.omit) + ) Start: AIC=494.27 pop.rate ~ as.numeric(year) + as.factor(policy) + as.numeric(nation.grant) + as.numeric(do.grant) + as.numeric(city.grant) + as.numeric(DMZ.dist) + as.numeric(Seoul.dist) Df Sum of Sq RSS AIC - as.numeric(do.grant) 1 0.71 6622.9 492.28 - as.factor(policy) 1 1.21 6623.4 492.29 - as.numeric(DMZ.dist) 1 1.91 6624.1 492.30 - as.numeric(city.grant) 1 5.07 6627.3 492.36 - as.numeric(nation.grant) 1 11.51 6633.7 492.47 - as.numeric(year) 1 29.58 6651.8 492.80 none 6622.2 494.27 - as.numeric(Seoul.dist) 1 673.22 7295.4 503.79 Step: AIC=492.28 pop.rate ~ as.numeric(year) + as.factor(policy) + as.numeric(nation.grant) + as.numeric(city.grant) + as.numeric(DMZ.dist) + as.numeric(Seoul.dist) Df Sum of Sq RSS AIC - as.factor(policy) 1 1.99 6624.9 490.32 - as.numeric(DMZ.dist) 1 2.09 6625.0 490.32 - as.numeric(city.grant) 1 7.18 6630.1 490.41 - as.numeric(nation.grant) 1 20.08 6643.0 490.64 - as.numeric(year) 1 28.89 6651.8 490.80 none 6622.9 492.28 - as.numeric(Seoul.dist) 1 697.46 7320.4 502.20 Step: AIC=490.32 pop.rate ~ as.numeric(year) + as.numeric(nation.grant) + as.numeric(city.grant) + as.numeric(DMZ.dist) + as.numeric(Seoul.dist) Df Sum of Sq RSS AIC - as.numeric(DMZ.dist) 1 2.08 6627.0 488.35 - as.numeric(city.grant) 1 10.65 6635.6 488.51 - as.numeric(nation.grant) 1 31.30 6656.2 488.88 - as.numeric(year) 1 31.44 6656.4 488.88 none 6624.9 490.32 - as.numeric(Seoul.dist) 1 732.88 7357.8 500.80 Step: AIC=488.35 pop.rate ~ as.numeric(year) + as.numeric(nation.grant) + as.numeric(city.grant) + as.numeric(Seoul.dist) Df Sum of Sq RSS AIC - as.numeric(city.grant) 1 9.86 6636.9 486.53 - as.numeric(year) 1 31.42 6658.4 486.92 - as.numeric(nation.grant) 1 33.33 6660.3 486.95 none 6627.0 488.35 - as.numeric(Seoul.dist) 1 754.40 7381.4 499.18 Error in step(lm(pop.rate ~ as.numeric(year) + as.factor(policy) + as.numeric(nation.grant) + : --- number of rows in use has changed: remove missing values? -- -- Kum-Hoe Hwang, Ph.D. Phone : 82-31-250-3516 Email : phdhw...@gmail.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Entire Organization Switching from SAS to R - Any experience?
I work for a research institute. I have used R for several years. I think there are some good and bad sides followings: Good sides are: I can use new statistical methods from R. no license fee.. Bad sides are : physical memory in PC is an obstacle (max. 3GB), some package of R is still being developed(unstable-not really a problem), kind manual( this will be OK if you have training from some R company) k Hwang On Fri, Jul 17, 2009 at 10:51 AM, Frank E Harrell Jr f.harr...@vanderbilt.edu wrote: Kel Lam wrote: My institute has been heavily dependent on SAS for the past while, and SAS is starting to charge us a very deep amount for license renewal. Since we are a non-profit organization that is definitely not sustainable. The team is brainstorming possibility of switching to R, at least gradually. I am talking about the entire institute with considerable number of analysts using SAS their entire career. Theres a handful of us using R regularly. What kind of problems and challenges have you faced? Any insight is much appreciated. Thank you very much! Kelvin One of your challenges will be that with the increased productivity of the team you will have time for more intellectually challenging problems. That frustrates some people. Frank -- Frank E Harrell Jr Professor and Chair School of Medicine Department of Biostatistics Vanderbilt University __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Kum-Hoe Hwang, Ph.D. Phone : 82-31-250-3516 Email : phdhw...@gmail.com [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] [r] How to Solve the Error( error:cannot allocate vector of size 1.1 Gb)
Hi, Gurus Thanks to your good helps, I have managed starting the use of a text mining package so called tm in R under the OS of Win XP. However, during running the tm package, I got another mine like memory problem. What is a the best way to solve this memory problem among increasing a physical RAM, or doing other recipes, etc? ### ## my R Script's Outputs ## ### memory.limit(size = 2000) NULL corpus.ko - Corpus(DirSource(test_konews/), + readerControl = list(reader = readPlain, + language = UTF-8, load = FALSE)) corpus.ko.nowhite - tmMap(corpus.ko, stripWhitespace) corpus - tmMap(corpus.ko.nowhite, tmTolower) tdm - TermDocMatrix(corpus) findAssocs(tdm, city, 0.97) error:cannot allocate vector of size 1.1 Gb - Thanks for your precious time, -- Kum-Hoe Hwang, Ph.D. Phone : 82-31-250-3516 Email : phdhw...@gmail.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Help needed for Loading tm package
I appreciate alll helpers for R. I have struggled with Rweka problem related with tm text mining package in R. My problem was solved when I replaced RWeka_0.3-15.zip with RWeka_0.3-13.zip under the OS of Win XP. Now my tm package works fine in R. I don't know why it works. Thanks all who gave me good help Kum Hwang Ph.D. On Mon, Jan 12, 2009 at 5:19 PM, Prof Brian Ripley rip...@stats.ox.ac.uk wrote: How do you account for the fact that the package passed its checks on the build machine, e.g. http://cran.r-project.org/bin/windows/contrib/2.8/check/RWeka-check.log and no one else is reporting this? (And it does work for me.) Blaming your tools is easy, but doing so on a public forum is disrespectful and against the rw-FAQ http://cran.r-project.org/bin/windows/base/rw-FAQ.html#Can-I-install-packages-into-libraries-in-this-version_003f (note the word 'unsupported'). Uwe Ligges does a great job helping Windows' users by building binary packages, and deserves your thanks, not vague and unsubstantiated blame. On Mon, 12 Jan 2009, Kum-Hoe Hwang wrote: Thank Prof. Brian Ripley for your comments. Based on Prof Brian Ripley's comments, I checked Java environments in my PC. But I have not solved a tm package problem in Win R software. I am not sure but my current conclusion is that the Win-based R binary software has definitely a problem with Rweka package or subpackage. Should I wait for another upgraded R binary version under the window XP, tm' package or Rweka ets? Or I'd better migrate to non-window OS such as Linux, etc? You definitely shou;d read and follow the FAQ, as this could well be a Java incompatibility with the binary package. Kum Hwang, Ph.D. On Sat, Jan 10, 2009 at 8:06 PM, Prof Brian Ripley rip...@stats.ox.ac.uk wrote: On Sat, 10 Jan 2009, Kum-Hoe Hwang wrote: Howdy Gurus again Thanks to Tony.Breyal, I was able to writing the following script for analyzing a text document. But I got an error with tm' package. I don't why I got the error from the R script below. I think I followed proccess of R tm manual. Please do read the messages you got. I see Error in .jinit(system.file(jar, c(weka.jar, RWeka.jar), package = pkgname, : Cannot create Java virtual machine (-1) so the problem is with your Java installation and RWeka, not 'tm'. First make sure you have a working installation of RWeka -- I suspect you do not even have Java installed, but it could be a version or path issue (but very unlikely to be an R issue). I use R v2.8.1. and tm_0.3-3.zip under Win XP. Thanks in advance, Kum Hwang # setting directory my.path -'C:\\_work\\Daddys\\myProjects\\2009 defaultProject\\R\\textfile\\' # text miner pakacge library(tm) Loading required package: Snowball Loading required package: RWeka - Error in .jinit(system.file(jar, c(weka.jar, RWeka.jar), package = pkgname, : Cannot create Java virtual machine (-1) Error : .onLoad failed in 'loadNamespace' for 'RWeka' Error: package 'RWeka' could not be loaded my.corpurs -Corpus(DirSource(my.path), readerControl = list(reader=readPlain)) Error: could not find function Corpus my.tdm - TermDocMatrix(my.corpus) Error: could not find function TermDocMatrix my.tdm[1,] Error: object my.tdm not found -- Kum-Hoe Hwang, Ph.D. Phone : 82-31-250-3516 Email : phdhw...@gmail.com [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Brian D. Ripley, rip...@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 -- Kum-Hoe Hwang, Ph.D. Phone : 82-31-250-3516 Email : phdhw...@gmail.com -- Brian D. Ripley, rip...@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 -- Kum-Hoe Hwang, Ph.D. Phone : 82-31-250-3516 Email : phdhw...@gmail.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] Help needed for Loading tm package
Thank Prof. Brian Ripley for your comments. Based on Prof Brian Ripley's comments, I checked Java environments in my PC. But I have not solved a tm package problem in Win R software. I am not sure but my current conclusion is that the Win-based R binary software has definitely a problem with Rweka package or subpackage. Should I wait for another upgraded R binary version under the window XP, tm' package or Rweka ets? Or I'd better migrate to non-window OS such as Linux, etc? Kum Hwang, Ph.D. On Sat, Jan 10, 2009 at 8:06 PM, Prof Brian Ripley rip...@stats.ox.ac.uk wrote: On Sat, 10 Jan 2009, Kum-Hoe Hwang wrote: Howdy Gurus again Thanks to Tony.Breyal, I was able to writing the following script for analyzing a text document. But I got an error with tm' package. I don't why I got the error from the R script below. I think I followed proccess of R tm manual. Please do read the messages you got. I see Error in .jinit(system.file(jar, c(weka.jar, RWeka.jar), package = pkgname, : Cannot create Java virtual machine (-1) so the problem is with your Java installation and RWeka, not 'tm'. First make sure you have a working installation of RWeka -- I suspect you do not even have Java installed, but it could be a version or path issue (but very unlikely to be an R issue). I use R v2.8.1. and tm_0.3-3.zip under Win XP. Thanks in advance, Kum Hwang # setting directory my.path -'C:\\_work\\Daddys\\myProjects\\2009 defaultProject\\R\\textfile\\' # text miner pakacge library(tm) Loading required package: Snowball Loading required package: RWeka - Error in .jinit(system.file(jar, c(weka.jar, RWeka.jar), package = pkgname, : Cannot create Java virtual machine (-1) Error : .onLoad failed in 'loadNamespace' for 'RWeka' Error: package 'RWeka' could not be loaded my.corpurs -Corpus(DirSource(my.path), readerControl = list(reader=readPlain)) Error: could not find function Corpus my.tdm - TermDocMatrix(my.corpus) Error: could not find function TermDocMatrix my.tdm[1,] Error: object my.tdm not found -- Kum-Hoe Hwang, Ph.D. Phone : 82-31-250-3516 Email : phdhw...@gmail.com [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Brian D. Ripley, rip...@stats.ox.ac.uk Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/ University of Oxford, Tel: +44 1865 272861 (self) 1 South Parks Road, +44 1865 272866 (PA) Oxford OX1 3TG, UKFax: +44 1865 272595 -- Kum-Hoe Hwang, Ph.D. Phone : 82-31-250-3516 Email : phdhw...@gmail.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Re: [R] [R} how to build TermDocMatrix in tm text mining package of R
Thank your comments very much. Thank to your help, I understood a flow for a text analysis. However, I could not run the above R scripts because tm package does not work in my PC that is a critical error. Kum Hwang Ph.D. On Sat, Jan 10, 2009 at 12:39 AM, Tony Breyal tony.bre...@googlemail.com wrote: Hi there, I think something like the following is what you want: ### R start... # if you put your plain text files in a folder like this my.path - 'C:\\Documents and Settings\\tony\\Desktop\\texts\\' # then you can construct a simple tdm like this library(tm) my.corpus - Corpus(DirSource(my.path), readerControl = list (reader=readPlain)) my.tdm - TermDocMatrix(my.corpus) # this show show how words are distributed in the first text document my.tdm[1, ] ### R end. by the way, there are some nice examples of using the tm package in the last Rnews letter (Volume 8/2, October 2008), under the section 'An Introduction to Text Mining in R': http://cran.r-project.org/doc/Rnews/Rnews_2008-2.pdf Hope that helps a little bit, Tony Breyal On 9 Jan, 14:21, Kum-Hoe Hwang phdhw...@gmail.com wrote: Howdy Gurus I 'd like to ask a question about how to build TermDocMatrix in tm text mining package. It is not clear about importing a plain text file, and them converting that text file into TermDocMatrix file, etc to me. How can I build a TermDocMatrix of a plain text document file for text association? Or are there any good manuals? Thank you in advance, -- Kum-Hoe Hwang, Ph.D. Phone : 82-31-250-3516 Email : phdhw...@gmail.com [[alternative HTML version deleted]] __ r-h...@r-project.org mailing listhttps://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guidehttp://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. -- Kum-Hoe Hwang, Ph.D. Phone : 82-31-250-3516 Email : phdhw...@gmail.com __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] Help needed for Loading tm package
Howdy Gurus again Thanks to Tony.Breyal, I was able to writing the following script for analyzing a text document. But I got an error with tm' package. I don't why I got the error from the R script below. I think I followed proccess of R tm manual. I use R v2.8.1. and tm_0.3-3.zip under Win XP. Thanks in advance, Kum Hwang # setting directory my.path -'C:\\_work\\Daddys\\myProjects\\2009 defaultProject\\R\\textfile\\' # text miner pakacge library(tm) Loading required package: Snowball Loading required package: RWeka - Error in .jinit(system.file(jar, c(weka.jar, RWeka.jar), package = pkgname, : Cannot create Java virtual machine (-1) Error : .onLoad failed in 'loadNamespace' for 'RWeka' Error: package 'RWeka' could not be loaded my.corpurs -Corpus(DirSource(my.path), readerControl = list(reader=readPlain)) Error: could not find function Corpus my.tdm - TermDocMatrix(my.corpus) Error: could not find function TermDocMatrix my.tdm[1,] Error: object my.tdm not found -- Kum-Hoe Hwang, Ph.D. Phone : 82-31-250-3516 Email : phdhw...@gmail.com [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] [R} how to build TermDocMatrix in tm text mining package of R
Howdy Gurus I 'd like to ask a question about how to build TermDocMatrix in tm text mining package. It is not clear about importing a plain text file, and them converting that text file into TermDocMatrix file, etc to me. How can I build a TermDocMatrix of a plain text document file for text association? Or are there any good manuals? Thank you in advance, -- Kum-Hoe Hwang, Ph.D. Phone : 82-31-250-3516 Email : phdhw...@gmail.com [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
[R] How to Compute envelope of Khat in Splancs Package
Howdy Gurus I am try to compute envelope of Khat from simulations of complete spatial randomness using R package of Splancs. I got the following error: UL.khat - Kenv.csr(length(X_coord), bnd, nsim=100, s) Doing simulation 1 Error in runif(n, min, max) : invalid arguments In addition: Warning message: NAs introduced by coercion I think that I have a problem with poly. How can I correct poly? There is a decription about poly like bnd. --- bnd min max x 160327.0 213371.8 y 390518.3 420704.6 -- Thank you for your time, --- Kum-Hoe Hwang, Ph.D.Phone : 82-31-250-3516 Email : [EMAIL PROTECTED] [[alternative HTML version deleted]] __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.