Re: [R] Downloading a directory of text files into R

2023-07-25 Thread Bob Green
Rui, Many thanks for your reply and coding, I was not expecting so much work was required. It worked perfectly. The only thing I needed to do, was create a Temp file in the Documents folder. Thanks again, Bob At 03:52 PM 7/26/2023, Rui Barradas wrote: Às 23:06 de 25/07/2023, Bob Green

[R] Downloading a directory of text files into R

2023-07-25 Thread Bob Green
Hello, I am seeking advice as to how I can download the 833 files from this site:"http://home.brisnet.org.au/~bgreen/Data/"; I want to be able to download them to perform a textual analysis. If the 833 files, which are in a Directory with two subfolders were on my computer I could read them

Re: [R] Removing words and initials with tm

2015-04-11 Thread Bob Green
Hello Sun, The order of the TM transformations makes a lot of difference. It isn't a shortcut, but if you identify all names you could create your own Stop words list: corpus <-tm_map(corpus , removeWords, c("english", " ")) In the case of York, Key Word in Context (KWIC) syntax could be

[R] Recurrent analysis survival analysis data format question

2014-06-09 Thread Bob Green
Hello, I'm hoping for advice regarding how to set up a recurrent event survival analysis data file. My data consists of people released from custody, with survival time being measured as days before re imprisonment or end of the study. In the example below, id 5155 is released 5 times and jai

[R] Finetuning a PVClust plot

2013-04-04 Thread Bob Green
Hello, The code below produces a plot in colour, however, the results will typically be printed in black and white. I am hoping for advice regarding how the I might obtain a plot in which the red au values are in bold lettering and the green bp plots are italicised. The text in the plot is to

Re: [R] Is it possible to obtain an agglomeration schedule with R cluster analyis

2013-02-23 Thread Bob Green
|--leaf "Arkansas" `--leaf "Colorado" Does f() produce the information you need for your display? Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]

Re: [R] Is it possible to obtain an agglomeration schedule with R cluster analyis

2013-02-23 Thread Bob Green
mtext("hclust", side=1) Any assistance is appreciated, Bob At 04:01 AM 24/02/2013, Uwe Ligges wrote: On 22.02.2013 11:41, Bob Green wrote: Hello, In SPSS the cluster analysis output includes an agglomerations schedule, which details the stages when cases are joined. Is it pos

[R] Is it possible to obtain an agglomeration schedule with R cluster analyis

2013-02-22 Thread Bob Green
Hello, In SPSS the cluster analysis output includes an agglomerations schedule, which details the stages when cases are joined. Is it possible to obtain such output when performing cluster analysis in R? If so, I'd appreciate advice regarding how to obtain this information. Any assistance

Re: [R] Examining how cases are similar by cluster, in cluster analysis

2012-11-18 Thread Bob Green
- David L Carlson Associate Professor of Anthropology Texas A&M University College Station, TX 77843-4352 > -Original Message- > From: r-help-boun...@r-project.org [mailto:r-help-bounces@r- > project.org] On Behalf Of Bob Green > Sent: Sunday, November 18, 2012 5:00 AM >

[R] Examining how cases are similar by cluster, in cluster analysis

2012-11-18 Thread Bob Green
Hello, I used the following code to perform a cluster analysis on a dataframe consisting of 12 variables (coded as 1,0) and 63 cases. FS1 <- read.csv("D://Arsontest2.csv",header=T,row.names=1) str(FS1) dmat <- dist(FS1, method="binary") cl.test <- hclust (dist(FS1, method ="binary"), "av

Re: [R] Error accessing Vegan package

2012-07-28 Thread Bob Green
In relation to where I was trying to access the zip file it was here: http://cran.r-project.org/web/bin/windows/contrib/r-release/vegan_2.0-4.zip I used this method as my work computer does not allow me to directly install packages. Instead I have to install through the local zip file option. I

[R] Error accessing Vegan package

2012-07-27 Thread Bob Green
Hello, I am wanting to download the Vegan package zip file. When I tried to do this I obtained the following message: "Object not found! The requested URL was not found on this server. The link on the referring page seems to be wrong or outdated. Please inform the author of that page about t

[R] Obtaining & saving cluster membership via hclust

2012-06-23 Thread Bob Green
and if so, how do I do this? The syntax I have employed so far, follows. FS4 <- read.csv("E://Arsont2.csv",header=T) dmat <- dist(FS4, method="binary") dmat ctest <- hclust (dist(FS4, method="binary"), "ave") plot(ctest) Bob Green __

Re: [R] content analysis

2010-09-15 Thread Bob Green
Christian, Have you looked at TM? There is also Quantitative Corpus Linguistics with R by Stefan Gries, which you may find of interest. Tau, Readme and rattle might be worth looking into. See also: http://ses.telecom-paristech.fr/lebart/ regards Bob ___

[R] Print density of 600 dpi for a plot

2010-03-12 Thread Bob Green
I have to create a plot with a print density of 600 dpi . Within R, is there a way to determine the print density of a plot? Any assistance is much appreciated, regards Bob __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo

Re: [R] Kruskal's MDS results

2009-04-16 Thread Bob Green
Dieter, You could always try the "Classification, clustering, and phylogeny estimation" list which often includes posts regarding MDS: http://lists.sunysb.edu/index.cgi?A0=CLASS-L regards Bob __ R-help@r-project.org mailing list https://stat.eth

[R] comparing columns in a dataframe

2009-04-04 Thread Bob Green
hello, I am hoping for some advice regarding comparing variables from 3 versions of a spreadsheet which have been combined into a single dataframe. The aim is to identify which rows have been changed. The dataframe contains 177 rows of data (each cell contains text). 'intersect' produced a f

Re: [R] error message obtained when plotting survival curves (error not previously obtained)

2009-04-01 Thread Bob Green
Hello Thomas, I had been using both survival & design packages. I have just tested both packages and can report that the error only appears after loading Design. If I just run survival there is no error. regards Bob At 06:08 PM 1/04/2009, Thomas Lumley wrote: On Wed, 1 Apr 2009, Bob G

[R] error message obtained when plotting survival curves (error not previously obtained)

2009-03-31 Thread Bob Green
uncertain regarding the error message. > library(surv2sample) > data(gastric) > fit <- survfit(Surv(time, event) ~ treatment, data = gastric) Error in get(x, envir = ns, inherits = FALSE) : variable "survfit.km" was not found > #Default plot: > pl

[R] stratified variables in a cox regression

2009-03-28 Thread Bob Green
Hello, I am hoping for assistance in regards to examining the contribution of stratified variables in a cox regression. A previous post by Terry Therneau noted that "That is the point of a strata; you are declaring a variable to NOT be proportional hazards, and thus there is no single "haz

[R] obtaining the values for the hazard function in a cox regression

2009-03-14 Thread Bob Green
Hello , I am hoping for some advice regarding obtaining the values for the hazard function in a cox regression that I have undertaken. I have a model in the following form, analysed with the package survival (v. 2.34-1) and a log-log plot obtained using Design (v. 2.1-2). For two variables,

[R] creating log-log survival plots that are not inverted

2009-02-28 Thread Bob Green
I am hoping for some advice regarding how to obtain a log-log survival plot that is not in the inverse. On page 128 of Modelling survival data by Therneau & Grambsch there is the an example of the type of desired plot, with a log of the survival curve by years. Marc Schwartz has provided me w

Re: [R] problems installing package XML to a computer without an internet connection

2009-01-11 Thread Bob Green
he current version zip file at: http://www.stats.ox.ac.uk/pub/RWin/bin/windows/contrib/2.8/ Once I copied this version of the XML file that you wrote, the installation worked without problem. Thank you again, regards Bob At 06:03 PM 11/01/2009, Prof Brian Ripley wrote: On Sun, 11 Jan 2009,

Re: [R] problems installing package XML to a computer without an internet connection

2009-01-10 Thread Bob Green
r zip file to XP. Start up R on the XP & use the menus: Packages | Install package(s) from local zip file to install it. On Sat, Jan 10, 2009 at 9:50 PM, Bob Green wrote: > Hello, > > I am hoping for some advice regarding how I can install the XML package > which I requ

[R] problems installing package XML to a computer without an internet connection

2009-01-10 Thread Bob Green
Hello, I am hoping for some advice regarding how I can install the XML package which I require to run package tm. Normally I would use the install package option, however, I have to install the packages to a laptop running XP. The laptop does not have an internet connection. Firstly I trie

[R] cox regression warning/error messages

2008-12-28 Thread Bob Green
Hello, I am hoping for some advice regarding warning/error messages I received when running a Cox regression # message 1 - obtained while creating a plot of residuals > plot (NV.zph, main = "groupNUSM - UNFIT", var= 'groupNUSM') Warning messages: 1: In approx(xx, xtime, seq(min(xx), max(xx),

[R] selecting a subset of a matrix based on a value occurring in 5 records

2008-12-24 Thread Bob Green
Hello, I am hoping for some advice as to how I might create a subset of a matrix. The matrix is 176 x 3530. The rows are individual records and the columns words. I want to create a new matrix that only consists of words which occur in at least 5 records. For example, if column 7 is "char

[R] Error in check(itp) : ‘object’ do es not represent a K sample problem with censored data

2008-11-29 Thread Bob Green
Hello, I have two questions regarding a survival analysis I have been working on. Below is the code to date. The variables: 1) recidivism$intDaysUntilFVPO are the number of days before an violent offence was committed - if no offence was committed than the days between court hearing and end

[R] sorting matrix output alphabetically

2008-10-18 Thread Bob Green
Hello, I have been using the TM package to create a TermDocMatrix, which I have saved as a matrix so that I can view word frequencies. Below is a section of the code that I have used and an excerpt of the output: What I wanted to be able to do is to view the output alphabetically - rather t

Re: [R] problem loading WordNet into R

2008-09-30 Thread Bob Green
Hello Martin, Many thanks for your reply. I tried the command you suggested, which generated version (A) below. In response - I inserted back "-" and "dict" (which I had previously tried and removed, in one of the multitude of variations I have tried) and added \\. This still produced the e

[R] problem loading WordNet into R

2008-09-30 Thread Bob Green
Hello, I am hoping someone can assist me with a problem I have trying to load the WordNet dictionary into R. Below is the error message I receive: > library(wordnet) > initDict() [1] FALSE Warning message: In initDict() : cannot find WordNet 'dict' directory: please set the environment variab

[R] removing a word, the following space and the next word

2008-09-19 Thread Bob Green
Hello, I am hoping for advice as to how I could remove all words immediately following the words 'Mr' or 'Mr.' in a csv file. For example, the following phrases are included in lines of text (along with other Mr) that could be anywhere in the file: "Mr Jones ate lunch" and "Mr Smith was t

[R] Switching the order of legend boxes in a lattice bar graph

2008-06-13 Thread Bob Green
the stacked bars in the graph which feature dark blue above light blue. I have tried changing the data as well as the order of the legend text, without success. Any assistance is much appreciated, regards Bob Green library(lattice) SNFP1 <- as.table(matrix(c(4,1, 4,4, 1,3, 2,7, 1,6, 0,

Re: [R] Error in fromchar(as.character(x)) : character string is not in a standard unambiguous format

2008-04-11 Thread Bob Green
t; >Please *do* read the help file (e.g. as.Date) before posting: the >international standard format is , and Australia has adopted that standard. > >On Fri, 11 Apr 2008, Bob Green wrote: > >>Hello, >> >>I was hoping for advice regarding resolving the above error. >

[R] Error in fromchar(as.character(x)) : character string is not in a standard unambiguous format

2008-04-11 Thread Bob Green
Hello, I was hoping for advice regarding resolving the above error. I have a csv file that contains the following variable: $ Order.Made.Date : Factor w/ 299 levels "1-Apr-08","1-Aug-05",..: 278 285 91 286 159 132 108 261 282 147 ... I want to calculate a variable named F.length, whic

[R] filtering out duplicates & creating a dataframe with unique id

2008-04-01 Thread Bob Green
his is much appreciated, regards Bob Green __ 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-contai

[R] Error message while trying to update packages: Error in gzfile(file, mode) : unable to open connection

2008-03-08 Thread Bob Green
Hello, I have just installed v 2.6.2 on a new computer running Windows XP and tried to perform 'update packages' via the menu option on the R console. Any advice on the following problem is much appreciated. Bob Below are the warning and error messages received. A search of the hard drive

[R] Updating packages from one hard-drive to another, after upgrade of R

2008-03-05 Thread Bob Green
The CPU on my computer 'died' and I have had to purchase a new computer. I have just installed v 2.6.2. My previous computer had v 2.5.1 and a large number of files in the library folder. These files have been copied to a partition on my new hard drive, along with the old R installation. Can

[R] another index question

2007-12-29 Thread Bob Green
x27; > pre_ <- new[reoffend$pre07| reoffend$pre08 | reoffend$pre09 | reoffend$pre10 |reoffend$pre11 | reoffend$pre12 | reoffend$pre13 | reoffend$pre14 |reoffend$pre15 | reoffend$pre16<= 0 ] <- 'O' > Secondly, once this is resolved I was hoping to change the prefix &q

[R] index question

2007-12-28 Thread Bob Green
as to how to generate Example 6. 3. I wanted to exclude cases with a reoffend$Decision of value of 3, using the code below. However, I received a message saying there were NAs produced, however, the raw variable did not have NAs. > MHT.decision <- reoffend[reoffend$Decision >= &

[R] improving a bar graph

2007-12-16 Thread Bob Green
,8,5,3) Time3 <- c (10,0,3,0,0,6,0,0,0,0,0,0,0,0,0,0) df <- rbind (Time1, Time2, Time3) dft <- (t(df)) dft barplot(dft, beside = TRUE, main= "Risk score by assessment", xlab = " Score", ylab = "frequency", col="blue")

[R] calculating the number of days from dates

2007-12-14 Thread Bob Green
Hello, I gather variants of this question have been asked previously. I have done some reading but only became more confused, as I suspect what I am trying to do is more basic than other applications. The following code readily calculates the difference in days between two dates: newdays <-

[R] Prorating scale items

2007-11-30 Thread Bob Green
and C items. H1, H2, H3, H4, H5, H6, H7, H8, H9, H10, C1, C2, C3, C4, C5, R1, R2, R3, R4, R5 I am uncertain as to whether a series of IF statements are required or some other strategy. Prorating is the method a researcher using this scale has recommended. Any advice is appreciated, Bob Green

Re: [R] reading csv files - SYLK : file format not valid

2007-11-10 Thread Bob Green
Deng, Spot on. This was the problem - now the file opens perfectly. Thanks. Bob __ 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

[R] reading csv files - SYLK : file format not valid

2007-11-10 Thread Bob Green
I am wanting to read EXCEL files into R. In the past I have saved EXCEL files as csv files without difficulty. Recently, when I have saved the files in this format I am then unable to open them again in EXCEL or though windows (XP). I receive a message stating - SYLK: file format not valid.