Re: [R] New to R

2007-01-01 Thread Michael Kubovy
On Dec 31, 2006, at 10:15 PM, Obinna Duru wrote:

 I have installed acepack but efforts to get started has been
 unsuccessful. I can't seem to be able to load my data files because I
 am yet to figure the syntax to use. Is there a work directory in R
 where I can put my files and call them anytime, like in Matlab? My
 files are on my C drive and I just can't figure the syntax to get  
 them into R.

Start by looking at
?getwd
?read.table
intall.packages('foreign') # if not installed
?read.spss
?read.ssd
etc.

and then
http://www.bioconductor.org/developers/progRef/fileHandling.pdf

followed by the more general
http://cran.r-project.org/doc/manuals/R-intro.pdf
_
Professor Michael Kubovy
University of Virginia
Department of Psychology
USPS: P.O.Box 400400Charlottesville, VA 22904-4400
Parcels:Room 102Gilmer Hall
 McCormick RoadCharlottesville, VA 22903
Office:B011+1-434-982-4729
Lab:B019+1-434-982-4751
Fax:+1-434-982-4766
WWW:http://www.people.virginia.edu/~mk9y/

__
R-help@stat.math.ethz.ch 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] New to R

2006-12-31 Thread Obinna Duru
Hey, I am very new to R and I need to use it (and the ACEPACK 
package) to do some statistical analysis.

I have installed acepack but efforts to get started has been 
unsuccessful. I can't seem to be able to load my data files because I 
am yet to figure the syntax to use. Is there a work directory in R 
where I can put my files and call them anytime, like in Matlab? My 
files are on my C drive and I just can't figure the syntax to get them into R.

Any help?

Best Regards

Obinna Duru

Energy Resources Engineering Department,
Green Earth Sciences Building,
367 Panama Street,
Stanford, CA 94305-2220
cell:   (650) 814 6079
fax:(659) 725 2099
email:  [EMAIL PROTECTED]





[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch 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] New to R

2006-12-31 Thread Wensui Liu
what is the format of your data files, txt/csv/mdb/xls? the syntax is
very different.
could you please give more info?

thanks.


On 12/31/06, Obinna Duru [EMAIL PROTECTED] wrote:
 Hey, I am very new to R and I need to use it (and the ACEPACK
 package) to do some statistical analysis.

 I have installed acepack but efforts to get started has been
 unsuccessful. I can't seem to be able to load my data files because I
 am yet to figure the syntax to use. Is there a work directory in R
 where I can put my files and call them anytime, like in Matlab? My
 files are on my C drive and I just can't figure the syntax to get them into R.

 Any help?

 Best Regards

 Obinna Duru

 Energy Resources Engineering Department,
 Green Earth Sciences Building,
 367 Panama Street,
 Stanford, CA 94305-2220
 cell:   (650) 814 6079
 fax:(659) 725 2099
 email:  [EMAIL PROTECTED]





 [[alternative HTML version deleted]]

 __
 R-help@stat.math.ethz.ch 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.



-- 
WenSui Liu
A lousy statistician who happens to know a little programming
(http://spaces.msn.com/statcompute/blog)

__
R-help@stat.math.ethz.ch 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] new to R: don't understand errors

2006-10-03 Thread Wingfield, Jerad G.
Hello all, 

 

I'm brand new to the use of R, and I'm trying to quickly learning the
rudiments for a couple of projects here at work. I'm working with the
lsa package and trying to generate various semantic spaces. I seem to do
well with small collections of clean text files, but now that I am
trying to work with larger collections of less than perfection files,
I'm getting errors that I don't quite understand. So I'm hoping some of
you out there might recognize my issues and be able to point me in the
right direction to resolve them.

 

Currently, I have a corpus of ~12,000 text files. I've separated them
out into other folder of varying sizes to check if there is some sort of
limit on the number of files. Even when I only use the same number as
previous working collections, I still get the errors. So I am wondering
if it might be something in the files themselves...

 

At any rate I routinely get these two errors. The first is generated
when I include a minDocFreq=x, and it looks a little like this when I
run it:

 

  data(stopwords_en)

  CCauto = textmatrix( CultureMineTXT , minWordLength=3,
minDocFreq=50, stopwords=stopwords_en)

  Error in data.frame(docs = basename(file), terms = names(tab),
Freq = tab,  :  

  arguments imply differing number of rows: 1, 0

 

If I remove the minDocFreq, I get a different error:

 

  data(stopwords_en)

  CCauto = textmatrix( CultureMineTXT , minWordLength=3,
stopwords=stopwords_en)

  Error in as.vector(x, mode) : invalid argument 'mode'

 

Any help would be greatly appreciated.

  

Gabe Wingfield

IT and Program Specialist I

Center for Applied Social Research

University of Oklahoma

3200 Marshall Avenue, Suite 201

Norman, OK 73072

 

P: 405-325-4786

F: 405-321-6936

[EMAIL PROTECTED]

 


[[alternative HTML version deleted]]

__
R-help@stat.math.ethz.ch 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] new to R: don't understand errors

2006-10-03 Thread Duncan Murdoch
On 10/3/2006 1:32 PM, Wingfield, Jerad G. wrote:
 Hello all, 
 
  
 
 I'm brand new to the use of R, and I'm trying to quickly learning the
 rudiments for a couple of projects here at work. I'm working with the
 lsa package and trying to generate various semantic spaces. I seem to do
 well with small collections of clean text files, but now that I am
 trying to work with larger collections of less than perfection files,
 I'm getting errors that I don't quite understand. So I'm hoping some of
 you out there might recognize my issues and be able to point me in the
 right direction to resolve them.
 
  
 
 Currently, I have a corpus of ~12,000 text files. I've separated them
 out into other folder of varying sizes to check if there is some sort of
 limit on the number of files. Even when I only use the same number as
 previous working collections, I still get the errors. So I am wondering
 if it might be something in the files themselves...
 
  
 
 At any rate I routinely get these two errors. The first is generated
 when I include a minDocFreq=x, and it looks a little like this when I
 run it:

Those errors are coming from R, but they indicate errors in the 
functions you are using, so you'll need to talk to the maintainer of 
that package (Fridolin Wild, whose email address you can get by 
library(help=lsa)) to find out the real cause.

Duncan Murdoch
 
  
 
  data(stopwords_en)
 
  CCauto = textmatrix( CultureMineTXT , minWordLength=3,
 minDocFreq=50, stopwords=stopwords_en)
 
  Error in data.frame(docs = basename(file), terms = names(tab),
 Freq = tab,  :  
 
  arguments imply differing number of rows: 1, 0
 
  
 
 If I remove the minDocFreq, I get a different error:
 
  
 
  data(stopwords_en)
 
  CCauto = textmatrix( CultureMineTXT , minWordLength=3,
 stopwords=stopwords_en)
 
  Error in as.vector(x, mode) : invalid argument 'mode'
 
  
 
 Any help would be greatly appreciated.
 
   
 
 Gabe Wingfield
 
 IT and Program Specialist I
 
 Center for Applied Social Research
 
 University of Oklahoma
 
 3200 Marshall Avenue, Suite 201
 
 Norman, OK 73072
 
  
 
 P: 405-325-4786
 
 F: 405-321-6936
 
 [EMAIL PROTECTED]
 
  
 
 
   [[alternative HTML version deleted]]
 
 __
 R-help@stat.math.ethz.ch 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@stat.math.ethz.ch 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] New to R

2006-03-23 Thread Petr Pikal
Wellcome. Hope you will enjoy it.

Petr.


 PLEASE do read the posting guide!


On 22 Mar 2006 at 15:24, [EMAIL PROTECTED] wrote:

From:   [EMAIL PROTECTED]
To: r-help@stat.math.ethz.ch
Date sent:  Wed, 22 Mar 2006 15:24:29 -0600
Subject:[R] New to R

 
 __
 R-help@stat.math.ethz.ch mailing list
 https://stat.ethz.ch/mailman/listinfo/r-help
 PLEASE do read the posting guide!
 http://www.R-project.org/posting-guide.html

Petr Pikal
[EMAIL PROTECTED]

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] new to R

2006-03-23 Thread linda.s
 z - read.table(c:/temp/q.txt)
Warning message:
incomplete final line found by readTableHeader on 'c:/temp/q.txt'
what does that mean?
my q.txt is like:
1, 2, 3,
33, 44, 88,
23, 43, 69,

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] new to R

2006-03-23 Thread Francisco J. Zagmutt
Hi Linda

Did you already get a reply to your question?  If not, try adding a new line 
at the end of the text (just hit enter after 69,the last number in your data 
and save the file).  You also want to use the argument sep in read.table

Since you have a comma at the end of each row you can either manually delete 
that and use read.table, or just import it the way it is and then delete the 
last variable (V4) created because of the extra comma i.e

z- read.table(q.txt, sep=,)
z
  V1 V2 V3 V4
1  1  2  3 NA
2 33 44 88 NA
3 23 43 69 NA

#V4 is an artifact from your extra comma at the end of each row

newz-z[,-4] #Deletes V4

I hope this helps

Francisco

From: linda.s [EMAIL PROTECTED]
To: R-help@stat.math.ethz.ch
Subject: [R] new to R
Date: Thu, 23 Mar 2006 01:05:21 -0800

  z - read.table(c:/temp/q.txt)
Warning message:
incomplete final line found by readTableHeader on 'c:/temp/q.txt'
what does that mean?
my q.txt is like:
1, 2, 3,
33, 44, 88,
23, 43, 69,

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! 
http://www.R-project.org/posting-guide.html

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


Re: [R] new to R

2006-03-23 Thread linda.s
On 3/23/06, Francisco J. Zagmutt [EMAIL PROTECTED] wrote:
 Hi Linda

 Did you already get a reply to your question?  If not, try adding a new line
 at the end of the text (just hit enter after 69,the last number in your data
 and save the file).  You also want to use the argument sep in read.table

 Since you have a comma at the end of each row you can either manually delete
 that and use read.table, or just import it the way it is and then delete the
 last variable (V4) created because of the extra comma i.e

 z- read.table(q.txt, sep=,)
 z
  V1 V2 V3 V4
 1  1  2  3 NA
 2 33 44 88 NA
 3 23 43 69 NA

 #V4 is an artifact from your extra comma at the end of each row

 newz-z[,-4] #Deletes V4

 I hope this helps

 Francisco
It works!
Thanks,
Linda

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html


[R] New to R

2006-03-22 Thread Antonio_Paredes

__
R-help@stat.math.ethz.ch mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html