similar to: merge(join) problem

Displaying 20 results from an estimated 700 matches similar to: "merge(join) problem"

2012 Mar 04
1
Could not compute QR decomposition of Hessian.
Hi, I created the model below, which returns me the following warning message: In sem.default(ram = ram, S = S, N = N, param.names = pars, var.names = vars, : Could not compute QR decomposition of Hessian. Optimization probably did not converge. ######### Model ######## mDPDF = data.frame(mj1,mj2,mj3,mj4,mj5,eL1,eL2,eL3,eL4,eL5,aC1,aC2,aC3,aC4,disR1,disR2,disR3,disR4,disR5,
2011 Jul 11
1
plot means ?
Hi, I need this plot: given: x,y - numerical vectors of length N plot xi vs mean(yj such that |xj - xi|<epsilon) (running mean?) alternatively, discretize X as if for histogram plotting and plot mean y over the center of the histogram group. is there a simple way? thanks! -- Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 11.0.60900031 http://thereligionofpeace.com
2013 Mar 11
2
how to convert a data.frame to tree structure object such as dendrogram
I have a data.frame object like: > data.frame(x=c('A','A','B','B'), y=c('Ab','Ac','Ba','Bd')) x y 1 A Ab 2 A Ac 3 B Ba 4 B Bd how could I create a tree structure object like this: |---Ab A---| _| |---Ac | | |---Ba B---| |---Bb Thanks, Zech [[alternative HTML version deleted]]
2012 Oct 26
1
Openbugs- Array Index
Hi, I'm working on the codes below however every time I run them when they get to OpenBUGS I keep getting the error message: array index is greater than array upper bound for hab. Any help would be greatly appreciated, Suzie Codes: ungulate <- read.csv(file.choose ()) #ungulate ungulate <- as.matrix(ungulate);colnames(ungulate)<-NULL;rownames(ungulate)<-NULL
2012 Oct 07
1
two indirect effects of path analysis
Hello, This is Elaine. I am trying a path analysis using lavaan Package. There are three explanatory variables: X, Z, and M. The response variable is Y. A, b, and c have direct effects on Y. On the other hand, X and Z also have direct effects on M. In other words, X and Z have indirect effects on Y. I found the code example of lavaan package describes only one indirect effect as below. Please
2012 Sep 19
4
where are these NAs coming from?
I see this: --8<---------------cut here---------------start------------->8--- > length(which(is.na(z$language))) [1] 0 > locals <- z[z$country == mycountry,] > length(which(is.na(locals$language))) [1] 229 --8<---------------cut here---------------end--------------->8--- where are those locals without the language coming from?! -- Sam Steingold (http://sds.podval.org/) on
2012 Aug 30
3
apply --> data.frame
Is there a way for an apply-type function to return a data frame? the closest thing I think of is foo <- as.data.frame(sapply(...)) names(foo) <- c(....) is there a more "elegant" way? Thanks! -- Sam Steingold (http://sds.podval.org/) on Ubuntu 12.04 (precise) X 11.0.11103000 http://www.childpsy.net/ http://palestinefacts.org http://dhimmi.com http://honestreporting.com
2006 May 11
3
cannot turn some columns in a data frame into factors
Hi, I have a data frame df and a list of names of columns that I want to turn into factors: df.names <- attr(df,"names") sapply(factors, function (name) { pos <- match(name,df.names) if (is.na(pos)) stop(paste(name,": no such column\n")) df[[pos]] <- factor(df[[pos]]) cat(name,"(",pos,"):",is.factor(df[[pos]]),"\n")
2011 Feb 15
4
string parsing
I am trying to get stock metadata from Yahoo finance (or maybe there is a better source?) here is what I did so far: yahoo.url <- "http://finance.yahoo.com/d/quotes.csv?f=j1jka2&s="; stocks <- c("IBM","NOIZ","MSFT","LNN","C","BODY","F"); # just some samples socket <-
2011 Feb 15
1
all.equal: subscript out of bounds
When I do > all(all$X.Time == all$Y.Time); [1] TRUE as expected, but > all.equal(all$X.Time,all$Y.Time); Error in target[[i]] : subscript out of bounds why? thanks! -- Sam Steingold (http://sds.podval.org/) on CentOS release 5.3 (Final) http://mideasttruth.com http://honestreporting.com http://dhimmi.com http://jihadwatch.org http://pmw.org.il http://ffii.org The dark past once was the
2006 Mar 17
6
removing NA from a data frame
Hi, It appears that deal does not support missing values (NA), so I need to remove them (NAs) from my data frame. how do I do this? (I am very new to R, so a detailed step-by-step explanation with code samples would be nice). Some columns (variables) have quite a few NAs, so I would rather drop the whole column than sacrifice all the rows (observations) which have NA in that column. How do I
2013 Jan 18
5
select rows with identical columns from a data frame
I have a data frame with several columns. I want to select the rows with no NAs (as with complete.cases) and all columns identical. E.g., for --8<---------------cut here---------------start------------->8--- > f <- data.frame(a=c(1,NA,NA,4),b=c(1,NA,3,40),c=c(1,NA,5,40)) > f a b c 1 1 1 1 2 NA NA NA 3 NA 3 5 4 4 40 40 --8<---------------cut
2007 Nov 19
2
Extracting only one part of an string
Hi I wonder if there's a smarter way to do this procedure. I have a vector of filenames wher I only am interested in the first part of the filename. I would use the following method of extracting the first part. But is there a more simple way of doing this? Names <-
2007 May 06
3
Channel Bank
Can someone recommend a good quality 24 or greater port channel bank? Steve -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.digium.com/pipermail/asterisk-users/attachments/20070506/e5896021/attachment.htm
2011 Jul 05
1
hash table access, vector access &c
Hi, I am confused by the way the indexing works. I read a table from a csv file like this: ysmd <- read.csv("ysmd.csv",header=TRUE); ysmd.table <- hash(); for (i in 1:length(ysmd$X.stock)) ysmd.table[ysmd$X.stock[i]] <- ysmd[i,]; the first column ("X.stock") is a string (factor): > ysmd$X.stock[[100]] [1] FLO 7757 Levels: A AA AA- AAAAA AAC AACC AACOU AACOW AADR
2012 Sep 19
2
drop zero slots from table?
I find myself doing --8<---------------cut here---------------start------------->8--- tab <- table(...) tab <- tab[tab > 0] tab <- sort(tab,decreasing=TRUE) --8<---------------cut here---------------end--------------->8--- all the time. I am wondering if the "drop 0" (and maybe even sort?) can be effected by some magic argument to table() which I fail to discover
2011 Jul 12
3
when to use `which'?
when do I need to use which()? > a <- c(1,2,3,4,5,6) > a [1] 1 2 3 4 5 6 > a[a==4] [1] 4 > a[which(a==4)] [1] 4 > which(a==4) [1] 4 > a[which(a>2)] [1] 3 4 5 6 > a[a>2] [1] 3 4 5 6 > seems unnecessary... -- Sam Steingold (http://sds.podval.org/) on CentOS release 5.6 (Final) X 11.0.60900031 http://jihadwatch.org http://palestinefacts.org http://mideasttruth.com
2012 Jan 24
2
read.table: how to ignore errors?
I get this error from read.table(): Error in scan(file, what, nmax, sep, dec, quote, skip, nlines, na.strings, : line 234 did not have 8 elements The error is genuine (an extra field separator between 1st and 2nd element). 1. is there a way to see this bad line 234 from R without diving into the file? 2. is there a way to ignore the bad lines and get the data from the good lines only (I do
2013 Jan 04
4
non-consing count
Hi, to count vector elements with some property, the standard idiom seems to be length(which): --8<---------------cut here---------------start------------->8--- x <- c(1,1,0,0,0) count.0 <- length(which(x == 0)) --8<---------------cut here---------------end--------------->8--- however, this approach allocates and discards 2 vectors: a logical vector of length=length(x) and an
2012 Feb 10
2
the value of the last expression
Is there an analogue of common lisp "*" variable which contains the value of the last expression? E.g., in lisp: > (+ 1 2) 3 > * 3 I wish I could recover the value of the last expression without re-evaluating it. thanks -- Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X 11.0.11004000 http://www.childpsy.net/ http://camera.org http://ffii.org