Displaying 20 results from an estimated 101 matches for "result2".
Did you mean:
result
2006 Apr 21
5
Simple Question: How to merge SQL results?
Hopefully an easy one, how do I merge two or more SQL query results?
Example:
result1 = find_by_sql(x)
result2 = find_by_sql(y)
What is the best way to merge result1 and result2? I want to be able
to reference the objects as if they were obtained via one query.
Cheers,
Dan
2010 Nov 09
2
Creating a list to store output objects from a recursive loop
Dear Group,
I am having a function that I am running in a loop that generated two
results for each loop
The result1 is a zoo object
The result2 is a data frame
Now I want to put both of them in a list or some structure ... that I can
access or output to a file after the loop is done.
For e.g.
for (i in 1:20){
niceFunction(x[i],i)
}
niceFunction (x,i) {
result1 = someOperations() #zoo object
result2 = someOperations() #data.frame...
2013 Mar 18
2
Fit a mixture of lognormal and normal distributions
Hello
I am trying to find an automated way of fitting a mixture of normal and log-normal distributions to data which is clearly bimodal.
Here's a simulated example:
x.1<-rnorm(6000, 2.4, 0.6)x.2<-rlnorm(10000, 1.3,0.1)X<-c(x.1, x.2)
hist(X,100,freq=FALSE, ylim=c(0,1.5))lines(density(x.1), lty=2, lwd=2)lines(density(x.2), lty=2, lwd=2)lines(density(X), lty=4)
Currently i am using
2009 Oct 15
1
tapply() and using factor() on a factor
Dear List,
Shouldn't result1 and result2 be equal in the following case?
Note that log$RequestID is a factor. That is, is.factor(log$RequestID)
yields TRUE.
result1 <- tapply(log$Flag,factor(log$RequestID),sum)
result2 <- tapply(log$Flag,log$RequestID,sum)
Yet, when I summarize the output, I get the following:
summary...
2018 Jan 24
2
Issue with concatenation of URL losing
Thank you for your help in advance.
I am trying to pull some data back from a web service
library(httr)
sample2 <- GET("https://elevation.mapzen.com/height?json={\"range\":false,\"shape\":[{\"lat\":40.7,\"lon\":-76.5}]}&api_key=mycode")
result2 <- content(sample2)
height <- result2$height[[1]]
I would like to put by own latitude and longitude in but alas when I use paste() to combine the double quotes become stuck as literally \"
lat <-10
long <20
library(httr)
sample2 <- GET(paste("https://elevation.mapzen....
2012 Jan 08
2
Convert components of a list to separate columns in a data frame or matrix XXXX
...ffering
lengths) in the same character vector:
more<-c('R is a free software environment for statistical computing',
'It compiles and runs on a wide variety of UNIX platforms')
result<-strsplit(more,' ')
result
mode(result)
class(result)
sapply(result,length)
result2<-unlist(result)
result2
mode(result2)
class(result2)
Thank you,
Dan
[[alternative HTML version deleted]]
2013 Sep 24
2
[LLVMdev] LLD: Returning true on success
...e string.
>
> I think it makes a lot of sense in this case. The idea is that you increase indentation in the "error" case. Consider parsing 2 numbers and returning their sum:
>
> if (S1.getAsInteger(16, Result1)) {
> // report failure
> }
> if (S2.getAsInteger(16, Result2)) {
> // report failure
> }
> return Result1 + Result2;
>
> vs.
>
> if (S1.getAsIntegerTrueOnSuccess(16, Result1)) {
> if (S2.getAsIntegerTrueOnSuccess(16, Result2)) {
> return Result1 + Result2;
> } else {
> // report failure
> }
> } else {
>...
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.
2013 Sep 24
0
[LLVMdev] LLD: Returning true on success
...ere
> was an error parsing the string.
>
I think it makes a lot of sense in this case. The idea is that you increase
indentation in the "error" case. Consider parsing 2 numbers and returning
their sum:
if (S1.getAsInteger(16, Result1)) {
// report failure
}
if (S2.getAsInteger(16, Result2)) {
// report failure
}
return Result1 + Result2;
vs.
if (S1.getAsIntegerTrueOnSuccess(16, Result1)) {
if (S2.getAsIntegerTrueOnSuccess(16, Result2)) {
return Result1 + Result2;
} else {
// report failure
}
} else {
// report failure
}
Of course, in the latter case you would just u...
2013 Sep 24
3
[LLVMdev] LLD: Returning true on success
On Sep 24, 2013, at 12:40 PM, Michael Spencer <bigcheesegs at gmail.com> wrote:
> On Tue, Sep 24, 2013 at 12:33 PM, Rui Ueyama <ruiu at google.com> wrote:
> Hi LLD developers,
>
> I'm about to make a change to invert the return value of Driver::parse() to return true on success. Currently it returns false on success.
>
> In many other functions, we return true
2013 Sep 25
0
[LLVMdev] LLD: Returning true on success
...gt;
>
> I think it makes a lot of sense in this case. The idea is that you
> increase indentation in the "error" case. Consider parsing 2 numbers and
> returning their sum:
>
> if (S1.getAsInteger(16, Result1)) {
> // report failure
> }
> if (S2.getAsInteger(16, Result2)) {
> // report failure
> }
> return Result1 + Result2;
>
> vs.
>
> if (S1.getAsIntegerTrueOnSuccess(16, Result1)) {
> if (S2.getAsIntegerTrueOnSuccess(16, Result2)) {
> return Result1 + Result2;
> } else {
> // report failure
> }
> } else {
>...
2018 Jan 24
0
Issue with concatenation of URL losing
....
>
>
> I am trying to pull some data back from a web service
>
>
> library(httr)
> sample2 <- GET("https://elevation.mapzen.com/height?json={\"range\":false,\"shape\":[{\"lat\":40.7,\"lon\":-76.5}]}&api_key=mycode")
> result2 <- content(sample2)
> height <- result2$height[[1]]
>
>
> I would like to put by own latitude and longitude in but alas when I use
> paste() to combine the double quotes become stuck as literally \"
>
>
> lat <-10
>
> long <20
>
> library(httr)...
2010 Jan 14
0
Bootstrap for correlation coefficient
I have the following code:
## to check correlation between the simulated uniform data
x2 <- uni[,1] ; x2[1:10]
y2 <- uni[,2] ; y2[1:10]
result2 <- boot(cbind(x2,y2), f, 20)
# get 95% confidence interval
boot.ci(result2, type="bca")
cor.test(x2,y2, method="pearson", conf.level=0.95)
part of my data:
> x2 <- uni[,1] ; x2[1:10]
[1] 0.63933145 0.71677785 0.02181925 0.15913391 0.61021930 0.72878176 0.22237891...
2007 Aug 12
5
stubbing a method that yeilds sequential results
...sult
end
end
yield @saved_result unless @saved_result.nil?
end
def results_match(this, last)
return false if last.nil?
....
end
end
I can''t for the life of me see how I should spec this though, as trying:
Connector.stub!(:results).and_yield(@result1, @result2)
is expecting the two results to be yielded at the same time and not
sequentially. I can''t see how to stub a method to yield sequential
results so I can spec the behavior for different scenarios of
similarities between subsequent results. Is it possible to do this?
Any help would...
2010 Jan 21
1
why scores are different in rda() and princomp()
hello,
I am doing PCA in R using some habitat factors, and I used the function result1=rda() and result2=princomp(),then pick up scores of the result1 and result2 using scores(),but the scores are significantly different,i do not know the meaning of it.
Best wishes!
Cheng
[[alternative HTM...
2007 Oct 26
2
how do i find the annual maximun within several years?
...s.na(e2)
2: longer object length
is not a multiple of shorter object length in:
`==.default`(date, y)
i also tried:
result <- matrix(nrow=0,ncol=2)
for (y in yyyy:yyyy) {
Y <- grep(y, table[,1],value=TRUE)
Max <- max (subset(table, date %in% Y, c(date, measurement1))[,2])
result2 <- (c(y,Max))
result <- rbind(result2,result)
}
print(result)
that kind of worked, but only gave me the year in the result, but i need
the full date, for the statistical analysis.
i hope you can help me with this,
thank you in advance,
d.salecker
2006 Jul 10
1
How can I obtain the values of BIAS and STD. ERROR from a bootstrap.
R 2.3.1
Windows XP
Question: How can I obtain the values of BIAS and STD. ERROR from a
bootstrap.
Background:
I am running a bootstrap:
result2<-boot(1:400,regSEvssample,R=5000)
and obtain the following results:
Bootstrap Statistics :
original bias std. error
t1* 1.876602 -0.0001368616 0.1630380
I would like to get the values of ORIGINAL and BIAS. I can get the
value of ORIGINAL:
> result2$t0
[1] 1.876602
But I c...
2007 Nov 26
3
Time Series Issues, Stationarity ..
...bout the following issues. I' ll really appreciate any number of
answers...
# I have a time series data composed of 24 values:
myinput = c(n1,n2...,n24);
# In order to make a forecasting a, I use the following codes
result1 = arima(ts(myinput),order = c(p,d,q),seasonal = list(order=c(P,D,Q)))
result2 = forecast(result1,12)
plot(result2)
Now, by using R code...
1) How can I determine if my data is statitonary or not ? (trend &
seasonal effects)
2) If not, how can I make it stationary ?
3) Is arima() function used only on STATIONARY data ? Or does it first
determine if the data is stationar...
2011 Mar 11
1
Generation of random numbers in a function - (Return command)
...eturn(output_avg_mc )
}
result <- dlply(.data = filtered_new, .variables = "product_name", .fun = function(x)
myfunction_mc(product_name = x$product_name, output_avg = x$output_avg,
output_stdev = x$output_stdev))
result1 <- data.frame(result)
result2 <- melt(result1)
result <- data.frame(product = filtered_new$product_name, Monte_Carlo_result = result2$value)
And it gives me the desired result.
######### PROBLEM is as given below -
But if in the "myfunction_mc", in the return statement if I try to add ...
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,