search for: item3

Displaying 20 results from an estimated 34 matches for "item3".

Did you mean: items
2013 Mar 21
1
Error Message During ANOVA
...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 > n=6 > tm =gl(k,1, n*k, factor(f)) > tm [1] item1 item2 item3 item1 item2 item3 item1 item2 item3 item1 item2 item3 [13] item1 item2 item3 item1 item2 item3 Levels: item1 item2 item3 > av=aov(r~tm) > > Error in model.frame.default(formula = r ~ tm, drop.unused.le...
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 2 4 THEN I CREATE THE LOGIC CONDITION z<-thing==T THEN I TRY TO CREATE THE NEW MATRIX BUT WITH THE CONDITION matrix2<-cbind(item1[z==T], item2[z==T], item3[z==T], item4[z=...
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 item4 Meaning each item is on a different row but...
2008 May 02
2
Transform values from one column into column names of new dataframe
...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 it so they look like this: ITEM FIRST SECOND THIRD item1 A A NA item2 C D NA item3 A B A Basically taking the values of the "STEP&quo...
2011 Aug 21
1
rank analysis - reinventing the wheel?
...e start and keep it fixed. Anyway, is there a pacakge/function in R that does something like this so I don't have to reinvent the wheel? If not, any help on how to do this efficiently in R would be great. Here is a super simple example using 3 fractiles: independent data frame: item1 item2 item3 1 18 15 16 2 12 12 17 3 20 13 18 dependent data frame: item1 item2 item3 1 3 1 6 2 2 2 7 3 1 3 8 fractiles by row by item: (done with independent data frame, redefining fractiles each row) fractiles: 1 2 3...
2006 Apr 29
4
Event.observe mystery
...39;, this.onMouseOverHandler.bindAsEventListener(this), false); } I call my class in the following way: var myMenu = new Menu(); myMenu.addItem(''item1'', ''Item 1''); myMenu.addItem(''item2'', ''Item 2''); myMenu.addItem(''item3'', ''Item 3''); And here comes the mystery: only the last item (item3) triggers the ''onMouseOverHandler'' listener. When I remove item3, than it''s trigged by item2 and so on... Anyone have a solution? Thank you in advance! Thomas -- Post...
2013 Feb 26
2
Converting code to R Question
...ms half of which may have the 1 response pattern and half the 2 pattern. Any suggestions on how best to tackle this in R would be helpful. Craig ********** Old SPSS code sample ********** Compute Variable = 0. IF (item1 = 1) Variable = Variable +1 . IF (item2= 2) Variable = Variable +1 . IF (item3 = 1) Variable = Variable +1. IF (item4 = 2) Variable = Variable +1. EXECUTE . [[alternative HTML version deleted]]
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, AAAS', file='documents') I get the following message and output: Running dot -Tpdf -o documents.pdf documents.dot digraph "cfa" { rankdir=LR; size="8,8"; node [fontn...
2011 Feb 14
4
sem problem - did not converge
Someone can help me? I tried several things and always don't converge # Model library(sem) dados40.cov <- cov(dados40,method="spearman") model.dados40 <- specify.model() F1 -> Item11, lam11, NA F1 -> Item31, lam31, NA F1 -> Item36, lam36, NA F1 -> Item54, lam54, NA F1 -> Item63, lam63, NA F1 -> Item65, lam55, NA F1 -> Item67, lam67, NA F1 -> Item69, lam69, NA F1 -> Item73, lam73, NA F1 -> Item75, lam75, NA F1 -> Item76, lam76, NA F1 -> Item78, lam78, NA F1 -&gt...
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 = explode(''-'',$field); -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ You...
2012 Sep 03
1
R suitability for development project
...ce 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 this: Item-Rank First Second Third Fourth Totals Item1 6 8 0 0 14 Item2 7 5 2 0 14 Item3 1 1 11 1 14 Item4 0 0 1 13 14 Totals 14 14 14 14 The required output of R will be two fold; 1, a numerical score for each of the Items (1-4) from highest to lowest and lowest to highest on a scale of...
2006 Apr 10
2
RJS newbie - need help with iterating / existence test
...;'m at now is that, when an item is removed from the page, it messes up the green-bar effect. So I need to iterate through the <div>s, changing their CSS class. I''ve got the change to class working (thanks to help from Ed Frederick) on a single item with: page << "$(item3).className = ''Listline1'';" (In figuring this out, I''m entering 3 items, deleting the 2nd, then changing the class of item3 which is now 2nd in the list) So now I to figure out how to iterate through the remaining items, either by starting at the top or working from...
2005 Dec 14
1
Glitch when creating online help
...on{ ~~ A concise (1-5 lines) description of what the function does. ~~ } \usage{f(x)} \arguments{ \item{item1}{ This is item 1. } \item{itemlist}{ Here is a list. \describe{ \item{subitem1}{Item 1 of the list.} \item{subitem2}{Item 2 of the list.} } } \item{item3}{ This is the item after the list. } } ================ Then at the command prompt: R CMD INSTALL --build foo Once the package has been created, in R type: library(foo) ?f The result looks like ================ f package:foo R Documentation ~~function...
2007 May 14
2
Left/right hand side characters
Hello all Is there a way reducing the number of characters in a list so that just the left n numbers of characters is given? For example, If I have a list, listnames, which consists of 4 strings of 6 characters; >listnames [1] "item12" "item34" "item56" "item78" Is there a way to reduce this so only the 5 characters on the lefthand side are given (similar to the LEFT function in Excel) So that I'd get a list like this >listnames [1] "item1" "item3" "item5" "...
2009 Jun 16
0
Help implementing a simple Python port
...alculated the weighted slope one estimate pred.out[a]=sapply(a, function(i) { sum(unlist(lapply(b,function (j) { sum((d[j]+diffs[j,i])*freqs[j,i])/rowSums(freqs)[i] }))) }) names(pred.out)=colnames(tr.set) return(pred.out) } # end function # test 1, using example from [1] john=c(item1=5, item2=3, item3=2) mark=c(item1=3, item2=4, item3=NA) tr.set1=rbind(john,mark) lucy1=c(item1=NA, item2=2, item3=5) pred(tr.set1,lucy1) ## item1=4.33 --> correct # test 2, using example from [2] alice=c(squid=1.0, octopus=0.2, cuttlefish=0.5, nautilus=NA) bob=c(squid=1.0, octopus=0.5, cuttlefish=NA, nautilus...
2007 Nov 25
1
Constructin a call of function including permutation of column names - how to escape parentheses?
Dear R-users, I would like to construct a list of arguments for a function in a format function (list(item1=c("A","B"), item2=c("B","C")), item3=...): The individual vectors in the list are permutations of colnames of a dataframe. The trouble is that I am not able to handle escaping of parentheses correctly. I was trying the following: library(gregmisc) combinations.2<-combinations(12,2,mycolnames) combinations.2.call<-apply(combinat...
2006 Jul 19
4
Wrap a loop inside a function
...(theta,items, score){ like.mat <- matrix(numeric(length(items) * length(theta)), ncol = length(theta)) for(i in 1:length(items)) like.mat[i, ] <- pcm(theta, items[[i]], score[[i]]) } # begin example theta <- c(-1,-.5,0,.5,1) items <- list(item1 = c(0,1,2), item2 = c(0,1), item3 = c(0,1,2,3,4), item4 = c(0,1)) score <- c(2,1,3,1) (foo(theta, items, score)) # R output from function foo [1] 0.8807971 0.8175745 0.7310586 0.6224593 0.5000000 However, what I am expecting from the function foo is > like.mat [,1] [,2] [,3] [,4] [,5] [...
2010 Oct 30
2
transforming a dataset for association analysis
Hi I would like to transform a data frame like Subject Item Score Subject 1 Item 1 1 Subject 1 Item 2 0 Subject 1 Item 3 1 Subject 2 Item 1 1 Subject 2 Item 2 1 Subject 2 Item 3 0 .... *to * Subject Item1 Item2 Item3 .....Item N Subject1 1 0 1 Subject2 1 1 0 ........ SubjectP.. Apologize for the simple nature of my query but I am stuck. How can I do this transformation? Regards Ajay Websites- http://decisionstats.com http://dudeofdata.com Linkedin- www.linkedin...
2006 Jul 20
2
Timing benefits of mapply() vs. for loop was: Wrap a loop inside a function
...ly functions rather than the looping constructs such as for, while etc as a matter of practice. However, it seems the mapply function in this case is slower (in terms of CPU speed) than the for loop. Here is an example. # data needed for example items <- list(item1 = c(0,1,2), item2 = c(0,1), item3 = c(0,1,2,3,4), item4 = c(0,1), item5=c(0,1,2,3,4), item6=c(0,1,2,3)) score <- c(2,1,3,1,3,2) theta <- c(-1,-.5,0,.5,1) # My old function using the for loop like.mat <- function(score, items, theta){ like.mat <- matrix(numeric(length(items) * length(theta)), ncol = length(theta))...
2008 Sep 03
0
How to read-in a transaction-table with single items per line via RODBC?
Hi, I succeeded to read-in a transaction-table tr_dat with single items per line via RODBC of the form: Transact-ID ItemID 1 item1 1 item2 1 item3 2 item2 2 item3 ... how do I create a transaction object of the arules package from such a table? I tried this with read.transactions(tr_dat, format="single") of the package arules but I didn'd succeed getting the following error Error: invalid class "ngCMatrix&q...