similar to: R Error : DATA to MATRIX

Displaying 20 results from an estimated 2000 matches similar to: "R Error : DATA to MATRIX"

2012 Jun 01
1
R Error : Error in vector("list", gamma(n + 1)) : vector size specified is too large
Dear R-listers, I am giving part of my R code : ########################################################### n=15 m=1 library("partitions") library("gregmisc") library("combinat") x = t(restrictedparts(n-m,m)) l = length(x[,1]) for(u in 1:l){ A= unique(matrix( unlist(permn(x[u,])), ncol=m, byrow=TRUE )) }
2011 Oct 20
1
R code Error : Hybrid Censored Weibull Distribution
Dear Sir/madam, I'm getting a problem with a R-code which calculate Fisher Information Matrix for Hybrid Censored Weibull Distribution. My problem is that: when I take weibull(scale=1,shape=2) { i.e shape>1} I got my desired result but when I take weibull(scale=1,shape=0.5) { i.e shape<1} it gives error : Error in integrate(int2, lower = 0, upper = t) : the integral is probably
2011 Mar 25
2
two minor bugs in rowsum()
(a) In R 2.12.2 rowsum can overflow if given an integer input: > rowsum(c(2e9L, 2e9L), c("a", "a")) [,1] a -294967296 > 2^32 + .Last.value [,1] a 4e+09 Should it be changed to coerce its x argument to numeric (double precision) so it always returns a numeric output? (b) When rowsum is given an x containing both NaN and NA it appears to use the last
2006 Nov 26
1
problem loading package Hmisc
Hi, I installed the package Hmisc with the command install.packages("Hmisc") without errors. When I try to load the library with command library(Hmisc) I get the error > library(Hmisc) Error in library(Hmisc) : there is no package called 'Hmisc' > version _ platform i386-pc-linux-gnu arch i386 os linux-gnu system i386,
2006 Jun 14
3
A question about stepwise procedures: step function
Dear all, I tried to use "step" function to do model selection, but I got an error massage. What I don't understand is that data as data.frame worked well for my other programs, how come I cannot make it run this time. Could you please tell me how I can fix it? ***************************************************************************************************
2008 Mar 25
2
help with rowsum/aggregate type functions
Hi-- This is a question with a trivial and obvious answer, I'm sure, but I can't seem to find it in the help files and books that I have handy. I have a dataframe consisting of two columns, "Gene_Name," a list of gene symbols, and "Number," a numeric measure of how frequently a tag representing that gene showed up in a SAGE library. Several of the genes are
2010 Feb 19
3
dot-dot-dot as an actual argument
I could not find any documentation of how dot-dot-dot works when used as an argument in a function call (rather than as a formal argument in a definition). I would appreciate some references to the rules governing situations like: f1<-function(x,y,...){ ? print(x) } f2<-function(...){ ? f1(...) } f2(1,2,3) In the call above how are the three numbers bound to the individual formal
2013 May 02
2
saving a matrix
Hi all, In my data analysis, I have created a random matrix M ( of order 500 X 7). I want to use the same matrix when I start a new session, or suppose I want to send this matrix to one of my friends (because this matrix is randomly generated, and I dont want to use any other 500X7 matrix randomly generated by R). How can I save and call this matrix in the later sessions as well? Appreciate
2013 May 25
2
Assigning NULL to large variables is much faster than rm() - any reason why I should still use rm()?
Hi, in my packages/functions/code I tend to remove large temporary variables as soon as possible, e.g. large intermediate vectors used in iterations. I sometimes also have the habit of doing this to make it explicit in the source code when a temporary object is no longer needed. However, I did notice that this can add a noticeable overhead when the rest of the iteration step does not take that
2001 Sep 13
1
rowsum dimnames
Hi, The result of rowsum() in R doesn't have the dimnames I'd expect, e.g.: > rowsum(matrix(1:12, 3,4), c("Y","X","Y")) [,1] [,2] [,3] [,4] 1 2 5 8 11 2 4 10 16 22 whereas S-Plus gives the more useful result: [,1] [,2] [,3] [,4] X 2 5 8 11 Y 4 10 16 22 This is because R's rowsum() code gives
2001 Sep 14
1
rowsum dimnames (PR#1092)
The result of rowsum() in R doesn't have the dimnames I'd expect, e.g.: > rowsum(matrix(1:12, 3,4), c("Y","X","Y")) [,1] [,2] [,3] [,4] 1 2 5 8 11 2 4 10 16 22 whereas S-Plus gives the more useful result: [,1] [,2] [,3] [,4] X 2 5 8 11 Y 4 10 16 22 This is because R's rowsum() code gives the
2011 Jun 22
3
Help Needed on Merging Columns by Summation
Dear Sirs/Madam, I am a beginner to R, and I am currently working on a data matrix which looks like this: > head(oligo) ko:K00001 ko:K00003 ko:K00005 ko:K00008 ko:K00009 ko:K00010 ko:K00012 AAA 370 631 365 67 164 455 491 KAA 603 1208 170 157 68
2003 Aug 13
2
rowsum() may return a vector instead of a matrix (PR#3737)
If all rows are in the same "group", rowsum() returns a vector instead of a (1xN) matrix, contrary to documentation: R> print(z <- rowsum(matrix(1:12, 3,4), rep("x",3))) [1] 6 15 24 33 R> dim(z) NULL It worked correctly in version 1.4.0 but was broken by version 1.6.1. I'm currently using 1.7.1 under Solaris 2.8. --please do not edit the information
2013 Apr 25
2
Selecting and then joining data blocks
Hi all, I have 4 matrices, each having 5 columns and 4 rows .....denoted by B1,B2,B3,B4. I have generated a vector of 7 indices, say (1,2,4,3,2,3,1} which refers to the index of the matrices to be chosen and then appended one on the top of the next: like, in this case, I wish to have the following mega matrix: B1over B2 over B4 over B3 over B2 over B3 over B1. 1> How can I achieve this?
2013 Feb 06
1
weighing proportion of rowSums in dataframe
Dear R-List, I am sure there must be a very simple way to do this - I just do not know how... This is what I want to do: #my dataframe df<-data.frame(id=c("x01","x02","x03","x04","x05","x06"),a=c(1,2,NA,4,5,6),b=c(2,4,6,8,10,NA),c=c(NA,3,9,12,NA,NA),sum=c(3,9,15,24,15,6))    id    a     b     c   sum 1 x01  1     2    NA   3 2
2006 Aug 23
5
two density curves in one plot?
Hello, I was wondering if I can plot two curves I get from "density(data)" into one plot. I want to compare both. With the following commad, I just get one curve plotted: plot( density(mydata) ) Sorry for this stupid question but I could not find a solution until now... Antje
2003 Feb 12
2
Various Errors using Survey Package
Hi, I have been experimenting with the new Survey package. Specifically, I was trying to use some of the functions on the public-use survey data from NHIS (2000 Sample Adult file). Error 1): The first error I get is when I try to specify the complex survey design. nhis.design<-svydesign(ids=~psu, probs=~probs, strata=~strata, data=nhis.df, check.strata=TRUE) Error in svydesign(ids =
2008 Jul 25
2
graphing regression coefficients and standard errors
Hello, I am interested in plotting my regression analysis results(regression coefficients and standard errors obtained through OLS and Tobit models) in the form of graphs.What is the best way to accomplish this? Thanks. Murali Kuchibhotla [[alternative HTML version deleted]]
2006 Dec 03
1
passing an argument to a function which is also to be a dataframe column name
any suggestions on the following gratefully welcome, I have a dataframe, which I am subsetting via labels atpi[, creativity] where (for example) atpi = as.data.frame(matrix(1:50, ncol = 5, nrow = 10)) names(atpi) = c("Q1", "Q2", "Q3", "Q4", "Q5") and creativity = c("Q1", "Q3", "Q4") I want to add an extra column
2008 Jul 25
3
Maximization under constraits
I''m looking for a R function which can maximise this logliklihood function, under the constraits a>0 e b>0 f<-function(param){ a<-param[1] b <-param[2] log(prod)-(a*s2)-(b*s)-n*log(1-((0.5*b/sqrt(a))*(exp((b^2)/(4*a)))*((sqrt(pi ))*(1-pnorm(-b/(2*sqrt(a)), mean=0, sd=1)))))} I''ve tried maxlik constrOptim e donlp2 but without success. Thanks so