Displaying 20 results from an estimated 500 matches similar to: "Change legend position in s.value {ade4}"
2006 May 11
2
Rendering
I want to do something like this:
<%= link_to "Attack!", :action => "attack", :id => session[:user].id,
:op_id => users.id, :update => "attk-div",:postion => "top" %>
But, What should I user link_to will redirect on click so what action do
I do?
--
Posted via http://www.ruby-forum.com/.
2002 May 15
2
combining vectors to matrices or data frames
hi,
during a for(i in 1:xx]) loop I always newly calculate a vector
(e.g. tmp<-c(a,b,c,d,e) )
now i need that vector to be attached at the bootom of a matrix (or
data.frame).
e.g.
m<-matrix()
for(i in 1:5]){
#some calculations for a,b,c,d,e
a<- ... b<- ... c<- .. ....
tmp<-c(a,b,c,d,e)
??? now I need to attach this tmp to the matrix m ???
}
i couldn't get rbind
2010 May 04
7
How to replace all <NA> values in a data.frame with another ( not 0) value
I need to replace <NA> occurrences in multiple columns in a data.frame
with "000/000"
how do I achieve this?
Thanks
Nevil Amos
2010 Apr 09
1
Problem with Loops
Hello,
I am trying to write a script with the end goal of graphing power (y) as a
result of sample size (x) at a variety of effects sizes. I am new to loops,
and I think my problem is there. Here's the script, which is modified from
the script found at the bootom of
http://www.statmethods.net/stats/power.html. ANy help would be much
appreciated!mtesche at ualberta.ca
library(pwr)
2012 Jan 21
2
replacing "+" in string
I am trying to replace "+" in a string with another character
I am getting odd results using sub and gsub
> X<-"one + two"
> gsub("+","plus",X)
[1] "plusoplusnpluseplus plus+plus plustpluswplusoplus"
> sub("+","plus",X)
[1] "plusone + two"
> X<-"one ~ two"
it seems to work fine with other
2012 Apr 10
7
How to remove $ (Dollar sign) from string
How do I remove a "$" character from a string sub() and gsub() with "$" or
"\$" as pattern do not work.
> sub("$","","ABC$DEF")
[1] "ABC$DEF"
> sub("\$","","ABC$DEF")
Error: '\$' is an unrecognized escape in character string starting "\$"
>
2011 Oct 16
2
How to plot CI's (llim ulim) on ecodist mgram
I would like to put confidence intervals on a mantel corellogram
they are already calculated in the pmgram object but I am unsure how I
get the x value in order to plot them?
package(ecodist)
X<-1:100
Y<-rnorm(1:100)
Z<-rnorm(1:100)
XY<-dist(data.frame(X,Y))
YX<-dist(data.frame(Y,X))
my.mgram<-mgram(XY,XZ)
plot(my.mgram)
print(my.mgram)
> print(my.mgram)
$mgram
2012 May 20
5
removeing only rows/columns with "na" value from square ( symmetrical ) matrix.
I have some square matrices with na values in corresponding rows and
columns.
M<-matrix(1:2,10,10)
M[6,1:2]<-NA
M[10,9]<-NA
M<-as.matrix(as.dist(M))
print (M)
1 2 3 4 5 6 7 8 9 10
1 0 2 1 2 1 NA 1 2 1 2
2 2 0 1 2 1 NA 1 2 1 2
3 1 1 0 2 1 2 1 2 1 2
4 2 2 2 0 1 2 1 2 1 2
5 1 1 1 1 0 2 1 2 1 2
6 NA NA 2 2 2 0 1 2 1 2
7 1 1 1 1 1 1 0 2 1 2
8
2013 Aug 27
1
return the name of source.
Is there a fuction that will allow me to retrun the filename for a script
from within that script.
fir instance
If I have a script "myscript.r":
FileName<-unknown.fucntion()
print(FileName)
and run it
source("myscript.r")
will return
"myscript.r"
Thanks
Nevil Amos
[[alternative HTML version deleted]]
2012 Jan 11
2
Vegan(ordistep) error: Error in if (aod[1, 5] <= Pin) { : missing value where TRUE/FALSE needed
I am getting the following erro rmessage in ordistep. I have a number of
similarly structured datasets using ordistep in a loop, and the message
only occurs for some of the datasets.
I cannot include a reproducible sample - the specific datasets where this
is occur ing are fairly large and there are several pcnm's in the rhs of
the formula.
thanks for any pointers that may allow me to
2020 Oct 31
2
raster::levels() not working in packaged function.
Apologies, I cannot see how to make a rero for this issue.
I have a function that uses levels(r) tor return the RAT of a raster "r"
when the function is sourced from a script
source(".\R\function.r")
it works fine.
when the function is built into a package and sourced from there
library(mypackage) using the same script file to make the package
levels(r)[[1]]
the same line
2006 Aug 11
1
Group By
Hi,
I have a table similar structure below.
id name position page
1 name1 1 1
2 name2 2 1
3 name3 3 1
4 name4 1 1
5 name5 1 1
6 name6 1 2
What i want is to select all the items for a given page number grouped
by pos and displayed in a view using a loop like:
display position number, number of records
for
2007 Sep 28
1
drag and drop reset
I have a draggable, and I place it on a droppable. How do I make the
draggable go back to its original postion? Thanks.
-Tim
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group.
To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
2008 Sep 17
1
Re adout row and column of a matrix value
Hello R users,
I want to readout the row and column postion from a certain matrix value
into a csv file.
I have only found this syntax
"which(a == b, arr.ind = T)"
so I get
a = matrix
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8]
[1,] 1 1 2 2 2 1 1 2
[2,] 1 2 3 3 3 4 4 3
[3,] 3 3 3 5 5 6 5 4
[4,] 4 4 4 3
2010 Oct 12
2
repeatability/intraclass with nested levels
I have a spectrophotometric dataset with repeated measures of a value
at 200 wavelengths for each of 150 individuals.
I would like to use the repeated samples to at each wavelength to look
at measurement/observer error, compared to difference between
individuals error
I have looked at doing this with icc{irr} or using an anova approach,
but I am unclear how to acheive this given that there
2011 Dec 03
1
partial mantel tests in ecodist with intential NA values.
I would like to perform partial mantel tests on only within group values, with "between group" values assigned to NA.
This is possible in package ncf partial.mantel.test, however this sues a different permutation to that used in ecodist.ecodist will not accept data with NA values, returning a "matrix is not square error.
is it possible to perform this test in ecodist?
many thanks
2010 Sep 21
1
partial dbRDA or CCA with two distance objects in Vegan.
I am trying to use the cca/rda/capscale functions in vegan to analyse
genetic distance data ( provided as a dist object calculated using
dist.genpop in package adegenet) with geographic distance partialled out
( provided as a distance object using dist function in veganthis method
is attempting to follow the method used by Geffen et al 2004 as
suggested by Legendre and . FORTIN (2010).
I
2010 May 07
1
writing string values from a matrix to a file without enclosing quotes
I am trying to format data for the Geneland package
I need to write a series of paired numbers and paired "000"
to a plain ascii file without surrounding the numerals with quotes,
the original data is in a matrix formatted paired strings,
and written to file using
write.table(x,"output filename",col.names=F,row.names=F)
thus
"77 79" "132 132" "000
2011 Sep 12
1
how to get xlab and ylab in bold?
A very basic query
This code plots OK the axis values are in bold but the axis labels are
not. how do I get them in bold too?
thanks
Nevil Amos
plot(c(1,1),xlim=c(0,450),ylim=c(0.7,1.4),xlab="Distance (cells) from
edge of grid",ylab="Resistance distance",
type="l",col="white",lwd=2,font=2,family='sans')
2010 Jun 01
1
Printing page nmbers in multi-page pdf
Is it possible to print page numbers in pdf() with multiple pages?
thanks
Nevil Amos