[R] Uploading CSV file into R

2011-05-11 Thread Me
rg/Data.aspx?d=WDI&f=Indicator_Code%3aNY.GNP.PCAP.PP.CD http://data.un.org/Data.aspx?d=UNODC&f=tableCode%3a1 Thanks for your help. Let me know if you need more information. -- View this message in context: http://r.789695.n4.nabble.com/Uploading-CSV-file-into-R-tp3515237p3515237.html Sent from th

Re: [R] Uploading CSV file into R

2011-05-12 Thread Me
Sorry if I don't know all the vocabulary. I'm taking a research methods class that uses R, but I'm a journalism major, so I'm not very good with a lot of computer jargon. The read.csv operator didn't work. I got the following error message: Error in file(file, "rt") : cannot open the connection In

Re: [R] Uploading CSV file into R

2011-05-14 Thread Me
OK, I have another question if you guys don't mind helping again. I have all of the information I need in a csv file, and I've read the csv file into R, but I'm having some trouble manipulating it. In the past, I've always manipulated data that was premade for me in the clas

[R] combining bar and column graphs?

2008-05-11 Thread Me
Hi, I'm hoping to find out whether R, or an R add-on, can generate a particular type of graph. And, more basically, whether such a type of graph even makes sense. I'm looking for something resembling both a column chart and a bar chart, where the basic visual "unit" is a solid rectangle of col

Re: [R] combining bar and column graphs?

2008-05-12 Thread Me
Michael Kubovy wrote: Perhaps ?mosaic or ?mosaicplot Thanks for these helpful suggestions - I will try them both out - __ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-pro

[R] how to find end of a FASTA file

2012-09-13 Thread mail me
Hi: I am trying to find end of a FASTA file: library(ShortRead) fastadata <- readFasta("fastafolder", "fa$") file <- tempfile() writeFasta(fastadata, file) var1 <- readLines(file) while(countlength(tmp <- readLines(file, n = -1)) > 0) { #do something } I want the while loop to run till the end

[R] PCA on high dimentional data

2011-12-10 Thread mail me
Hi: I have a large dataset mydata, of 1000 rows and 1000 columns. The rows have gene names and columns have condition names (cond1, cond2, cond3, etc). mydata<- read.table(file="c:/file1.mtx", header=TRUE, sep="") I applied PCA as follows: data_after_pca<- prcomp(mydata, retx=TRUE, center=TRUE,

[R] data generation

2012-03-04 Thread mail me
Hi: I am trying to generate data form a simple linear regression model. The training data T = {(x1, y1), . . . , (xn), yn}, want to sample x uniformly from the range [0,1], find uncorrupted response y = x^2, and generate random noise "e" from normal distribution N(0, 1). Any idea how to do in sim

[R] word frequency count

2012-03-18 Thread mail me
Hi: I have a dataframe containing comma seperated group of words such as milk,bread bread,butter beer,diaper beer,diaper milk,bread beer,diaper I want to output the frequency of occurrence of comma separated words for each row and collapse duplicate rows, to make the output as shown in the follo

Re: [R] word frequency count

2012-03-18 Thread mail me
Hi: Suppose I create the dataframe df using the following code: df <- data.frame( item1 = c('milk', 'bread','beer','beer','milk','beer'), item2 =c('bread', 'butter','diaper','diaper','bread', 'diaper'), stringsAsFactors = F); df item1 item2 1 milk bread 2 bread butter 3 beer diaper 4 bee

Re: [R] word frequency count

2012-03-18 Thread mail me
_ > From: r-help-boun...@r-project.org [r-help-boun...@r-project.org] On Behalf > Of mail me [mailme...@googlemail.com] > Sent: 18 March 2012 13:31 > To: r-help > Subject: Re: [R] word frequency count > > Hi: > > Suppose I create the dataframe df

[R] writing data to file

2012-03-22 Thread mail me
Hi: I created a data frame df <- data.frame( person = c('John','Bob','Mary'), team = c('a','b','c'), stringsAsFactors = F); and obtained the expected output df person team 1 John a 2Bob b 3 Mary c now I want to save the whole content of df preserving its row and co

[R] how to cluster rows of words in a text file

2012-03-23 Thread mail me
Hi: I am trying to cluster the rows of a text file with kmeans: I load the data as follows file1 <- read.csv("somefile.csv") and the file can be viewed having the following line of words > file1 1 word1 word3 word4 word1 2 word1 word4 word3 word1 3 word4 word2 word4 word3 4 word4 word2

[R] create waveform sawtooth

2012-03-26 Thread mail me
Hi: I am trying to create a sawtooth waveform. I used the following x <- runif(500, min = -2, max = 2) y <- (1 -abs(x3))* ((x3) <= 1) combined <- data.frame(x = x3, y = y3) plot(combined) and I get a triangular waveform, not sawtooth. Can someone give a solution to create a sawtooth waveform? T

Re: [R] Inefficiency of SAS Programming

2009-02-27 Thread spam me
I've actually used AHRQ's software to create Inpatient Quality Indicator reports. I can confirm pretty much what we already know; it is inefficient. Running on about 1.8 - 2 million cases, it would take just about a whole day to run the entire process from start to finish. That isn't all processi

[R] Problem with predict and lines in plotting binomial glm

2011-09-21 Thread Heystek, A, Me <15418...@sun.ac.za>
Problems with predict and lines in plotting binomial glm Dear R-helpers I have found quite a lot of tips on how to work with glm through this mailing list, but still have a problem that I can't solve. I have got a data set of which the x-variable is count data and the y-variable is proportional