Dear all,
I have to make a last minute map...my thesis is due in a few days and our
GIS lady fell ill, so my supervisor asked me to try in R., but I am a
beginner. I've searched online, but have not found something at the global
scale.
I have a global dataset of dependent values (eg. rate of comm
Hello,
If you can, you probably should upgrade for R version 3.0.1.
Regards,
Pascal
2013/8/27 Peter Maclean
> I would like to store a big spatial weight matrix in R memory to do more
> calculation. I know there are memory issue for 32 bit computer and I have
> tried increasing the memory to
See findSourceTraceback() of R.utils. /Henrik
On Mon, Aug 26, 2013 at 10:58 PM, peter dalgaard wrote:
>
> On Aug 27, 2013, at 07:12 , nevil amos wrote:
>
>> Is there a fuction that will allow me to retrun the filename for a script
>> from within that script.
>
> Not a standard one, but you shou
On Aug 27, 2013, at 07:12 , nevil amos wrote:
> Is there a fuction that will allow me to retrun the filename for a script
> from within that script.
Not a standard one, but you should be able to get at it via a bit of breaking
and entering: sys.status() and friends (sys.calls, sys.frames) give
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
I would like to store a big spatial weight matrix in R memory to do more
calculation. I know there are memory issue for 32 bit computer and I have tried
increasing the memory to maximum without success. I am using R version 2.15.2
and window vista. The data has about 15,000 observations and I wo
hi all -- i'm running into a strange problem that i can't seem to
easily get around, but i'm probably just missing something obvious.
i have a model to which some data is fit using glm with no intercept
term (using my data variables "x" and "y" and a specific link function
"mylink"):
Thanks to Aleksey Vorona and Duncan Murdoch, this bug is now fixed in R-devel!
Mathieu.
Le 08/01/2013 01:47 PM, William Dunlap a écrit :
You could report it as a bug at
https://bugs.r-project.org/bugzilla3/
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
-Original Message
Hi,
Hope this is what you meant..
with(dat1,mean(V21[(V2==1|V2==0) & V24<25],na.rm=TRUE))
#[1] 2.8125
sapply(0:1,function(i) with(dat1,mean(V21[V2==i & V24<25],na.rm=TRUE)))
#[1] 2.75 3.00
". who are in condition 1 or 0 (V2) and then vice
versa ..."
dat1[,21]
# [1] NA 3.40 3.00 3
Hello,
That is why I changed 2 lines in the code. Because points are misplaced if
you keep points with the lines.
Regards,
Pascal
2013/8/27 Igor Ribeiro
> Because I'm already controlling points using points function. So I don't
> want labcurve to change anything on the lines... Just draw the
Hi R.L.
No problem.
Try this:
#slightly modified the example:
set.seed(24)
dat1<-
as.data.frame(matrix(sample(c(1:10,Inf,-Inf),2000*3,replace=TRUE),ncol=3))
lst1<-split(dat1,((seq_len(nrow(dat1))-1)%/%69)+1)
lst2<-lapply(lst1,function(x) {colnames(x)<-letters[1:3];x})
lst3<-lapply(lst2,funct
Hi,
Your attachment didn't came through..
Using the same example, that I used before:
set.seed(549)
dat1<- data.frame(t.tr=sample(c(paste("Pst", c(24, 48, 72)), paste("Pto",
c(24, 48, 72)), paste ("Pm", c(24, 48, 72))), 50, replace=TRUE), signal2 =
sample(600:700, 50, replace=TRUE))
dat2<- data
Because I'm already controlling points using points function. So I don't
want labcurve to change anything on the lines... Just draw the legend the
way I need.
On Aug 26, 2013 8:35 PM, "Pascal Oettli" wrote:
> Hello,
>
> Please keep the r-list included when you reply.
>
> Why do you want to add po
Hello,
Please keep the r-list included when you reply.
Why do you want to add points to lines only in the legend? If so, the
legend would be incorrect.
Regards,
Pascal
2013/8/26 Igor Ribeiro
> Hi Pascal,
> Thank you very much - your solution works partially - it will include the
> pch in the
Your question prompts more questions than answers. Not sure what "imported from
notepad" means (clipboard? delimited how?). Don't know what you obtained in R
(what does the str function tell you? What about dput(head(yourdata)))? You
really need to tell us what R code you executed and data you
Hi ,
I just imported a large data set from notepad. I want to label the columns
in R.
I used 'import Dataset' to bring in my data set
Now, I would like to label V1,V2,V3 etc??
Thanks
--
View this message in context:
http://r.789695.n4.nabble.com/Naming-columns-tp4674595.html
Sent from the R
Thanks a lot. That works great.
I have another question, I will send you another email.
Best,Farnoosh Sheikhi
Cc: R help
Sent: Monday, August 26, 2013 12:06 PM
Subject: Re: Loop for converting character columns to Numeric
Hi,
Suppose you created a datafr
How do you extend factor() without abstract data types?
The idea is to have
factor (x, TYPE)
to transform all or selected components of x to factor TYPE.
Value:
a data structure of same type as x, with factor-like components
transformed to be like TYPE.
In the Pascal family, you would
Hi,
I am new to R, and am trying to use the "SimpleR" manual. The manual is
excellent. However, when I try to install the SimpleR package with R version
3.x.x, I get errors. The manual says that the package is good with R versions
1.5.0 and above. So:
1) Is there an updated package for Sim
Hi David
Thanks for your help.
I tried it for a simplified example with vectors instead of matrices.
Once again the formula:
C = (Σ(from i=0 to i) A^i ) x B x (Σ(from i=0 to i) A^i )’
I applied it at follows – but couldn’t figure out what’s missing:
library(expm)
i <- c(0,1,2,3,4,5,6,7,8,9,10)
Hi all,
Does anyone know how to export an excell spreedsheet into notepad in R
format as a linear vector as opposed to columns? I.e. 2,3,4,5,6,7 etc.
Thanks,
Mary
--
View this message in context:
http://r.789695.n4.nabble.com/Pasting-excell-spreedsheet-into-notepad-for-R-tp4674568.html
Sent
Match worker perfectly. Thanks for the help!
Michael Fethe
On Aug 26, 2013, at 11:10 AM, "arun" wrote:
> Hi,
>
> You could try:
> set.seed(549)
> dat1<- data.frame(t.tr=sample(c(paste("Pst", c(24, 48, 72)), paste("Pto",
> c(24, 48, 72)), paste ("Pm", c(24, 48, 72))), 50, replace=TRUE), sign
OK, thanks:) Maybe for my purpose a visible evaluation is also fine. But in
general I imagine it to happen quite often that in ecological data, people
have e.g. more species than sites.
--
View this message in context:
http://r.789695.n4.nabble.com/detect-multivariate-outliers-with-aq-plot-mvo
Thank you all for your suggestions. However, Dennis since your method seemed
the easiest. I gave it a shot with no success while it produces NAs. The R
inferno is not helpful for this part of my data normalization. I need to apply
this to my whole data.frame before I perform statistical tests (
Thank you let me try my luck,
Sudheer
On Monday, August 26, 2013, Jim Lemon wrote:
> On 08/26/2013 12:35 PM, Sudheer Joseph wrote:
>
>> Hi,
>> I am trying to load a daily time series as a r time series
>> object in the script at below link using the data at second link. I tried
>> s
Hi,
As we are in thinking of installing and using R as a data analysis
software on our machines, we have few questions before going ahead with
the installation. Please find below the questions:
1) Does R allow data to be sent out or processed out of the organization
network (e.g. ability to
Hi Noah
I have modified to give you an idea of panel widths. Also for factors
you must have the same factors for all panels although not all will
have the full complement.
I usually do this by hand as latticeExtra does not do exactly what i want.
library(lattice)
library(latticeExtra)
tab <-
s
Hi
better approach is to use match. Let have some lookup table called test
> test
onetwo
1 Pst 24 -17.29
2 Pst 48 -43.93
3 Pto 24 -29.39
and original data called big
> big<-data.frame(one=sample(test$one, 20, replace=TRUE), two=100)
> big
one two
1 Pto 24 100
2 Pst 48 100
3 Ps
On Aug 26, 2013, at 11:59 AM, Sebastian Hersberger wrote:
Hi David
Thanks for your help.
I tried it for a simplified example with vectors instead of matrices.
Once again the formula:
C = (Σ(from i=0 to i) A^i ) x B x (Σ(from i=0 to i) A^i )’
I applied it at follows – but couldn’t figure out
>
> Two years ago, as shown in the script at the end, I created shortestpaths
> using Igraph, then using Melt in Reshape2 I converted the the resulting
> matrix into
> three column vectors - "vertex1", "vertex2", "shortestpath". It worked
> then.
> However, in the meantime I have installed new v
On 08/26/2013 11:44 PM, Michael Friendly wrote:
...
Thanks for trying again, but that doesn't work either with a by=
variable. Note that your function is recursive, and also k=k
should be passed in the else{ ... lags() }.
Hi Michael,
You are correct about the k=, and I had used a separate objec
I don't fully understand what you are looking for, but you may want to
check out ?predict, ?predict.lm
On Sat, Aug 24, 2013 at 7:43 AM, alR wrote:
> I have fitted a multiple regression model to the row of a matrix using lm:
>
> ft<-lm(datos[i, ]-r1 + r2+ r3 + r4,keep.data = TRUE,model=TRUE)
>
>
On Mon, 26 Aug 2013, Charles Determan Jr wrote:
Greetings,
I am familiar with the function cite('packageName') which provides the
output generated from the DESCRIPTION file.
...unless the package provides a CITATION file. Then, citation('pkg')
shows the content of the CITATION. citation('pk
Thank you for your reply Stephan,
I like to be very thorough and make sure all names are attributed so in the
case that I check the url of a package and it lists contributing authors
that aren't provided with citation() would it be appropriate to cite it
like this:
Smith, J. [pr] and Johnson, J.
Hi,
it usually is a good idea to look at the output of citation() (which,
however, also often is auto-generated) or at the authors listed in
package vignettes.
And thanks for citing R package authors. When I review papers, I often
have to remind authors of this...
Best
Stephan
On 26.08.20
Greetings,
I am familiar with the function cite('packageName') which provides the
output generated from the DESCRIPTION file. In most cases this is
sufficient but I was wondering if there are contributing authors (in
addition to the primary) also listed on the CRAN page. Is there a proper
way to
Hi,
Suppose you created a dataframe like this:
set.seed(28)
dat1<-as.data.frame(simplify2array(list(letters[1:5],sample(1:20,5,replace=TRUE),6:10)),stringsAsFactors=FALSE)
str(dat1)
#'data.frame': 5 obs. of 3 variables:
# $ V1: chr "a" "b" "c" "d" ...
# $ V2: chr "1" "2" "10" "18" ...
#
Dear all,
I am calculating the bivariate skew normal cdf in "sn" package using "pmsn"
function.
Although it is quite convenient ( thanks to prof. Azzalini) but it seems to be
slow.
For example, it takes about 1 minute in calculation of 100k of such cdf values.
I am thinking to write a c++ code fo
Hi,
May be this helps:
dat1<- as.data.frame(matrix(1:30,6,5))
lapply(seq_len(ncol(dat1)),function(i) dat1[,i])
[[1]]
[1] 1 2 3 4 5 6
[[2]]
[1] 7 8 9 10 11 12
[[3]]
[1] 13 14 15 16 17 18
[[4]]
[1] 19 20 21 22 23 24
[[5]]
[1] 25 26 27 28 29 30
#from excel dataset (the same data)
library(X
Here is a way of getting the percents (and total if you want it):
a=as.factor(sample(1:3,10,replace=T))
# use 'barplot' since it return x-values for putting labels on bars
aTable <- table(a) # count the factors
xPos <- barplot(aTable)
# put percent at top bar
text(xPos, aTable, sprintf("%.0f%%",
Hi Jean,
I would like to give a histogram for a categorical variable, with
x-axis be different levels, and a number of percentage showed on top
of each bar.
Thanks.
Best wishes,
Jie
On Mon, Aug 26, 2013 at 12:43 PM, Adams, Jean wrote:
> Jie,
>
> I'm not exactly sure what you're after. Perhaps
Jie,
I'm not exactly sure what you're after. Perhaps this will help you get
started.
count <- table(a)
prop <- count/length(a)
b <- plot(a)
text(b, count, prop, pos=1)
Jean
On Mon, Aug 26, 2013 at 11:27 AM, Jie wrote:
> Dear All,
>
> Suppose I have a categorical variable
> a=as.factor(sampl
Here's one way to do it ...
# create example data frame
y <- rnorm(30)
gene_subset <- data.frame(y, x1=rnorm(30), x2=rnorm(30), x3=100*y+rnorm(30))
# fit a full linear model
fit <- lm(y ~ ., df)
# reduce the model
reduced_model <- stepAIC(fit, trace=FALSE)
# NON-omitted variables (excluding the
Dear All,
Suppose I have a categorical variable
a=as.factor(sample(1:3,10,replace=T))
plot(a) and hist(as.numeric(a),freq=F) would give the histogram of it.
But I do not know how to add the counts or percentage information for
plot.factor().
hist() can do it but as a numeric variable, the x-axis
I deal with non-daylight-savings time data all the time using Windows with its
system time set to daylight time. Sys.setenv(TZ="Etc/GMT+4") sets the zone for
the R process only and does not affect the system time settings. Using this
method lets me handle data from all around the world, with or
Hi,
You could try:
set.seed(549)
dat1<- data.frame(t.tr=sample(c(paste("Pst", c(24, 48, 72)), paste("Pto",
c(24, 48, 72)), paste ("Pm", c(24, 48, 72))), 50, replace=TRUE), signal2 =
sample(600:700, 50, replace=TRUE))
dat2<- data.frame(t.tr=c(paste("Pst", c(24, 48, 72)), paste("Pto", c(24, 48,
Hi R.L.,
No problem.
You may try:
set.seed(24)
dat1<- as.data.frame(matrix(sample(1:10,2000*3,replace=TRUE),ncol=3))
lst1<-split(dat1,((seq_len(nrow(dat1))-1)%/%69)+1)
lst2<-lapply(lst1,function(x) {colnames(x)<-letters[1:3];x})
res<-lapply(lst2,function(x) {x$z<-with(x,(a-b)/c);x})
head(res
Silvano,
I am a little confused as to what you are looking for. Do you want each
group to have approximately the same mean and variance? Randomly assigning
groups should be sufficient for the means and variances to be somewhat
similar. I'm not sure what your goal would be to randomly split your
Suggestion:
Don't do the ifelse stuff below.
See ?switch instead.
-- Bert
On Sun, Aug 25, 2013 at 11:32 PM, arun wrote:
> HI,
>
> It may be better to provide an example dataset using ?dput().
> dput(head(dataset),20)
>
> Try:
> signal3<- ifelse(t.tr=="Pst 24", signal2-17.29, ifelse(t.tr=="Pst
Hi,
Also, you could also try:
vec1<-rep(yrmon[,1],each=(ncol(yrmon)-1))
vec2<-as.vector(t(yrmon[,-1]))
vec3<- rep(1:12,nrow(yrmon))
res2<-data.frame(year=vec1,Month=vec3,Values=vec2)
row.names(res1)<- row.names(res2)
attr(res1,"row.names")<- attr(res2,"row.names")
identical(res1,res2)
#[1] TRUE
On 8/25/2013 8:12 PM, Jim Lemon wrote:
lags <- function(x, k=1, prefix='lag', by) {
if(missing(by)) {
n <- length(x)
res <- data.frame(lag0=x)
for (i in 1:k) {
res <- cbind(res, c(rep(NA, i), x[1:(n-i)]))
}
colnames(res) <- paste0(prefix, 0:k)
}
else {
for(levl in lev
HI,
You could also try:
res<-reshape(yrmon,varying=!grepl("year",colnames(yrmon)),v.names="Values",timevar="Month",direction="long")[,-4]
res1<- res[order(res$year,res$Month),]
head(res1)
# year Month Values
#1.1 1901 1 -0.2557446
#1.2 1901 2 -0.2318646
#1.3 1901 3 -0.1961822
#1
Hi Ben,
This question apparently has nothing to do with R and is therefore
off-topic for this list. You should post this question on a statistics
forum, or seek local help.
Best,
Ista
On Mon, Aug 26, 2013 at 1:50 AM, Ben Harrison
wrote:
> Hello, I am quite a novice when it comes to predictive
Catalin,
first, keep the communication on the list, so it gets documented also for
others.
Second, my code does work for an example I made up myself, but if you
don't "provide commented, minimal, self-contained, reproducible code" (as
the posting guide asks you to; see last line of this e-ma
Have a look at the packages reshape and reshape2
They were written with this type of problems in mind.
On Aug 26, 2013, at 1:04 PM, catalin roibu wrote:
> Dear all!
>
> I have a data frame composed by 13 columns (year, and 12 months). I want to
> transform this data base in another like this
>
Dear All,
Sorry to bother you again. As my previous mail was messy to understand,
please find it again to give me a solution. I'd like to do a partial
correaltion test ['pcor.test ()' or 'parcor()'] between Irid.area and
Casa.PC1 variables controlling the influence of SL (co-variate) according
to
On 08/26/2013 09:04 PM, catalin roibu wrote:
Dear all!
I have a data frame composed by 13 columns (year, and 12 months). I want to
transform this data base in another like this
year month values
1901 1
1901 2
1901 3
.
1901 12
1902 1
1902 2
1902 12
Is there a possibility to succeed t
Hello, Catalin,
assume your data frame is as simple as
A <- data.frame( year = , month01 = , ,
+ month12 = )
then, e.g.,
reshape( A, varying = c( "month01", , "month12"),
+ v.names = "Values", timevar = "Month", direction = "long")
should do what you want
On 08/26/2013 12:35 PM, Sudheer Joseph wrote:
Hi,
I am trying to load a daily time series as a r time series
object in the script at below link using the data at second link. I tried
setting the frequency as 365, but the data is not getting loaded with
correct number of samples whic
Dear all!
I have a data frame composed by 13 columns (year, and 12 months). I want to
transform this data base in another like this
year month values
1901 1
1901 2
1901 3
.
1901 12
1902 1
1902 2
1902 12
Is there a possibility to succeed that in R?
Thank you!
best regards!
CR
--
--
Dear R-list,
l have been working on a translation of a matlab library into R, it took me
a while but I am almost there to submit it to CRAN...however, for this
library to be computationally competitive I need to solve an issue with the
home-made R version of the spdiags.m function (an old issue co
You've misplaced the comma.
mysample <- df[, sample(ncol(df), 50, replace=FALSE)]
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie & Kwaliteitszorg / team Biometrics & Quality Assurance
Kliniekstraat 25
1070 Anderlecht
Belgium
Dear all!
I want to arbitrary subset a data frame by variables.
I try this code, but the subset work only for rows, but I want to subset by
variables.
# sample without replacement
mysample <- df[sample(1:ncol(df), 50,
replace=FALSE),]
Please help me to solve this probl
Thank you.
with best regards,
Sudheer
On Mon, Aug 26, 2013 at 4:36 AM, Jim Lemon wrote:
> On 08/26/2013 01:09 AM, Sudheer Joseph wrote:
>
>> Attached is a plot with a time series. If I have a time series object in
>> R.
>> How do I get the plot in the attached format of time axis?. When I issue
Thank you Jim,
I was trying few options but was not able to get
it done.
Thanks a lot.
with best regards,
Sudheer
On Mon, Aug 26, 2013 at 3:40 AM, jim holtman wrote:
> Forgot the year on the plot:
>
>
> n <- 100
> x <- data.frame(time = seq(from = as.Date('2010-1-1')
Hi,
I am trying to load a daily time series as a r time series
object in the script at below link using the data at second link. I tried
setting the frequency as 365, but the data is not getting loaded with
correct number of samples which is 2192. Can any one help me on this how to
set
66 matches
Mail list logo