search for: item5

Displaying 14 results from an estimated 14 matches for "item5".

Did you mean: items
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 still maintain the...
2013 Apr 16
1
Path Diagram
...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 [fontname="Helv...
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 -> Item79, lam79, NA F1 -> Item80, lam80, NA F1 -&gt...
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" "item7" Tha...
2006 Jul 20
2
Timing benefits of mapply() vs. for loop was: Wrap a loop inside a function
...onstructs 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)) for(i in 1:length(items)) like....
2006 Feb 27
4
Getting nuts with sortables...
...<li id="item1"> Item 1</li> <li id="item2"> Item 2</li> <li id="item3"> Item 3</li> </ul> <h3>List B</h3> <ul id="listb"> <li id="item4"> Item 4</li> <li id="item5"> Item 5</li> </ul> <%= sortable_element "lista", :containment => "list", :url => { :action => "lista_action" } %> <%= sortable_element "listb", :droponempty => true, :complete => visual_effect(:highli...
2004 Jun 08
2
Recoding a multiple response question into a series of 1, 0 variables
...nt the data to be be coded: I want each field to be one of the five items and I want each field to contain a 1 or 0 code--1 if they mentioned the item, 0 otherwise. Given the above data, the new fields would look as follows: Item1 Item2 Item3 Item4 Item5 Person1 0 1 0 1 0 Person2 1 0 1 1 1 Person3 0 1 1 0 0 I know how to do this using brute force...
2010 Jun 06
1
Why did TukeyHSD not work when I used it for post-hoc for 2way within-subjects anova?
...sign. Specifically, I had 32 items each of which generated 4 conditions. Participants saw each of the 32 items only once: 8 in Condition A, 8 in B, 8 in C, and 8 in D. The table below serves as an example. *Subject* *Factor1* *Factor2* *Condition* *ReadingTime* *Item* 1 A A A 238 Item1 1 A A A 369 Item5 1 A A A 494 Item9 *.* *.* *.* *.* *.* *.* *.* *.* *. * *.* *.* *.* 1 B A C 294 Item22 1 B A C 694 Item26 *.* *.* *.* *.* *.* *.* *.* *.* *.* *.* *.* *.* 8 A A A 334 Item3 8 A A A 366 Item7 *.* *.* *.* *.* *.* *.* *.* *.* *.* *.* *.* *.* I did ANOVA by using the following : result.subject=aov(Readi...
2012 May 29
1
model frame and formula mismatch with latent class analysis poLCA
...ntains binary scores of, for instance, 200 students on 100 items. These numbers could even be more in due course. The resulting dataframe on which i want to perfrom LCA looks like shown below (first five person). Each row corresponds to scores of a person on the 100 items. item1 item2 item3 item4 item5 item6 . . . . . . item97 item98 item99 item100 1 1 0 1 1 1 . . . . . . 1 0 1 1 0 0 0 0 1 1 . . . . . . 1 0...
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)
2009 Nov 29
1
optim or nlminb for minimization, which to believe?
...ain very close to being correct. This is best illustrated via the examples: ### Sample data set set.seed(1234) tmp <- data.frame(item1 = sample(c(0,1), 20, replace=TRUE), item2 = sample(c(0,1), 20, replace=TRUE), item3 = sample(c(0,1), 20, replace=TRUE),item4 = sample(c(0,1), 20, replace=TRUE),item5 = sample(c(0,1), 20, replace=TRUE)) ## Use function mml2 (below) with optim with use of gradient > mml2(tmp,Q=10) $par [1] -0.2438733 0.4889333 -0.2438733 0.4889333 0.7464162 $value [1] 63.86376 $counts function gradient 45 6 $convergence [1] 0 $message NULL $hessian...
2005 Jan 31
1
naming list elements
All - Each time through a loop I create a new dataset, which I would like to append to a list object. Each item of the list should be the data matrix created in that step of the loop; I would like the NAME (or tag) of that list item to be assigned the value of a character string: I've tried something like this: running.list <- numeric(0) for(i in 1:num.files){ ..... running.list
2005 Aug 02
3
Scriptaculous: Sortable (dragdrop.js) onUpdate
...te() event is firing. Am I doing something wrong? <ul id="testSort"> <li id="item1">item 1</li> <li id="item2">item 2</li> <li id="item3">item 3</li> <li id="item4">item 4</li> <li id="item5">item 5</li> </ul> <script type="text/javascript"> //<![CDATA[ Sortable.create( "testSort", { onUpdate : function() { alert("updating"); } } ); //]]> </script> Thanks, Ed C. -------------- next part -------------- An HTML attachm...
2010 Feb 25
2
Restructure some data
Suppose I have a data frame like "dat" below. For some context, this is the format that represents student's taking a computer adaptive test. first.item is the first item that student was administered and then score.1 is the student's response to that item and so forth. item.pool <- paste("item", 1:10, sep = "") set.seed(54321) dat <- data.frame(id =