Displaying 20 results from an estimated 1000 matches similar to: "Loop with string variable AND customizable "summary" output"
2007 Dec 05
1
Working with "ts" objects
I am relatively new to R and object oriented programming. I have relied on
SAS for most of my data analysis. I teach an introductory undergraduate
forecasting course using the Diebold text and I am considering using R in
addition to SAS and Eviews in the course. I work primarily with univariate
or multivariate time series data. I am having a great deal of difficulty
understanding and working with
2011 Nov 24
2
proper work-flow with 'formula' objects and lm()
Dear all
I have a work-flow issue with lm(). When I use
> lm(y1~x1, anscombe)
Call:
lm(formula = y1 ~ x1, data = anscombe)
Coefficients:
(Intercept) x1
3.0001 0.5001
I get as expected the formula, "y1 ~ x1", in the print()ed results or
summary(). However, if I pass through a formula object
> (form <- formula(y1~x1))
y1 ~ x1
> lm(form, anscombe)
Call:
2020 Oct 15
0
package(moments) issue
moments::anscombe.test(x) does give errors when x has too few values or if
all the values in x are the same
> moments::anscombe.test(c(1,2,6))
Error in if (pval > 1) pval <- 2 - pval :
missing value where TRUE/FALSE needed
> moments::anscombe.test(c(2,2,2,2,2,2,2,2))
Error in if (pval > 1) pval <- 2 - pval :
missing value where TRUE/FALSE needed
You can use tryCatch() to
2020 Oct 15
2
package(moments) issue
Hi all,
While running the anscombe.test in R, I'm getting an error of *Error in if
(pval > 1) pval <- 2 - pval : missing value where TRUE/FALSE needed* for a
few time series columns whereas for most of the series the function is
working fine. I have checked for those specific columns for missing values.
However, there is no NA/NAN value in the dataset.
I have also run kurtosis for
2020 Oct 15
2
package(moments) issue
Hi Bill,
Thanks for prompt reply and letting me know a way around it.
I have more than 1200 observations and not all the values are the same.
However, my data points are quite similar, for example,
0.079275, 0.078867, 0.070716 in millions and etc. I have run the data
without converting it to millions and I still get the same error
message. As I have kurtosis value, it should be fine for the
2006 Aug 16
3
separate row averages for different parts of an array
I have an array with 44800 columns and 24 rows I would like to compute the
row average for the array 100 columns at a time, so I would like to end up
with an array of 24 rows x 448 columns. I have tried using apply(dataset, 1,
function(x) mean(x[])), but I am not sure how to get it to take the average
100 columns at a time. Any ideas would be welcomed.
thanks,
Spencer
[[alternative HTML
2010 Jun 10
2
points marking
Hi,
How to mark points on x axis of a graph keeping x axis as constant and
changing y from y1 to y2 respectively. I want to highlight the area from y1
to y2.
Any suggestions
Thank you
Jeet
[[alternative HTML version deleted]]
2007 Mar 13
2
turn regression coefficients into matrix or...
I don't have much experience with r. What I am trying to do is to turn
regression coefficients (after I run a lm or glm model) into some matrix
such that I can do some post-estimation calculation, for example predicted
probabilities in glm model, etc.. Or, is there any function in r that I can
use to do something along that line? thanks.
Jun Xu, Ph.D.
Department of Sociology
Ball State
2006 Sep 25
1
Rows of a data frame to matrix
useRs,
I have a data frame where four of the columns of the data frame represent the values of a two-by-two
matrix. I'd like to, row-by-row, go through the data frame and use the four columns, in matrix form, to
perform calculations necessary to create new values for variables in the data frame. My first idea was to
use apply:
apply(as.array(data.frame[,1:4]), 1, matrix, nrow=2)
Though
2011 Oct 25
1
alternative option in skewness and kurtosis tests?
I have a question about the D'Agostino skewness test and the Anscombe-Glynn
kurtosis test.
agostino.test(x, alternative = c("two.sided", "less", "greater"))
anscombe.test(x, alternative = c("two.sided", "less", "greater"))
The option "alternative" in those two functions seems to be the null
hypothesis. In the output, the
2007 Aug 26
3
subset using noncontiguous variables by name (not index)
Hi All,
I'm using the subset function to select a list of variables, some of
which are contiguous in the data frame, and others of which are not. It
works fine when I use the form:
subset(mydata,select=c(x1,x3:x5,x7) )
In reality, my list is far more complex. So I would like to store it in
a variable to substitute in for c(x1,x3:x5,x7) but cannot get it to
work. That use of the c function
2020 Oct 15
0
package(moments) issue
Another bad case is
> moments::anscombe.test(rep(c(1,1.1),length=35))
Error in if (pval > 1) pval <- 2 - pval :
missing value where TRUE/FALSE needed
I haven't checked the formulas carefully, but I suspect the problem is from
taking the cube root of a negative number in
z <- (1 - 2/(9 * a) - ((1 - 2/a)/(1 + xx * sqrt(2/(a -
4))))^(1/3))/sqrt(2/(9 * a))
In R, the
2006 Dec 23
1
customizable idle login timeouts?
We're in the process of migrating from mbox over to maildir.
I'm running into a problem with the proxy and timeouts. Appears the idle
timeout is set to 60 seconds. This is a bit too low for some of our large
mbox files :(
Any plans on adding the:
#define CLIENT_LOGIN_IDLE_TIMEOUT 60
#define AUTH_REQUEST_TIMEOUT
to the .conf file to be tunable on the fly?
I ended up just patching the
2006 Aug 29
2
lattice/xyplot: plotting 4 variables in two panels - can this be done?
Hi,
I would like to create a plot of y1,y2,y3,y4 against x for several subjects such that y1 and y2 are plotted against x in one panel and y3 and y4 against x in another panel. Thus if there are 3 subjects I should end up with 6 panels. Is there a simple way of doing so (i.e. without calling xyplot() several times, and then padding the results together)??
Regards
S?ren
2020 Apr 22
0
[PATCH hmm 5/5] mm/hmm: remove the customizable pfn format from hmm_range_fault
On Wed, Apr 22, 2020 at 08:03:29AM +0200, Christoph Hellwig wrote:
>
>
> On Tue, Apr 21, 2020 at 09:21:46PM -0300, Jason Gunthorpe wrote:
> > +void nouveau_hmm_convert_pfn(struct nouveau_drm *drm, struct hmm_range *range,
> > + u64 *ioctl_addr)
> > {
> > unsigned long i, npages;
> >
> > + /*
> > + * The ioctl_addr prepared here is
2007 Nov 11
4
DO NOT REPLY [Bug 5071] New: Enhancement Request - Customizable Connection Timeout Option
https://bugzilla.samba.org/show_bug.cgi?id=5071
Summary: Enhancement Request - Customizable Connection Timeout
Option
Product: rsync
Version: 2.6.9
Platform: Other
OS/Version: Other
Status: NEW
Severity: enhancement
Priority: P3
Component: core
AssignedTo: wayned@samba.org
2020 May 02
1
[PATCH hmm v2 5/5] mm/hmm: remove the customizable pfn format from hmm_range_fault
On 5/1/20 11:20 AM, Jason Gunthorpe wrote:
> From: Jason Gunthorpe <jgg at mellanox.com>
>
> Presumably the intent here was that hmm_range_fault() could put the data
> into some HW specific format and thus avoid some work. However, nothing
> actually does that, and it isn't clear how anything actually could do that
> as hmm_range_fault() provides CPU addresses which
2006 Jul 11
2
R newbie: logical subsets
Hello! I'm a newcomer to R hoping to replace some convoluted database
code with an R script. Unfortunately, I haven't been able to figure out
how to implement the following logic.
Essentially, we have a database of transactions that are coded with a
geographic locale and a type. These are being loaded into a data.frame
with named variables city, type, and price. E.g., trans$city
2012 Jun 28
4
Printing a variable in a loop
Dear R Users:
I'm a STATA user converting to R, and I'd like to be to do the following.
#Assign var_1 and var_2 a value
10->var1
20->var2
#Now I'd like to print the values of var_1 and var_2 by looping through
var_1 and var_2 in such a manner:
while(y<3){
print(var_y)
y+1->y
}
In STATA, the "y" appended to " var_" is called the local variable and
2006 Apr 02
1
Greetings, first remarks about trying to do customizable drop-shadows
Hello there everybody!
Terrific... a mailing-list for compiz with David on board! Ok, I
started off with writing some functions using cairo to draw me the
needed elements for drop-shadows (atm stand-alone to focus on the proper
generation of the shadow-parts) and currently still fiddle with the
tweakable parameters. Right now I have...
shadow-radius (e.g. 20 pixels)
2D-offset vector (e.g. 10