similar to: turning off automatic coersion from list to matrix

Displaying 20 results from an estimated 1000 matches similar to: "turning off automatic coersion from list to matrix"

2012 Feb 03
1
incomplete final line found on <name of my sourced function file>
Dear R-ers, I hope there is a really simple solution to my problem. I've written a function that I saved in an .r file. I source this file in my code. For a while it worked fine. But then when I run the line: source("F mylineplot.r") I started getting a warning: In readLines(file) : incomplete final line found on 'F mylineplot.r' I have no idea why - I tried to check and
2008 Oct 02
1
Help with aggregation
Hi All, I seem to be having a few troubles with aggregating data back onto the the dataframe, I want to take the max value of a user, and then apply this max value back against all id's that match (i.e a one to many matching) Can anyone offer any advice? is there a better way of doing this? Dummy data and code are listed below:- dataset is called Mcookie user_id c_we_conversion 1
2006 Mar 31
2
R garbage collection
r-help, The R manual lists two types of memory: transient and user-controlled. If I have transient blocks reachable from the globals only by traversal through user-controlled blocks, will they be correctly preserved? Secondly, what are the ways to mark user controlled blocks as "roots" for the garbage collector, so that transient blocks they reference stay uncollected? So far I
2006 Mar 31
2
R garbage collection
r-help, The R manual lists two types of memory: transient and user-controlled. If I have transient blocks reachable from the globals only by traversal through user-controlled blocks, will they be correctly preserved? Secondly, what are the ways to mark user controlled blocks as "roots" for the garbage collector, so that transient blocks they reference stay uncollected? So far I
2004 Jun 02
1
data filtering
I would like to know if there is a way to do the following command in one step, primarily for speed on large data (5 million elements), and secondarily for readablity. mean(delta[(intersect(which(x[['class']]==0),which(delta<1)))]) Do I really have to rely on an intersect operator? Isn't that O(nlg(n))? Can't I just filter in one step? As an R newbie, I would have guessed
2004 Jul 02
1
reading large data
Hello, I have trouble using read.table for flat files of larger than about 300MB on windows 2000. Any ideas of how to file a bug report? Is it a known issue? I have three cuts of data, a 1%, 10% and 100% sample in flat text files. The 100% sample is about 350MB. When I read the 1% and 10% files, besides being slow, everything works. RAM footprint appears to increase approximately 2x of text
2007 Oct 24
1
setuid question
I've got a problem I hope someone can help with. We have a directory on a redhat box where we want anyone who creates a file (usually done with samba access) to have that file be created as if by a special "user" and group.. Now in the smb.privateshares config file we specify force user and force group.. However when we create a file in this directory it shows it being owned by the
2007 Oct 11
1
problem installing MCMCpack
I'm completely new to R and am trying to install an add-on package for one of our faculty members. I've had no problems with most of them, but am completely stuck trying to figure out why MCMCpack won't install.. any help is VERY much appreciated!!! here's what I get when I try to install the package: * Installing *source* package 'MCMCpack' ... checking for C++ compiler
2009 Sep 27
2
dimension-preserving matrix coersion
i've written a function to coerce a matrix (e.g. from numeric to logical), but i'd like to know if someone has a more elegant method for this: > m <- matrix(c(0, 1, 1, 0), ncol = 2) > m <- as.logical(m) > m [1] FALSE TRUE TRUE FALSE i'd like 'm' to still be a matrix with the original dimensions. in my function to do this, i coerce 'm' to a logical,
2007 Feb 06
1
glm gamma scale parameter
I would like the option to specify alternative scale parameters when using the gamma family, log link glm. In particular I would like the option to specify any of the following: 1. maximum likelihood estimate 2. moment estimator/Pearson's 3. total deviance estimator Is this easy? Possible? In addition, I would like to know what estimation process (maximum likelihood?) R is using to
2007 Jan 21
1
Can we do GLM on 2GB data set with R?
We are wanting to use R instead of/in addition to our existing stats package because of it's huge assortment of stat functions. But, we routinely need to fit GLM models to files that are approximately 2-4GB (as SQL tables, un-indexed, w/tinyint-sized fields except for the response & weight variables). Is this feasible, does anybody know, given sufficient hardware, using R? It appears to
2009 Nov 23
3
FUN argument to return a vector in aggregate function
Hi All, I am currently doing the following to compute summary statistics of aggregated data: a = aggregate(warpbreaks$breaks, warpbreaks[,-1], mean) b = aggregate(warpbreaks$breaks, warpbreaks[,-1], sum) c = aggregate(warpbreaks$breaks, warpbreaks[,-1], length) ans = cbind(a, b[,3], c[,3]) This seems unnecessarily complex to me so I tried > aggregate(warpbreaks$breaks, warpbreaks[,-1],
2012 Nov 29
2
Deleting certain observations (and their imprint?)
I'm manipulating a large dataset and need to eliminate some observations based on specific identifiers. This isn't a problem in and of itself (using which.. or subset..) but an imprint of the deleted observations seem to remain, even though they have 0 observations. This is causing me problems later on. I'll use the dataset warpbreaks to illustrate, I apologize if this isn't in
2005 Mar 26
1
Function Arguments
Hello, I am trying to wrap some code that I repeatedly use into a function for efficiency. The following is a toy example simply to illustrate the problem. foobar.fun<-function(data,idvar,dv){ id.list<-unique(idvar) result<-numeric(0) for (i in id.list){ tmp1<-subset(data, idvar == i) result[i]<-mean(get("tmp1")[[dv]]) } return(result) } The
2018 Jan 07
2
SpreadLevelPlot for more than one factor
Dear Ashim, Try spreadLevelPlot(breaks ~ interaction(tension, wool), data=warpbreaks) . I hope this helps, John ----------------------------- John Fox, Professor Emeritus McMaster University Hamilton, Ontario, Canada Web: socialsciences.mcmaster.ca/jfox/ > -----Original Message----- > From: R-help [mailto:r-help-bounces at r-project.org] On Behalf Of Ashim > Kapoor > Sent:
2018 Jan 07
2
SpreadLevelPlot for more than one factor
Dear All, I want a transformation which will make the spread of the response at all combinations of 2 factors the same. See for example : boxplot(breaks ~ tension * wool, warpbreaks) The closest I can do is : spreadLevelPlot(breaks ~tension , warpbreaks) spreadLevelPlot(breaks ~ wool , warpbreaks) I want to do : spreadLevelPlot(breaks ~tension * wool, warpbreaks) But I get : >
2009 Jan 14
3
Casting lists to data.frames, analog to SAS
I have a specific question and a general question. Specific Question: I want to do an analysis on a data frame by 2 or more class variables (i.e., use 2 or more columns in a dataframe to do statistical classing). Coming from SAS, I'm used to being able to take a data set and have the output of the analysis in a dataset for further manipulation. I have a data set with vote totals, with one
2020 May 02
1
issues with environment handling in model.frame()
Dear all, model.frame behaves in a way I don't expect when both its formula and subset argument are passed through a function call. This works as expected: model.frame(~wool, warpbreaks, breaks < 15) #> wool #> 14 A #> 23 A #> 29 B #> 50 B fun1 <- function(y) model.frame(~wool, warpbreaks, y) fun1(with(warpbreaks, breaks < 15)) #> wool #> 14
2018 Jan 09
0
SpreadLevelPlot for more than one factor
Dear Sir, Many thanks for your reply. I have a query. I have a whole set of distributions which should be made normal / homoscedastic. Take for instance the warpbreaks data set. We have the following boxplots for the warpbreaks dataset: a. boxplot(breaks ~ wool) b. boxplot(breaks ~ tension) c. boxplot(breaks ~ interaction(wool,tension)) d. boxplot(breaks ~ wool @ each level of tension) e.
2018 Jan 14
1
SpreadLevelPlot for more than one factor
Dear Ashim, I?ll address your questions briefly but they?re really not appropriate for this list, which is for questions about using R, not general statistical questions. (1) The relevant distribution is within cells of the wool x tension cross-classification because it?s the deviations from the cell means that are supposed to be normally distributed with equal variance. In the warpbreaks data