ing it at all if you fold V2 into a matrix instead. Did you mean to use
> matrix multiplication in your calculation of M3?
>
> On September 13, 2021 11:48:48 PM PDT, nevil amos
> wrote:
> >Hi is there a faster way to "extract" rows of a matrix many times to for a
> &g
-(microbenchmark(
M2<-M[V,],
M3<-M2*V2,
times=5,unit = "ms"))
thanks for any suggestions
Nevil Amos
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.ch/ma
Is it possible to update the filename variable the shinySaveButton from
the server?
I want to provide a default filename based on a series of choices that the
user has made in the app ( here I have just made a random string to serve
the purpose. how do I feed output$defaultname
so that shinySa
just to demonstrate the result. There is no
change in the directory.
How do I change the working directory ?
thanks
nevil Amos
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://
t; message.
Should it be possible to "see" and use
Sys.setenv("AWS_DEFAULT_REGION" =MYDEFAULTREGION)
aws.s3::s3sync (path ="./", bucket=MYBUCKETNAME,check_region = F,direction
= "download")
to download the bucket contents without providing a keypair where both
b
Hi Rasmus,
thanks for that suggestion. It does indeed fix the column widths in this
example. the reason it does this is becuase it means that the additonal 0
values added result in values for two adjacent columns.
so if adjacent columns are present the "correct" column width is maintained
df[c(
I need to plot a number of bar charts as part of a shiny app.
I am using ploty ly
x and y values are both numeric x being consecutive integer values.
there are often missing values in the data I wish to plot - each plot needs
to have a fixed x range.
When there are more than a few missing valu
mport(raster)
>
> or
>
> importFrom("raster", "levels")
>
> in the package NAMESPACE would help.
>
> Cheers,
>
> Marcelino
>
> El 31/10/2020 a las 13:24, nevil amos escribió:
> > Apologies, I cannot see how to make a rero for this issu
bject from 'namespace:raster'
I have also tried just using levels(r) and putting raster as a depends
rather than an import in the DESCRIPTION file for the package, this does
not solve the error.
Any suggestions on how to overcome the problem?
many thanks
Nevil Amos
n?
FM[,grep("one",colnames(FM))]
FM[,c(grep("one",colnames(FM)),grep("three",colnames(FM)))]
many thanks for any suggestions
Nevil Amos
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list --
trying to sync are under the s3 prefix FAME_FMR which is
the only top level "directory" in the bucket
Have I missed a setting?
If not any suggestions on this error?
thanks
Nevil Amos
library(aws.s3)
Sys.setenv("AWS_ACCESS_KEY_ID" = "x",
I would like to change the default directory within which all disk frames
are saved to a directory on an SSD, which is not the drive there the r
tempdir is located. for example instead of saving all disk.frames in
tempdir the are all saved in ./media/SSDdrive/DF?
Thanks
[[alternative H
e(M[,4])
MOut<-cbind(MOut,j)
colnames(Mout)<-c("x","y","z","j")
}))
On Wed, 1 Apr 2020 at 13:42, nevil amos wrote:
> Well,
> I found a way to do it partly using rep(), and one loop that makes it 10x
> or more faster however would still be
rep(1:nrow(M), times = M[,4]), ]
for(i in M[,4])(j<-c(j,1:i))
MOut<-cbind(MOut,j)
colnames(Mout)<-c("x","y","z","j")
}))
On Wed, 1 Apr 2020 at 12:18, nevil amos wrote:
> Hi
>
> I can achieve this using two for loops but it is slow I ne
his is very slow ( example below)
#How do I acheive this quickly without loops?
Mout<-NULL
for(i in 1:nrow(M)){
a=M[i,c("x","y","z")]
for (j in 1:M[i,"k"]){
b=c(a,j)
Mout<-rbind(Mout,b)
}
}
colnames(Mout)[4]<-"j"
print(Mout)
I wish to create tiled version of a large number of custom rasters for
viewing in shiny/leaflet apps ( to speed viewing of rasters)
I have produced tiles using package tiler, these can be viewed in the
preview.html, but when uploaded to github pages as described in the
introduction to tiler they
t;)
substring(mystrings, regexpr("\\(|\\)", mystrings))
#this returns the whole string if there are no brackets.
[1] "ABC" "(B)C" "(C)"
# my desired desired output:
#[1] "" "(B)" "(C)"
many thanks for any suggestions
Nevil Amos
I have loaded the profvis library but the function parse_ rprof() is
absent.
below is the session info show the absence of the function ( which is
listed in the package help for the current version.)
Documentation for package ‘profvis’ version 0.3.5
DESCRIPTION file.
Help Pages
parse_rprof P
I would like to select polygons from an existing spatial polygon data set
interactively in a shiny leaflet map.
The process is straightforward in leaflet/ mapedit, however I need to
include the procedure in a shiny app map interface. I cannot work out how
to incorporate the selectMap() in the shiny
there is a problem with the input
or output file name, but I cannot determine which file it refers to.
cheers
Nevil Amos
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see
https://stat.ethz.
Apoligies. did not read help properly it states:
"Among other functions, it does _not_ work with ... (dis)aggregate"
On Mon, Apr 20, 2015 at 4:54 PM, nevil amos wrote:
> I am getting the above error with clusterR and aggregate:
>
> works fine without parralell:
>
> li
I am getting the above error with clusterR and aggregate:
works fine without parralell:
library(raster)
r<-raster(matrix(data = sample(c(1:10,NA),1,replace=T),100,100),xmn=0,
xmx=1000,ymn=0,ymx=1000)
beginCluster()
Parr_agg<-clusterR(r,fun=aggregate,args=list(fact=3,fun=modal,expand=TRUE,na.
Hi,
I need to run multiple iterations of a script to which I am supplying a
single numeric argument
I can open the command prompt window and enter a single command:
"C:\Program Files\R\R-3.1.0\bin\x64\Rscript.exe" myScript.R.R 18
and it runs OK and saves the outputs.
Similarly if I run the same
I wish to return " True" in a matrix for only the first match of a value
per row where the value equals that in a vector with the same number of
values as rosw in the matrix
eg:
A<-matrix(c(2,3,2,1,1,2,NA,NA,NA,5,1,0,5,5,5),5,3)
B<-c(2,1,NA,1,5)
desired result:
[,1] [,2] [,3]
[1,] TRUE FA
Thanks
this does it:
script.name <- basename(sys.frame(1)$ofile)
On Tue, Aug 27, 2013 at 4:07 PM, Henrik Bengtsson wrote:
> See findSourceTraceback() of R.utils. /Henrik
>
> On Mon, Aug 26, 2013 at 10:58 PM, peter dalgaard wrote:
> >
> > On Aug 27, 2013, at
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
I want to print a vector of strings to the console formatted as if it were
input
X<-c("a","b","c")
> X
[1] "a" "b" "c"
what I would like to get is
the.function(X)
>"a","b",&
you should be able to use
> options( java.parameters = "-Xmx4g" )
> unless you love multiplying by 1024 :)
>
>
>
>
>
> On Tue, Jun 11, 2013 at 3:21 AM, nevil amos wrote:
>
>> I am using some r scripts to reformat a large data set that needs to be
>>
I am using some r scripts to reformat a large data set that needs to be
saved into xls format.
I am getting the Out of Memory Error (Java) despite having set a large
memory in the first line of the script ( on opening R and before loading
any libraries)
I am using R version 2.15.2 (2012-10-2
vent NA c=values being sorted to last - I need to retain values
in position.
thanks
Nevil Amos
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting gu
%
0.1396906 0.001 1.000 0.001 0.1005011 0.1805416
many thanks
Nevil Amos
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide
0.001 1.000 0.001 0.1005011 0.1805416
What is the default for pboot?
this does not appear to be dealt with in help for mantel
On Thu, Jun 28, 2012 at 8:35 PM, Sarah Goslee wrote:
> You can set it using the pboot argument.
>
> Sarah
>
>
> On Thursday, June 28, 2
What is the size of the boostrapped subsample in ecodist mantel()
thanks
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-proje
correlated variables in the model selection process?
--
Nevil Amos
Molecular Ecology Research Group
Australian Centre for Biodiversity
Monash University
CLAYTON VIC 3800
Australia
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing
You either need to rethink what you want to do or clarify your statement of
>> it.
>>
>> -- Bert
>>
>> On Sun, May 20, 2012 at 7:17 AM, Nevil Amos wrote:
>>> I have some square matrices with na values in corresponding rows and
>>> columns.
>>&g
what I want.
thanks
--
Nevil Amos
Molecular Ecology Research Group
Australian Centre for Biodiversity
Monash University
CLAYTON VIC 3800
Australia
[[alternative HTML version deleted]]
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailma
; is an unrecognized escape in character string starting "\$"
> sub(\$,"","ABC$DEF")
Error: unexpected input in "sub(\"
Thanks
--
Nevil Amos
Molecular Ecology Research Group
Australian Centre for Biodiversity
Monash University
CLAYTON VIC 3800
Australia
d in the final model?
thanks
Nevil Amos
> myOrdistepBoth
Call: rda(formula = mygenind@tab ~ mds3dCS_NULL + mds3dTRE_25_2_CS25 +
mydata$LAT.x + mydata$Hab_Config + mds3dTRE_25_100_CS25 + mydata$TreeCov +
mydata$Site_No + mds3dSFW_EO_100_CS25 + mds3dSFW_EO_5000_CS25 +
mydata$Landscape + mds3d
3 3.658 1.4785 99 0.01 **
> Residual 139 114.644
Is this possible? what is the syntax?
I have looked at str(myAnova) but cannot see how to get the table with variable
names included
Many thanks
Nevil Amos
_
us",X)
[1] "plusone + two"
> X<-"one ~ two"
it seems to work fine with other characters:
> sub("~","plus",X)
[1] "one plus two"
How do I enable "+" to be recognised as a normal character?
thanks
Nevil Amos
I might expect hours to days.
Have I got a setting wrong somewhere?
D.Jost(filename=spp,object=T,format.table=T)
many thanks
Nevil Amos
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
(eval(expr, pf)) at #55
2: evalVis(expr) at #55
1: capture.output(ordistep(myrda0, scope = formula(myrda1), direction = "both",
Pin = 0.05, Pout = 0.1)) at #55
Cheers
Nevil Amos
>
> Nevil Amos monash.edu> writes:
>
>>
>> I am getting the following erro
PC3 PC4 PC5 PC6 PC7 PC8
0.16008 0.14733 0.12183 0.09054 0.07380 0.06971 0.05578 0.04215
(Showed only 8 of all 29 unconstrained eigenvalues)
--
Nevil Amos
Molecular Ecology Research Group
Australian Centre for Biodiversity
Monash University
CLAYTON VIC 3800
Austr
there are several pcnm's in the rhs of the
formula.
thanks for any pointers that may allow me to track down the cause of the error.
Nevil Amos
Error in if (aod[1, 5] <= Pin) { : missing value where TRUE/FALSE needed
In addition: There were 50 or more warnings (use warnings() to see the
eturning a "matrix is not square error.
is it possible to perform this test in ecodist?
many thanks
Nevil Amos
> library(ecodist)
> library(ncf)
> x<-sample(1:1000,20)
> y<-sample(1:1000,20)
> z<-sample(1:1000,20)
> M1<-as.matrix( distance(x))
> M2 <-a
12,] 86.711262108 -0.334465576 0.001 -0.35500933 -0.309763543
[13,] 94.251371 43 -0.238965642 0.001 -0.26437371 -0.196038662
$resids
[1] NA
attr(,"class")
[1] "mgram"
Thanks
Nevil Amos
__
R-help@r-project.org mailing list
htt
aste(expression(R^2),"=",round(summary(mylm)$r.squared,3)),3)
thanks
Nevil Amos
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and pro
aste(expression(R^2),"=",round(summary(mylm)$r.squared,3)),3)
thanks
Nevil Amos
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and pro
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="
I am getting the following error:
Error in lm.fit(x, y, offset = offset, singular.ok = singular.ok, ...) :
0 (non-NA) cases
when running the command
scatterplotMatrix(~THL+WL+BD+TL+Mass|SEX_,by.group=TRUE,plot.points=T,smooth=F,main=spp,)
it works fine without the "by group" option
I assume
I am plotting a number of lines on a standard plot. I would like to add
labels at the end (rhs) of each line. is there a way to do this other
than defining the individual xy coordinates and placing each label using
text()
Thanks
Nevil Amos
__
R
How do I assemble ad data fame, consisting of columns form other data
frames identified in a loop? cbind is not working as the initial data
fame has 0 columns and rows.
> ModList<-dir("./MODEL_DISTS/")
> ModList<-ModList[grep(pattern="3COLUMNS",ModList)]
> ALL_MODELS<-data.frame()
> for (i in
(id1 = c(NA, "a", "d", "c"), y=c(101, 102, 103, 104))
merge(x, y)
id x y
1 a 1 102
2 b 2 101
3 c 3 104
4 d 4 103
Sarah
On Tue, Jan 4, 2011 at 8:31 AM, Nevil Amos wrote:
How do I keep the linking column[s] in a merge()?
How do I keep the linking column[s] in a merge()?
I need to use the values again in a further merge.
thanks
Nevil Amos
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R
How do I change the postion of the legend in s.value {ade4} from the
defaul , bootom left?
thanks
Nevil Amos
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org
I am using r to read and reformat data that is then saved to a text file
using sink(), the file has a number of initial lines of comments and
summary data followed by print of a data.frame with no row names.
for example
a<-c(100:120)
b<-c(rnorm(100:120))
c<-c(rnorm(200:220))
mydata<-data.frame(
st(c("A","B","C","D","A","B","C","D"),c("A","B","C","D","A","B","C","D")))
for (r in 1:nrow(N)){
for (c in 1:(ncol(N))){
N[r,c]=M[rownames(N)[
such components of all objects. at the
moment I would like to be able to extract the variance, p value etc for
a capscle to tabulate the automatically but would also like to know if
the re is a simple way to establish the way to refer to all individual
sub parts of a object?
thanks
Nevil
below.
library(vegan)
mydist<- matrix(1:25, 5, 5)
mydata<-matrix(rnorm(1:25),5,5)
mydata[3,1]<-NA
mydata<-data.frame(mydata)
capscale(mydist~X1+X2+Condition(X3),data=mydata,na.action = na.omit)
Thanks
Nevil Amos
__
R-help@r-project.org mailin
doing this with icc{irr} or using an anova approach,
but I am unclear how to acheive this given that there is a nested
structure- the value varies between wavelengths within individuals.
Many thanks
Nevil Amos
data is structured thus:
> ANWC_NO Wavelength Repeatvalue
> 1
I am using cascaple() in vegan, is it permissible to have more than
one conditioning variable thus
capscale(DIST~varaible1+variable2+Conditon(varaible3+variable4),
data=mydata)
many thanks
Nevil Amos
__
R-help@r-project.org mailing list
https
On 22/09/2010 1:34 AM, Jari Oksanen wrote:
On 21/09/10 17:40 PM, "Nevil Amos" wrote:
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 distanc
& Anderson 1999)") and
whether this test is indeed equivalent to the approach suggested by
Legendre &Fortin, (Geffen et al used DISTLM).
many thanks
Nevil Amos
ACB
Monash University
references
(Geffen, E., M. J. Anderson, et al. (2004). "Climate and habitat
barriers to dis
39" "300" "0.012529"
row "39239" "300" "0.005632"
row "39239" "302" "0.004924"
> mean(y$VALUE)
Error in y$VALUE : $ operator is invalid for atomic vectors
how do I get the data arranged in three
lattidudes are south ie negative)
Many thanks
Nevil Amos
Monash University
LONGLAT is a headerless two column file of longitude and latitude
such as
141 -32
142 -35
136 -20
## load packages
require(mapproj)
require(maps)
## read raw data
coord.lonlat <- LONGLAT
## convert (Lon,Lat) coordina
OK I see how to remove the line numbers[1] etc by using cat instead of
print, but cannot work out how to remove the column names from the data
frame output
On 13/06/2010 4:21 PM, Nevil Amos wrote:
I want to output a text file assembeld from various soruces within r (
actually as a genepop
col2 col3
C 566
what I would like in test.txt is:
"I will be including text of various sorts in this file so cannot use
print table or similar command"
col1
col2
col3
a 234
B 44
C 566
Many thanks
Nevil Amos
__
R-help@r-project.o
How do I get a list of subdirectories only, not files, in a directory
dir.create("test")
setwd("test")
dir.create("adir")
dir.create("bdir")
file.create("afile")
dir()
returns [1] "adir" "afile&
Is it possible to print page numbers in pdf() with multiple pages?
thanks
Nevil Amos
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and
I am getting the above warning following loading of Geneland 3.1.5 on
unix , while a simple plot sends output to the pdf file ( see attached
code) no output results from Geneland functions, resulting in empty pdf
files
> library (Geneland)
Loading required package: RandomFields
Loading requir
the console packages menu, this does
not work wither with the downlaoded tar.gz, or if I unzip it and save
all its contents as Genland_3.1.5.zip in the R/bin direcotry.
What do I need to do?
thanks
Nevil Amos
__
R-help@r-project.org mailing list
ht
I am receiving the above error ( full r session output below) the
script runs OK in windows. and "genotypes" and "ploidy" are both
correct arguments
any suggestions would be most welcome
Nevil Amos
MERG/ACB
Monash University School of Biological Sciences
> li
need the output file without the quotes but retaining 000 not
reducing it to 0
thus
77 79 132 132 000 000
179 181 132 132 150 150
179 179 132 132 000 000
179 179 132 134 150 152
How might I achieve this?
Thanks
Nevil Amos
__
R-help@r-project.or
at2 <- as.matrix(dat) # conver to matrix
y <- which(is.na(dat)==TRUE) # get index of NA values
dat2[y] <- "000/000" # replace all na values
with "000/000"
Muhammad
Nevil Amos wrote:
I need to replace occurrenc
I need to replace occurrences in multiple columns in a data.frame
with "000/000"
how do I achieve this?
Thanks
Nevil Amos
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting
The file is a large number of scatterplot matrices (120pp of 4x4
matrix) the individual plots may have up to several hudred points.
I am already using the "useDingbats" but the files are still very large
- I can reduce them about 50% in cute.pdf by changing the dpi setting
but it would be go
is there a way to reduce the size of pdf files in R: ?
compression?
lower dpi ?
or some other option?
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-
ab=group,ylab=response)
}
}
detach(data.sp)
}
On 29/04/2010 7:05 PM, Paul Hiemstra wrote:
Nevil Amos wrote:
I am trying to create a heap of boxplots, by looping though a series
of factors and variables in a large data.frame suing paste to
constrcut the facto and response names from the colnam
I am trying to create a heap of boxplots, by looping though a series of
factors and variables in a large data.frame suing paste to constrcut the
facto and response names from the colnames
I thought I could do this using get()
however it is not working what am I doing wrong?
thanks
Nevil Amos
79 matches
Mail list logo