Displaying 20 results from an estimated 38 matches for "myresults".
2009 Jul 07
4
Test for X=1 fails, test for >0 works, data in text file is 1
Hi,
I am apparently not understanding some nuance about either the use
of subset or more likely my ability to test for a numerical match
using '='. Which is it? Thanks in advance.
I've read a data file, reshaped it and then created MyResults by
keeping only lines where the value column is greater than 0. So far so
good. The data in MyResults looks good to me by eye.
The problem comes in when I try to further subset MyResults into
two files, one with PosType=1 and the other with PosType=-1. Looking
at the dimension of the results th...
2009 Jul 21
4
list of lm() results
How can I get the results of lm() into a list so I can loop through the results?
e.g.
myResults[1] <- lm(...)
myResults[2] <- lm(...)
myResults[3] <- lm(...)
...
myResults[15] <- lm(...)
myResults[16] <- lm(...)
so far every attempt I've tried doesn't work throwing a "number of
items to replace is not a multiple of replacement length" error or
simply not work...
2003 Apr 28
4
how to present a table in powerpoint?
Hi,
I have a nicely printed table of results generated by R's
> print(myresult)
where myresult is a "data frame".
I am trying to put this table into a powerpoint slide for presentation without re-typing and re-formating, i.e.,
present it as it is in the R window. This saves time when there are a lot of tables to be presented.
I tried
> sink("myresult.txt")
>
2005 Dec 07
1
Dots argument in apply method
Hello everyone,
I'm working on a package using S4 classes and methods and I ran into the
following "problem" when I tried to create an "apply" method for objects
of one of my new classes. I've found a way around the problem but I
wonder if I did not paint myself into the corner. I'd like your opinion
about that.
So I have an object "myObj" of class
2012 Jul 13
1
functions of vectors : loop or vectorization
...r function of several variables that I want to optimize over one
letting the other describe a family of curves. In short, I wan't to optimize
f(x,a,b) for several values of a and b.
It is easily done with a loop. Here's an example :
a = 1:5;
b = 1:5;
myfunction = function(x){y*x-(x+z)^2};
myresults = array(dim=c(length(a),length(b)));
for(y in a){ for(z in b) { myresults[y,z] =
optimize(myfunction,c(-10,10),maximum=TRUE)$maximum }};
myresults;
[,1] [,2] [,3] [,4] [,5]
[1,] -0.5 -1.5 -2.5 -3.5 -4.5
[2,] 0.0 -1.0 -2.0 -3.0 -4.0
[3,] 0.5 -0.5 -1.5 -2.5 -3.5
[4,] 1.0 0.0 -1.0 -2.0 -3.0
[5,]...
2009 Jul 08
1
What is cast telling me?
...ing some sort of sum then I'd like to
learn how to replace the value in the table with something meaningful
to me. On thing would the the ExNum value from the first occurrence at
that crosspoint, or the PL_Pos value, etc.
How might I write a fun.aggregate to to that?
Thanks,
Mark
> dim(MyResults)
[1] 1105 12
> head(MyResults, n=15)
ExNum PosType EnDate EnTime ExDate ExTime PL_Pos Costs Save2
time value id
1.1 1 -1 1080103 800 1080103 1310 520 26 0
1 746.2 1
2.1 2 -1 1080104 755 1080104 1310 530 26 0
1 721.9 2
3.1 3...
2006 Jul 19
1
A couple of problems
Hi Ezra,
Thanks for the great work on BackgrounDRb. I have come across a
couple of problems.
1. I wanted to define a simple class in the worker file to wrap up and
pass back some data to my controller. It seems that if I create the
class either inside or outside of my worker class (in the same file)
it gets wrapper by a DRb::DRbUknown object and therefore cannot be
accessed from my controller.
2010 Dec 03
2
How to get 'R' to talk BACK to other languages / scripts??
Hey everyone,
I know that I can call 'R' from other scripts, and that I can make
command calls from 'R' (e.g., using system() ). But how can I get 'R' to
RETURN values to the script that called it. E.g., I would like to be able
to do something like the following (as a simpler example) from a bash
script:
#!/bin/bash
myTest=echo /usr/local/bin/R --no-restore
2009 Mar 22
2
Following progress in a lapply() function
...instance, I have a list of 50,000 slots:
aList <- replicate(50000,list(rnorm(50)))
That need to be process through the following custom function:
myFnc <- function(x){
tTest <- t.test(x)
return(list(p.value=tTest$p.value,t.stat=tTest$stat))
}
Using an lapply statement, as in:
myResults <- lapply(aList, myFnc)
The goal would be to report on the progress of the lapply() function during processing.
Any suggestion would be greatly appreciated.
Thanks
Marco
--
Marco Blanchette, Ph.D.
Assistant Investigator
Stowers Institute for Medical Research
1000 East 50th St.
Kansas City...
2006 Aug 09
3
objects and environments
Dear list,
I have two functions created in the same environment, fun1 and fun2.
fun2 is called by fun1, but fun2 should use an object which is created in fun1
fun1 <- function(x) {
ifelse(somecondition, bb <- "o", bb <- "*")
## mymatrix is created, then
myresult <- apply(mymatrix, 1, fun2)
}
fun2 <- function(idx) {
if (bb == "o) {
#
2012 Feb 13
2
Puzzling... puzzling... puzzling...
...ry area...
This is very dangerous because I have used naming conventions such as:
MyLongVariableNameForA
MyLongVariableNameForB
MyLongVariableNameForC
...
...
Then if internally they are actually the same thing then all my programs
messed up...
Any thoughts?
>env=new.env()
>load("MyResults.rData", env)
>identical(env$sRes1$nPositionsOptimized, env$sRes1$nPositionsOptimizedM)
[1] TRUE
[[alternative HTML version deleted]]
2006 Mar 11
6
is there a formatted output in R?
something like "sprintf" in C?
so I can do:
print(sprintf("the correct result is %3.4f\n", myresult));
-------
Also, I am desperately looking for a "clear console screen" function in
R...
thanks a lot!
[[alternative HTML version deleted]]
2006 Jul 24
1
XMLRPC WebService and Structs
Hi
First off, I apologise if this is covered somewhere and I just don''t
get it... I''ve looked far and wide ....
As a part of my current project I need to hook up to a particular
XMLRPC webservice that won''t be available for me to use until close
to launch date... So I am trying to recreate the webservice that
mirrors the live one so I can test my application
2017 Nov 24
2
Multiple sets of proportion tests
...variable I variable II Variable III ......... 200
Freq.of cases (gp I) 6493 9375 5524
Freq. of cases (gpII) 509 462 54
The result I need for the first column can be given using this code :
MyResultsI <- prop.test(Mydata$variable I ,c(200,100))
for the second column :-
MyResultsII <- prop.test(Mydata$variable II ,c(200,100)) and so on ..
I need to do the analysis for all columns and have only the columns with significant p-value results to be written in the the third row under each co...
2017 Nov 24
1
Multiple sets of proportion tests
Thank you for clarifying this point but my main question was about how to modify my code to do the analysis correctly. The code I mentioned :-
MyResults <- apply(Mydata, 2, function(x)prop.test(Mydata,c(200,100))
Results in this error : 'x' and 'n' must have the same length in the prop.test(x,n).
How can I modify "x' or "n" arguments so the analysis gives me the desired output
shown in my previous post ?...
2007 Mar 07
1
Fwd: Package-RODBC-MSACCESS
I have used RODBC to get the database i can view the tables in RGUI-2.4.1
how can i query the records in R>
i tried with sqlQuery
need some help
JJ
--
Lecturer J. Joshua Thomas
KDU College Penang Campus
Research Student,
University Sains Malaysia
--
Lecturer J. Joshua Thomas
KDU College Penang Campus
Research Student,
University Sains Malaysia
[[alternative HTML version deleted]]
2007 Aug 24
2
Saving results from Linux command line
Hi All,
I'm used to running R on Windows & learning Linux. I know ESS is the way
to go in the long run, but I'm trying now to just understand the command
line. I can interactively enter commands, see the results on the screen
and save input & output to myresults.txt with this approach:
$script myresults.txt
$R
> ...r commands...
>q()
$exit
I can also use the Linux tee command to do essentially the same thing.
Both of those approaches do what I want, but I assume there is a way to
do it within R. I've been through AITR Appendix B and the FAQ lo...
2010 Aug 11
1
sem & psych
...MR)
iterM2 <- as.numeric(myModlChiM2$iterations)
resultsM2 <- as.numeric(c(convergenceM2, chiM2, dfM2, chiM0, dfM0,
GFIM2, AGFIM2, RMSEAM2, CFIM2, BICM2, SRMRM2, iterM2))
}
designparameters <- c(traitLoad, traitCorr, methodLoad, methdCorr)
myResults <- c(designparameters, SampleSize, resultsM1, resultsM2) #,
convergenceM3, resultsM3) #
return(myResults)
} # End of function sizeControlGroup
############ Loop for replications
##########################################################
totalRepeats = 100
for(myRepeats in 1:totalR...
2008 Feb 15
12
Transfer Crosstable to Word-Document
# Dear list,
# I am an R-beginner and
# spent the last days looking for a method to insert tables produced
# with R into a word document. I thought about SPPS: copy a table from
# an SPO-file and paste it into a word document
# (if needed do some formatting with that table).
# Annother idea was, to produce a TEX-file,
# insert it and make it a word-table.
# I found the following libraries, which
2010 Dec 18
0
R-sig-DB Digest, Vol 74, Issue 2
Hi,
Your mistake is related with "read.table(n)". I haven`t got what you want
but I put an example below (where I used loop to read many files). Hope it
helps. Anyway, I thougth should have sent your question to
<r-help@r-project.org>.
Bye
Nilza
=====example ====================
nomesout <- dir(dat.dir,pattern="^[s]") #obtem no diretorio de atual todos
arquivo