Re: [R] multi variate plot with string data

2009-11-26 Thread frenchcr
Thanks!! this works perfectly dat = data.frame(Aggressive = data_set$var1 , Behaviour=data_set$var2) plot(table(dat)) ...its better than a stacked boxplot as it gives also different width of columns on the diagram...an extra layer of information. frenchcr wrote: > > >

Re: [R] multi variate plot with string data

2009-11-26 Thread frenchcr
is there something wrong with the way i asked the question frenchcr wrote: > > > Ive got two columns in data_set that are strings > > the first column is called "character" and has levels: > good, bad, ugly > > the second column is called "abusive&qu

[R] multi variate plot with string data

2009-11-25 Thread frenchcr
Ive got two columns in data_set that are strings the first column is called "character" and has levels: good, bad, ugly the second column is called "abusive" and has levels: aggressive, moderately aggressive, mildly aggressive I want to do a stacked boxplot that has this sort of structure:

[R] how do i persuade IT to install R on PCs ?? ...and should I ??

2009-11-22 Thread frenchcr
Please help me persuade IT to install R on my computer! All suggestions welcome. Our IT department run scared when you mention software that they have no working experience of. I need to know the pros and cons of having R on corporate desktops. Please no funny stuff, this is quite a serious i

[R] other decriptive stats packages

2009-11-21 Thread frenchcr
i just found the following list, i wondered if anybody could add to this as i have to characterize a large data set and am new to R...the list below was so helpfulcan you add to this??? Just to forestall confusion amongst those who would like to use one of the functions called "describe"...

[R] what do i do to fix missing packages...see error

2009-11-21 Thread frenchcr
> exampledata <- rnorm(1) > summary(exampledata) Min. 1st Qu.Median Mean 3rd Qu. Max. -4.03 -0.666200 -0.023390 -0.009384 0.664700 4.092000 > desc <- function(mydata) { +require(e1071) +quantls <- quantile(x=mydata, probs=seq(from=0, to=1, by=0.25)) +

[R] non homogeneous poisson process

2009-11-16 Thread frenchcr
I want to do a non homogeneous poisson process model in R. Any advice, or know of places where i can get some, ive googled it but nothing came up relating to R. -- View this message in context: http://old.nabble.com/non-homogeneous-poisson-process-tp26378037p26378037.html Sent from the R help

[R] in excel i can sort my dataset, what do i use in R

2009-11-16 Thread frenchcr
In excel a handy tool is the sort data by column ...i.e. i can highlight the whole dataset and sort it according to a particular column...like sort the data in a column in acending or decending order where all the other columns change aswell. I need to do this in R now but dont know how. ...he

[R] printing a single row, but dont know which row to print

2009-11-16 Thread frenchcr
I have 20 columns of data, and in column 5 I have a value of 17600 but I dont know which row this value is in (i have over 300,000 rows). I'm trying to do 2 things: 1) I want to find out which row in column 5 has this number in it. 2) Then I want to print out that row with all the column heade

Re: [R] re move row if the column "date_abandoned" has a date in it

2009-11-15 Thread frenchcr
this works perfectly... new_data5 <- new_data4[nchar(new_data4$date_abandoned) != 8, ] ...and i can now think of a few different ways to manipulate my data with what ive learned from these tricks, thanks alot David! David Winsemius wrote: > > > On Nov 15, 2009, at 11:00

Re: [R] re move row if the column "date_abandoned" has a date in it

2009-11-15 Thread frenchcr
are dates, i want to remove their rows. David Winsemius wrote: > > > On Nov 14, 2009, at 8:43 PM, frenchcr wrote: > >> >> sorry David, >> >> im really new to R (my first week) and appreciate your help. Also I >> dont >> always know what info to

Re: [R] re move row if the column "date_abandoned" has a date in it

2009-11-15 Thread frenchcr
. NA's 1601 1998 2001 1993 2004 2009 315732 > ls() [1] "data" "new_data" "new_data2" "new_data3" "new_data4" > small <- head(new_data4, 20) > dump("small", 20) Error in dump(&qu

Re: [R] re move row if the column "date_abandoned" has a date in it

2009-11-14 Thread frenchcr
column ...on a positive note, as i did this next... dim(new_data5) [1] 263 80 i now know that i have 263 dates in that column :) I want to remove the 263 rows with dates and leave just the rows without a date. David Winsemius wrote: > > > On Nov 14, 2009, at 1:21 PM, frenchcr

[R] re move row if the column "date_abandoned" has a date in it

2009-11-14 Thread frenchcr
I want to go through a column in data called date_abandoneddata["date_abandoned"]and remove all the rows that have numbers greater than 1,010,000. The dates are in the format 20091114 so i'm just going to treat them as numbers for clean up purposes. I know that i use subset but not sur

Re: [R] cleanse columns and unwanted rows

2009-11-14 Thread frenchcr
Error in if (data1[i, "legal_status"] == "Private (Op") { : missing value where TRUE/FALSE needed In addition: There were 50 or more warnings (use warnings() to see the first 50) > frenchcr wrote: > > hello folks, > > Im trying to clean out a large file

Re: [R] cleanse columns and unwanted rows

2009-11-14 Thread frenchcr
The solution is much simpler (thanks Phil!) new_data = data[!data$"legal status" %in% c("Private","Private (Op","Unknown"),] ...works nicely. frenchcr wrote: > > hello folks, > > Im trying to clean out a large file with data i

[R] cleanse columns and unwanted rows

2009-11-13 Thread frenchcr
hello folks, Im trying to clean out a large file with data i dont need. The column im manipulating in the file is called "legal status" Their are three kinds of rows i want to remove. Those that have "Private", "Private (Op", or "Unknown" in the legal_status column. I wrote this code but it sy

Re: [R] Turn dates into age

2009-11-08 Thread frenchcr
101" "19910101" "19910101" dateObs <- as.Date(dates,format="%Y%m%d") #dateObs[1:10] #[1] "1991-01-01" "1986-01-01" "1991-01-01" "1986-01-01" "1991-01-01" "1991-01-01" "1991-01-01" "1991-0

Re: [R] Turn dates into age

2009-11-08 Thread frenchcr
et" > > Cheers > Chris. jholtman wrote: > > What is the frame of reference to determine the age? Check out > 'difftime'. > > On Sun, Nov 8, 2009 at 1:50 PM, frenchcr wrote: >> >> Ive got a big column of dates (also some fields dont have a date

[R] Turn dates into age

2009-11-08 Thread frenchcr
Ive got a big column of dates (also some fields dont have a date so they have NA instead), that i have converted into date format as so... dates<-as.character(data[,"date_commissioned"]); # converted dates to characters dates[1:10] [1] "19910101" "19860101" "19910101" "19860101" "19910101" "199

[R] 19900501 into 1990-05-01

2009-11-05 Thread frenchcr
I have a column of dates in this format.. 19900501 I want to change 19900501 into 1990 05 01 then append a new column on the end (right hand side of spreadsheet) :confused: -- View this message in context: http://old.nabble.com/19900501-into-1990-05-01-tp26217515p26217515.html Sent from the R

[R] enter "missing" into missing fields

2009-11-04 Thread frenchcr
if ive got an incomplete data set thats got thousands of rows and 80 columns with random missing fields...like this say... 3 b 3 41 1 x 2 ? how do i turn it into 3b 3 4 missing 1 1x 2 ...i.e., i want to insert a line of text like.."missing"... into the empty fields

[R] one long column of data -> three small columns

2009-11-03 Thread frenchcr
say i have a column of data like this... 2 3 4 2 1 6 6 4 7 and i want it in three columns like this 226 314 467 ...so i can make a contour plot. How do i do this? -- View this message in context: http://old.nabble.com/one-long-column-of-data--%3E-three-small-columns-tp26163165p26163165.htm

Re: [R] one long column of data -> three small columns

2009-11-03 Thread frenchcr
frenchcr wrote: > > say i have a column of data like this... > > 2 > 3 > 4 > 2 > 1 > 6 > 6 > 4 > 7 > > and i want it in three columns like this > > 226 > 314 > 467 > > ...so i can make a contour plot. > > > How do i do