similar to: word frequency count

Displaying 20 results from an estimated 4000 matches similar to: "word frequency count"

2006 Nov 01
4
extract values from a vector
Hello, I'm looking for a solution for the following problem: I have two vectors V1 <- c("apple","honey","milk","bread","butter") V2 <- c("bread","milk") now, I would like to know for each element in V1 if it's equal to one of the elements in V2 I could do: which(V1 == V2[1] | V1 == V2[2]) but what if I
2013 Sep 02
1
R dataframe and looping help
HI, You may try this: dat1<- read.table(text=" CustID TripDate Store Bread Butter Milk Eggs 1 2-Jan-12 a 2 0 2 1 1 6-Jan-12 c 0 3 3 0 1 9-Jan-12 a 3 3 0 0 1 31-Mar-13 a 3 0 0 0 2 31-Aug-12 a 0 3 3 0 2 24-Sep-12 a 3 3 0 0 2 25-Sep-12 b 3 0 0 0 ",sep="",header=TRUE,stringsAsFactors=FALSE) dat2<- dat1[,-c(1:3)] res<- lapply(seq_len(ncol(dat2)),function(i)
2007 Oct 17
1
How to save association rules generated by arules package
Hi, I have been able to generate association rules for Market Basket Analysis using the following codes: **************************************************************************** ******************************************* library("arules") rules <- read.csv("write1.csv",na.strings=c(".", "NA", "", "?"),header=TRUE)
2010 Sep 01
1
transaction object - how to coerce this data
Hi, I am wanting to look at frequent item sets using the arules package. I need to transform my data into a "transactions" object. The data I read in from a file has 2 columns, an ID and an item. How do I convert data like this into a transactions object? I've tried class? transactions but it only confuses me. My data is like this.... basketID item 1 bread 1 cheese 1 milk 2
2009 Mar 07
4
merge data frames with same column names of different lengths and missing values
Hello, I'm switching over from SAS to R and am having trouble merging data frames. The data frames have several columns with the same name, and each has a different number of rows. Some of the values are missing from cells with the same column names in each data frame. I had hoped that when I merged the dataframes, every column with the same name would be merged, with the value in a complete
2013 Mar 01
2
issue creating a subset
I'm performing item response theory with eRm packages I am excluding the persons that doesn't fit in the infit/outfit persons. for that I created a condition. then I have to create a new subset or matrix but with the condition. So: ORIGINAL matrix<-cbind(item1, item2, item3, item4) IF I PERFORM A head(matrix) item1 item2 item3 item4 3 2 3 1 3 1
2013 Mar 21
1
Error Message During ANOVA
I am teaching myself R for use in Psych research. I don't understand the error message I am getting or how to fix it. Any suggestions will be greatly appreciated df1=read.table("fastfood.txt", header=TRUE); df1 > > c(t(as.matrix(df1))) > > r = c(t(as.matrix(df1))) # response data > > r > f=c("item1","item2", "item3") > k=3 >
2008 Jan 10
1
data.frame manipulation: Unbinding strings in a row
Hi all, I have a data.frame I received with data that look like this (comma separated strings in last row): ID Shop Items ID1 A1 item1, item2, item3 ID2 A2 item4, item5 ID3 A1 item1, item3, item4 But I would like to unbind the strings in col(2) items so that it will look like this: ID Shop Items ID1 A1 item1 ID1 A1 item2 ID1 A1 item3 ID2 A2 item4 ID2 A2 item5 ID3 A1 item1 ID3 A1 item3 ID3 A1
2008 May 02
2
Transform values from one column into column names of new dataframe
Hi, I have a question about reformatting data. It looks like it should be simple, but I've been working at it for awhile now and it's about time I ask for help. My data look like this: ITEM VALUE STEP item1 A first item2 C first item2 D second item1 A second item3 A first item3 B second item3 A third I just want to transform
2013 Feb 26
2
Converting code to R Question
I'm learning R and am converting some code from SPSS into R. My background is in SAS/SPSS so the vectorization is new to me and I'm trying to learn how to NOT use loops...or use them sparingly. I'm wondering what the most efficient to tackle a problem I'm working on is. Below is an example piece of code. Essentially what it does is set a variable to zero, loop through item
2011 Aug 21
1
rank analysis - reinventing the wheel?
Hello, I have two data frames. One is my dependent variable and the other is my independent variable. For each row I'd like to split the independent variable into fractiles (25 or more) and calculate the average value of the dependent variable. Then I would like to plot the average of the averages for each row for each fractile. If possible, I'd like to have the option to 1) define the
2009 Aug 10
2
ggplot: colours to geom_segments
Just as an exercise I am tying to add colours to a geom_segment command. I can get one colour but not a sequence of colours. Can anyone suggest how I can get the green lines in the plot below to be different colours? I thought I could use a palatte of colours but that did not seem to work. Thanks ========================================================================= library(ggplot2) xx
2006 Sep 28
3
ruby alternative to php's implode and expload functions
is there a method similar to php''s expload function in ruby. i have a database field that contains an array of items, when i output this field i notice the items are seperated by ''-'' e.g item1-item2-item3. how would i go about putting them back into an array in ruby. for example in PHP i would just do this: $field; // = item1-item2-item3 $field_as_array =
2005 Dec 19
2
Difficulty using correct moldel for the data in DB
Hi everyone, I''ve tried posting the same question to the list last Friday but somehow did not see it being posted.. I''ve just started with Rails and Ruby. I just started to play one of those RPG and to get my feet wet I''m writing an app to keep track of item fusions. So the scoop is that item can be fused with another items to create a higher level item. The higher
2013 Apr 16
1
Path Diagram
Hi All, Apologies if this has been answered somewhere else, but I have been searching for an answer all day and not been able to find one. I am trying to plot a path diagram for a CFA I have run, I have installed Rgraphviz and run the following: pathDiagram(cfa, min.rank='item1, item2, item3, item4, item5, item6, item7, item8, item9, item10, item11, item12', max.rank='SMP,
2012 Sep 03
1
R suitability for development project
Hello All, Eric Langley here with my first post to this list. I am looking to determine if R is suitable for a development project I am working on and if so possibly finding someone proficient in R that would be interested in doing the coding. I would like to preface my inquiry that while I am not a programmer I can communicate in a dialog my objectives. An array of rank ordered data looks like
2006 Feb 22
15
Fixtures and Relationships
In my daily development, I migrate back and forth between versions, and often do: rake load_fixtures... ... in order to populate my development database with fun data. Now, with any HABTM relationship, there are failures, as there is no way to say "which" fixtures to load first. Within an actual functional or unit test case, you could simply load them in the proper order, but
2006 Aug 06
2
help with method_missing in ActiveRecord
I am serializing a data object (FooData) into an ActiveRecord column (Foo). I''d like to be able to do delegate methods to the data class if the Foo class doesn''t have that attribute. So instead of: f = Foo.new f.data.item1 I''d like to do: f = Foo.new f.item1 I was hoping that I could add a method_missing method to my Foo class and call methods in the FooData class
2006 Apr 29
4
Event.observe mystery
Hi, I have a class ''Menu'' with a method ''addItem''. The method (simplified) looks like this: addItem: function(itemId, text) { this.container.innerHTML += ''<div id="''+itemId+''">''+text+''</div>''; Event.observe(itemId, ''mouseover'',
2012 Feb 29
1
ggplot2 dot chart-start at zero
I am trying to create a simple dot-plot in ggplot2 with a solid line from the y-axis to the dot, something I first saw in Cleveland's 1984 book What I would like is to have the graph start at zero on the x-axis but leave some space on the right side of the plot area. I assumed that I should be able to do this with expand() in scale_x_continuous() but either I'm wrong or just don't