[R] Qualitative Data??(String command)

2006-10-27 Thread Davia Cox
I am using the read.table function to load an Excel data set into R.
It has a few variables with very long qualitative (free response
typically in sentences) response that I would like to keep, but would
like to limit the length of the response that R shows. Is there some
sort of string or column width command I can include in the read.table
function to limit the length of words used in the variables that have
long responses?? I do know which variable names are the ones with the
qualitative responses. Will the Rcmdr program do this for me? I know
STATA has this function but I don't have it on my computer to use.

Davia


-- 
Davia S. Cox
Image creates desire. You will what you imagine.
~J.G. Gallimore~

__
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] Question

2005-12-13 Thread Davia Cox
Hello,

I have a problem that I am trying to solve and I am not sure how to  
do it in R.

Suppose, that 16 numbers are choosen at random from 0 to 9, what's  
the probability that their average will be between 4 and 6. I typed  
the following code:

set.seed(100)
sample(0:9, 16, replace =TRUE)
[1] 3 2 5 0 4 4 8 3 5 1 6 8 2 3 7 6

Is what I got, however I realize the set.seed function locks in the  
number I get every time.
My question is in order to run a true random sample, wouldn't I have  
to use the runif function? And then deliminate the sample to show the  
numbers that lie between 4 and 6? If that's the case, how do I do that?


Davia S. Cox
517-575-8031 cell
[EMAIL PROTECTED]

Human potential, though not always apparent, is there waiting to be  
discovered and invited forth. -William W. Purkey

__
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] Question

2005-12-13 Thread Davia Cox
Please disregard this message and don't post it to the web. I found  
the answer.
Thanks

Davia S. Cox
517-575-8031 cell
[EMAIL PROTECTED]

Human potential, though not always apparent, is there waiting to be  
discovered and invited forth. -William W. Purkey




On Dec 13, 2005, at 6:20 AM, Davia Cox wrote:

 Hello,

 I have a problem that I am trying to solve and I am not sure how to  
 do it in R.

 Suppose, that 16 numbers are choosen at random from 0 to 9, what's  
 the probability that their average will be between 4 and 6. I typed  
 the following code:

 set.seed(100)
 sample(0:9, 16, replace =TRUE)
[1] 3 2 5 0 4 4 8 3 5 1 6 8 2 3 7 6

 Is what I got, however I realize the set.seed function locks in the  
 number I get every time.
 My question is in order to run a true random sample, wouldn't I  
 have to use the runif function? And then deliminate the sample to  
 show the numbers that lie between 4 and 6? If that's the case, how  
 do I do that?


 Davia S. Cox
 517-575-8031 cell
 [EMAIL PROTECTED]

 Human potential, though not always apparent, is there waiting to  
 be discovered and invited forth. -William W. Purkey





__
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] read.spss problem

2005-11-28 Thread Davia Cox
Hello,
I am having trouble reading an spss file into R. I have reset my  
working directory to the folder where this file is stored. This is  
what I've typed into R and the error message I received:

+ getwd()
[1] /Users/daviacox/Graduate School/PLS 801
  read.spss(norwil.spss)
Error in read.spss(norwil.spss) : error reading portable-file  
dictionary
In addition: Warning message:
Expected variable count record

Please help, I don't have SPSS on my computer (I am re-analyzing some  
data for a statistics project) so I can't alter the file that way.

Thanks again for your help.

Davia

Davia S. Cox
Global Urban Studies Program
Graduate Assistant/Doctoral Student
305 Berkey Hall
East Lansing, MI 48825
517-353-5987 Office
517-353-6680 Fax
[EMAIL PROTECTED]

One of the penalties for refusing to participate in politics is that  
you
end up being governed by your inferiors.
  -Plato

__
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