search for: result3

Displaying 20 results from an estimated 27 matches for "result3".

Did you mean: result
2011 Nov 15
3
Create a function with multiple object as an output
I've seen some questions regarding the output of multiple objects from a function, however the suggestions all end up suggesting the use of return(list(result1=result1, result2=result2 , result3=result3)). How can I return multiple objects that are 2 big to be added to a list? -- View this message in context: http://r.789695.n4.nabble.com/Create-a-function-with-multiple-object-as-an-output-tp4074226p4074226.html Sent from the R help mailing list archive at Nabble.com.
2008 Nov 06
1
trouble with for loop
...,7 without checking determinants? Another similar problem that I have is that I have thousands of txt files and want to use a for loop to read them into R. The file names are consecutive but some of them are missing: For example, they are "result1.txt", "result2.txt", "result3.txt", "result5.txt"... When I use for loop to read it, it gets an error at "result4.txt" so that "result5.txt"... are not read. I attached an example program here. Could anyone help me? I appreciate your time in advance. Kyeongmi #create dataset name for (i in...
2009 Aug 10
0
Speeding up a bootstrap routine
...entredreturns1 <- actualreturns1-average_daily_return1; zerocentredreturns2 <- actualreturns1-average_daily_return2; zerocentredreturns3 <- actualreturns1-average_daily_return3; n <- length(detrendedreturns); result1 <- 0.0; # initialise result result2 <- 0.0; # initialise result result3 <- 0.0; # initialise result # create matrices to hold sampling returns matrix_1 <- matrix(0,1,n) matrix_2 <- matrix(0,1,n) matrix_3 <- matrix(0,1,n) datevector <- 1:n # create vector for the actual "date sampling" # the bootstrap routine, placing results into the above re...
2006 Sep 22
2
foo.expects(:blah).returns(10).then(11) syntax
I recently needed the behavior of my object to change on subsequent method calls so I added the syntax above. Here''s the diff of changes I made: Index: test/mocha/expectation_test.rb =================================================================== --- test/mocha/expectation_test.rb (revision 854) +++ test/mocha/expectation_test.rb (working copy) @@ -95,6 +95,12 @@
2013 Jun 10
4
Combining CSV data
Hello R community, I am trying to combine two CSV files that look like this: File A Row_ID_CR, Data1, Data2, Data3 1, aa, bb, cc 2, dd, ee, ff File B Row_ID_N, Src_Row_ID, DataN1 1a, 1, This is comment 1 2a, 1, This is comment 2 3a,
2002 Feb 13
3
xtabs
Hi, In Splus if I call the function crosstabs() the output is a contigency table; in each cell of the table is printed: N, N/RowTotal, N/ColTotal, N/Total. N is the number of observations in each cell. The same call to xtabs() in R will produce the contigency table but the only entry in each cell is N. How can I get the same relative frequencies that crosstabs() gives? Thanks, mike --
2024 Jul 04
1
R FAQ 2.6, 7.21
...24,8 +2621,31 @@ @end example @noindent -without any of this messing about. +without any of this messing about. This becomes especially true if you +are finding yourself creating and trying to programmatically access +groups of related variables such as @code{result1}, @code{result2}, + at code{result3}, and so on: instead of fighting against the language to +use + at example +# 'i'th result <- process('i'th dataset) +assign(paste0("result", i), process(get(paste0("dataset", i)))) + at end example + +it is much easier to put the related variables in lists...
2012 Sep 20
3
lattice dotplot reorder contiguous levels
my reproducible example test<-structure(list(site = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 3L, 3L, 3L, 3L, 3L, 3L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 4L, 5L), .Label = c("A", "B", "C", "D", "E"), class = "factor"),
2013 Jan 09
1
Need an advise for bayesian estimate
...), data = ethylene.mod) Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -145.157 43.670 -3.324 0.000887 *** lnC 12.972 3.918 3.311 0.000931 *** lnT 9.122 2.736 3.334 0.000855 *** Using bayesglm with two-column data: summary(result3) Call: bayesglm(formula = DL ~ lnC + lnT, family = binomial(link = "probit"), data = ethylene) Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -134.971 17.490 -7.717 1.19e-14 *** lnC 12.060 1.570 7.680 1.59e-14 *** lnT 8.4...
2016 Dec 08
3
wish list: generalized apply
Dear All, I regularly want to "apply" some function to an array in a way that the arguments to the user function depend on the index on which the apply is working. A simple example is: A <- array( runif(160), dim=c(5,4,8) ) x <- matrix( runif(32), nrow=4, ncol=8 ) b <- runif(8) f1 <- function( A, x, b ) { sum( A %*% x ) + b } result <- rep(0.0,8) for (i in 1:8) {
2007 Aug 12
5
stubbing a method that yeilds sequential results
I''ve just found myself stuck trying to rspec something so am hoping someone more knowledgable can help. I have a Connector class which has a class method ''results'' that yields results it get from a network service based on a set of attributes that I pass to it. I am wanting to yield these results from my Intermediate class up to the next
2017 Oct 26
0
Help needed with aggregate or other solution
...tely, use tidyverse library(dplyr) #> #> Attaching package: 'dplyr' #> The following objects are masked from 'package:stats': #> #> filter, lag #> The following objects are masked from 'package:base': #> #> intersect, setdiff, setequal, union result3 <- ( dta2 %>% group_by( date ) %>% do({ DF <- . DF[ which.max( DF$fcst ), ] }) %>% ungroup %>% as.data.frame ) result3 #> date basistime...
2017 Oct 26
3
Help needed with aggregate or other solution
...; > #> Attaching package: 'dplyr' > #> The following objects are masked from 'package:stats': > #> > #> filter, lag > #> The following objects are masked from 'package:base': > #> > #> intersect, setdiff, setequal, union > result3 <- ( dta2 > %>% group_by( date ) > %>% do({ > DF <- . > DF[ which.max( DF$fcst ), ] > }) > %>% ungroup > %>% as.data.frame > ) > result3 > #>...
2017 Oct 26
0
Help needed with aggregate or other solution
...; > #> Attaching package: 'dplyr' > #> The following objects are masked from 'package:stats': > #> > #>? ? ?filter, lag > #> The following objects are masked from 'package:base': > #> > #>? ? ?intersect, setdiff, setequal, union > result3 <- (? ?dta2 > ? ? ? ? ? ?%>% group_by( date ) > ? ? ? ? ? ?%>% do({ > ? ? ? ? ? ? ? ? ?DF <- . > ? ? ? ? ? ? ? ? ?DF[ which.max( DF$fcst ), ] > ? ? ? ? ? ? ? ?}) > ? ? ? ? ? ?%>% ungroup > ? ? ? ? ? ?%>% as.data.frame > ? ? ? ? ? ?) > result3 > #>?...
2017 Oct 26
2
Help needed with aggregate or other solution
Hello all! I've been struggling with is for many hours today; I'm close to getting what I want, but not close enough... I have a dataframe consisting of two date-time columns followed by two numeric columns. what I need is the max value (in the first numeric column) based on the 2nd date-time column, which is essentially a factor. But, I want the result to provide both date-time values
2014 Oct 05
0
[PATCH v5 2/7] tests/c-api: Convert the C API tests to use the test harness.
...command3/test-command"]; + ["upload"; "$builddir/test-command"; "/command3/test-command"]; ["chmod"; "0o755"; "/command3/test-command"]; ["command"; "/command3/test-command 3"]], "\nResult3"), []; InitScratchFS, Always, TestResultString ( [["mkdir"; "/command4"]; - ["upload"; "test-command"; "/command4/test-command"]; + ["upload"; "$builddir/test-command"; "/command4/test-co...
2015 Aug 06
0
[PATCH v4 02/17] tests/c-api: Convert the C API tests to use the test harness.
...command3/test-command"]; + ["upload"; "$builddir/test-command"; "/command3/test-command"]; ["chmod"; "0o755"; "/command3/test-command"]; ["command"; "/command3/test-command 3"]], "\nResult3"), []; InitScratchFS, IfNotCrossAppliance, TestResultString ( [["mkdir"; "/command4"]; - ["upload"; "test-command"; "/command4/test-command"]; + ["upload"; "$builddir/test-command"; "/com...
2014 Oct 23
17
[PATCH 00/16] Small bits of non-Linux porting
Hi, from time to time, there have been requests (or attempts, like the mingw port posted on the list some months ago) to make libguestfs work on OSes different than Linux. Of course this would imply using a fixed appliance, since it is currently heavily dependent on Linux. The attached series provides some easy changes in this direction, resolving some of the easy issues found in porting to
2014 Oct 04
4
[PATCH v4 0/4] tests: Introduce test harness for running tests.
This converts more of the tests (basically everything under tests/) to use the test harness, revealing some problems which have subsequently been fixed. Rich.
2014 Oct 05
12
[PATCH v5 0/7] tests: Introduce test harness for running tests.
Since v4: - More tests have been converted. - Testing local guests fixed. - Drop no-exec-stack test.