On Nov 29, 2011, at 2:00 AM, Xu Wang wrote:
Why don't the following two commands work?
eval(parse(text=s))
eval(as.expression(s))
Can you think of anything else we might need to know in order to
answer that question?
--
David Winsemius, MD
West Hartford, CT
___
On Nov 29, 2011, at 1:08 AM, Katrina Bennett wrote:
I'd like to sum a matrix only where the matrix meets a specific
condition.
The matrix has 365 rows and about 50,000 columns.
If you describe the meaning attached to the data if might help readers
understand what the acceptable options mi
Why don't the following two commands work?
eval(parse(text=s))
eval(as.expression(s))
--
View this message in context:
http://r.789695.n4.nabble.com/Transforming-a-string-into-a-command-tp4112183p4118243.html
Sent from the R help mailing list archive at Nabble.com.
_
Inline below...
On Mon, 28 Nov 2011 21:32:21 -0800 (PST), Chris Conner
wrote:
Dear Help-Rs,
I have data similar to the following:
DF <- structure(list(X = 1:22, RESULT = structure(c(2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L), .Label = c("NEG", "
What have you tried so far - can you explain? "fitdistrplus" package is the
default package for fitting distributions.
Regards,
Indrajit
From: rch4
To: r-help@r-project.org
Sent: Tuesday, November 29, 2011 8:39 AM
Subject: [R] Negative exponential fit
We n
I'd like to sum a matrix only where the matrix meets a specific condition.
The matrix has 365 rows and about 50,000 columns.
str(cdem.mat.yr)
num [1:365, 1:41772] -43.5 -48.4 -45.9 -38.4 -32 ...
I'm having trouble replicating this because it is not working out for me,
so I'm unsure I can provide
Hi,
I am new to R. How can I get labels/different colours on the lines in my
xy-plots. I plot "het" against "temp" conditional on "year" and "station".
library(lattice)
MyLines <- function(xi, yi, ...){ #Draws line in the panels while
avoiding spaghetti-plots
I <- order(xi)
panel.lines(xi
On Nov 29, 2011, at 12:32 AM, Chris Conner wrote:
Dear Help-Rs,
I have data similar to the following:
DF <- structure(list(X = 1:22, RESULT = structure(c(2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
This section of the structure has two NEG's for 201109 an
library(reshape2)
# sample data because you didn't provide any
dta <- as.data.frame( matrix( sample( 0:1, 100, replace=TRUE ), ncol=10 ) )
dta <- cbind( IDN=1:10, dta )
# The command you couldn't figure out
meltdta <- melt( dta, "IDN" )
--
Dear Help-Rs,
I have data similar to the following:
DF <- structure(list(X = 1:22, RESULT = structure(c(2L, 2L, 2L, 2L,
2L, 2L, 2L, 2L, 2L, 2L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L,
1L, 1L), .Label = c("NEG", "POS"), class = "factor"), YR_MO = c(201011L,
201012L, 201101L, 201102L, 201103L,
Hi PJ,
Try
# some data
id <- 1:20
m <- matrix(sample(0:1, 200, TRUE), ncol = 10)
colnames(m) <- paste('V', 1:10, sep = "")
d <- data.frame(id, m)
d
# option 1
cbind(rep(d$id, each = ncol(d)-1), matrix(unlist(t(d[,-1])), ncol = 1))
# option 2
cbind(rep(d$id, each = ncol(d) - 1), stack(d[,-1])[,-
I have a logistic regression model with several categorical explanatory
variables and one interaction term (between two binary variables, named
A and B). I know how to calculate the odds ratios for the different
levels of A and B (for A=1, e.g., I need to add the coeff for A to coeff
for A*B, then
We need help
We are doing a project for a statistical class in and we are looking at
world record times in different running events over time. We are trying to
fit the data with a negative exponential but we just cant seem to get a
function that works properly.
we have on our x-axis the date
Hi David and Jim!
Thanks very much for your help, this worked for me.
#generate two matrices that are the same size for elevation and temperature:
t.mean.1.c <- matrix(c(-15, -20, -30, -20, -25, -35, -40, -8, 9, 10),
nrow=10, ncol=15, byrow=F)
cdem <- matrix(c(300, 400, 700, 900, 1000, 250, 200,
Hello R people,
I have a data file with 101 numeric variables: one variable called IDN (the
individual's unique id number, which I need to retain, and which ranges
from 1000 to 1320; some numbers are obviously skipped), and V1 to V100
(each has a value of 0 or 1; these 100 variables represent sequ
David Winsemius writes:
> On Nov 27, 2011, at 1:46 AM, Thomas S. Dye wrote:
>
>> Aloha all,
>>
>> I haven't been able to find how to choose the font used by tikzDevice.
>> My first tries have all been set with a serif font and I'd like to
>> have
>> them use the sans serif font instead. I've loo
On Nov 28, 2011, at 7:06 PM, Emma wrote:
I am making frequency histograms using the histbackback function on
my 2 datasets. However when I try to use the brks function:
foo<-histbackback(log(fie11),
log(fie86),ylim=c(0,9),probability=FALSE,axes=TRUE,ylab=("log10
Parcel Size"),brks=16)
I am making frequency histograms using the histbackback function on my 2
datasets. However when I try to use the brks function:
foo<-histbackback(log(fie11),
log(fie86),ylim=c(0,9),probability=FALSE,axes=TRUE,ylab=("log10 Parcel
Size"),brks=16)
The graphic results in a 'NA' label for the y
Forgot to suggest: if labSt is the 1st column in your file, you could
just add "row.names = 1" to your read.csv call.
On Mon, Nov 28, 2011 at 8:06 PM, Florent D. wrote:
> Unlike a data.frame, a matrix can only hold one type of data. Since
> you have a column of characters ("labSt") in your origin
Unlike a data.frame, a matrix can only hold one type of data. Since
you have a column of characters ("labSt") in your original data,
turning it into a matrix will give you a matrix of characters. You can
check it is the case by asking class(DF.m[1,1]).
So you'll have to remove this labSt column be
Thank you very much. Your advice solved my problem.
--
View this message in context:
http://r.789695.n4.nabble.com/How-to-extract-particular-words-from-various-files-tp4099607p4117333.html
Sent from the R help mailing list archive at Nabble.com.
__
R
http://pngu.mgh.harvard.edu/~purcell/plink/rfunc.shtml
[[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-project.org/posting-gu
Hi All,
I am a beginner in R, and I am planning to learn it by finishing a project.
The simulation involves in multiple criteria. Specifically, it is based on
Graded Response Model according to IRT. Also, it needs to generate multiple
datasets which fit different levels of criteria, like multiple
On Nov 28, 2011, at 4:50 PM, John Kane wrote:
I think your assumption is correct. Have a look at ?par.
It's been a while but I think you need to modify the mai or mar
values. Probably the mar.
If you set ylab ="" in plot and then use title you can work with the
line= parameter:
plot(
I think your assumption is correct. Have a look at ?par.
It's been a while but I think you need to modify the mai or mar values.
Probably the mar.
--- On Mon, 11/28/11, Dan Abner wrote:
> From: Dan Abner
> Subject: [R] 2 Y-AXIS labels on the same (left-hand side) Y-AXIS
> To: r-help@r-pr
Hello everyone,
Is it possible to specify a 2 line y-axis label on the same lef-hand side
y-axis? I am using the \n regular expression, but only the 2nd line appears
(I assume the 1st line is printed off the page...)
plot(PRE_SHB,R1,
main="Figure 1.1: Scatterplot of Residualized
Post Score",
Thanks for the reply.
I just needed some time to test it. I didn't know this kind of plot. I'm
satisfied with it, it's nice.
Thanks.
--
View this message in context:
http://r.789695.n4.nabble.com/Inserting-blank-records-in-a-barplot-tp4089619p4116864.html
Sent from the R help mailing list arch
2011/11/15 jim holtman :
> Part of my problem has to do with getting through the corporate
> firewall to access the other program I have to download to use it. I
> just tried today and this is what I got:
>
>> xls.getshlib()
> Loading required package: tools
> --- xls.getshlib running... ---
> -
I suggest you post this on the R-sig-Geo list rather than here.
-- Bert
On Mon, Nov 28, 2011 at 10:22 AM, alison korte wrote:
> If I want to create a heat map where I have a graphic of a US State with
> county borders, how do I import and work with the graphic image?
> The reason I would like t
On Nov 28, 2011, at 1:22 PM, alison korte wrote:
If I want to create a heat map where I have a graphic of a US State
with county borders, how do I import and work with the graphic image?
The reason I would like to use R is so I can then define color
parameters and quickly produce heat maps t
If I want to create a heat map where I have a graphic of a US State with county
borders, how do I import and work with the graphic image?
The reason I would like to use R is so I can then define color parameters and
quickly produce heat maps that correspond to various data in dataframes.
Thanks
One more thing I probably overlooked:
On Mon, Nov 28, 2011 at 1:24 PM, Steve Lianoglou
wrote:
> Hi John,
>
> Hard to say (for me) what's going on ... is there any errors in any
> relevant logs anywhere?
>
> Also, note that you don't have to write a bash script to run your R
> script .. you can wr
On Nov 28, 2011, at 12:45 PM, Pedro Mardones wrote:
Dear all;
I'm tring to find a way to plot a solid of revolution in R, say
rotating the 3 param logistic function aaround the x-axis. Is there a
way to do it using R?
Doing a quick search on "surface of revolution" brings up among other
h
Hi John,
Hard to say (for me) what's going on ... is there any errors in any
relevant logs anywhere?
Also, note that you don't have to write a bash script to run your R
script .. you can write a script with a shebang like so:
=
#!/usr/bin/env Rscript
## R code here.
I'm having some trouble getting my shell script to work. I've checked out the
Intro to R Manual and a host of other websites, but I still can't get the
script to work when I submit the job to the cluster.
Here is my main R code:
##Load Libraries
##...
## Load Time Data
Args <- commandArgs(traili
Dear all;
I'm tring to find a way to plot a solid of revolution in R, say
rotating the 3 param logistic function aaround the x-axis. Is there a
way to do it using R?
Thanks for any hint
PM
__
R-help@r-project.org mailing list
https://stat.ethz.ch/mail
--- On Mon, 11/28/11, Abdul Wahid Memon wrote:
> From: Abdul Wahid Memon
> Subject: Re: [R] plotting multiple lines on single graph ggplot2
> To: "Ben Bolker"
> Cc: r-h...@stat.math.ethz.ch
> Received: Monday, November 28, 2011, 11:56 AM
> Its very much simple.
>
> Simply, if we do like the
Its very much simple.
Simply, if we do like the following
x<-c(100,200,300,400,500)
y<-c(1.1, 1.2, 1.3, 1.4, 1.5)
a<-c(600, 700, 800, 900, 1000)
b<-(1.5, 1.7, 1.9, 2.1, 2.3)
plot(x,y)
points(a,b)
As you can see the call to points() function will superimpose a new
curve (with some new points on x-
Hi all,
i have a data set cintaining 14 columns and 11 rows. Rows represent single
point and columns represent the parameter measured.
I wiuld like to compare the data to see which are more alike. I used the
cluster analysis, but now i ma wondering if there are some other methods, since
John Kane yahoo.ca> writes:
>
> There are probably lots of better aproaches but this seems to work.
> I just combined the lines into one vector
> and assighed a dummy variable to mark the diffferent lines
>
> ibrary(ggplot2)
> mydata <- data.frame(xrange <- c(100, 200, 300, 400, 500, 600,
>
Does the following do what you want? You often
need to use aperm() to permute the dimensions of
apply()'s output.
> a <- array(2^(0:23), dim=c(2,3,4))
> aperm(apply(a, 1:2, cumsum), c(2,3,1))
, , 1
[,1] [,2] [,3]
[1,]14 16
[2,]28 32
, , 2
[,1] [,2] [,3]
[1,] 65
This is R-help mailing list, not the do-my-work-for-me mailing list. You need
to specify what you expect it to do and where it is going wrong, because wading
through a lot of code on a wild goose chase is a waste of anyone else's time.
There are probably lots of better aproaches but this seems to work. I just
combined the lines into one vector and assighed a dummy variable to mark the
diffferent lines
ibrary(ggplot2)
mydata <- data.frame(xrange <- c(100, 200, 300, 400, 500, 600,
700, 800, 900, 1000),
yrange =
You need to (re) read the posting guide if you want help. Your sample code is
not reproducible. You should also benefit from reading the help file (?da.norm)
or reading the source code for the function. I have never used this function,
but the documentation doesn't lead me to believe that your a
On Nov 28, 2011, at 10:26 AM, Andrey A posted for the third time an
identical message:
Hello all
I'm running da.norm function in R for climate data
rngseed(1234567)
> ?rngseed
No documentation for ‘rngseed’ in specified packages and libraries:
you could try ‘??rngseed’
theta1=da.norm(m
Not only that, but in the same help page, same "Value" section, it says:
predicted the predicted values of the input data based on out-of-bag
samples
so people really should read the help pages instead of speculate...
If the error rates were not based on OOB samples, they would drop to (
This should be posted on the r-sig-mixed-models list, not here.
-- Bert
On Mon, Nov 28, 2011 at 6:50 AM, syrvn wrote:
> Hello,
>
>
> I need to fit a "Nested Random Effects ANOVA model" with the lmer function
> in the lme4 package.
>
> I read through the documentation
>
> http://lme4.r-forge.r-pr
Please forgive me if someone has seen this duplicated email, because I sent
the email to the wrong address just now.
Hi, all,
I'm estimating an inter-rater coefficient, Aickin (1990)'s alpha. It's been
a long time for me to figure out how to make it work, but it's still of no
avail. The problem s
Yes. I agree that plot is going to be crowded. But idea is to see if elements
of same type (different color code etc) group together or not.
I would need only first two principal components (at most three). Since
princomp calculates all components, it is taking very long time !
--
View this mes
Thank you very much. Yes, i figured it out; number of columns has to
specified to solve this.
--
View this message in context:
http://r.789695.n4.nabble.com/problem-in-reading-file-tp4114955p4115357.html
Sent from the R help mailing list archive at Nabble.com.
___
Hello all
I'm running da.norm function in R for climate data
rngseed(1234567)
theta1=da.norm(mydata, thetahat, steps=1000,showits=T)
param1=getparam.norm(mydata,theta1)
As I understand the 1000 steps represent the markov chain values. Is there
a way to plot them? Something like plot(1:1000, para
Hello,
I need to fit a "Nested Random Effects ANOVA model" with the lmer function
in the lme4 package.
I read through the documentation
http://lme4.r-forge.r-project.org/book/Ch2.pdf
and the data structure of the "Pastes" data set looks almost
exactly like mine. The only difference is that I
2 hypotheses:
1. Homework problem
2, extrapolation
Cheers,
Bert
On Mon, Nov 28, 2011 at 3:35 AM, Frank Harrell wrote:
> Note that fitting to the ECDF will result in a distribution estimator that
> has the same mean squared error as the ECDF. That makes it difficult to see
> the value of fitti
Hello everyone
I have some data of the following type.
100 200 300 400 500
1.1 1.2 1.3 1.4 1.5
600 700 800 900 1000
1.5 1.7 1.9 2.0 2.4
With plot() and points functions I can plot these 4 lines of data. But
I dont know how to do it with qplot or ggplot functions. The scenario
is something like t
R distance objects are triangular, maybe consider as.dist() that would require
the square matrix as input. Which could be reconstructed(or you have it
already.) I do not know if there is a biglm() alternative to princomp(), but
maybe consider using subsets of your data because that plot, if crea
Have not found a way to do this either, or in any case it has been buggy. It
would depend on the file manager you have installed. But, you're using Linux!
The path and working directory are supposed to be half the fun. Maybe create an
R folder in /home to keep your files and adjust your R termin
good night
Again I ask for help to the community, as I am new at this, I have some
basic questions.
I am looking for packages on neural networks and so you can search found
these two that I think are the most used, neuralnet, nnet.
So you can test, and correct me if I'm wrong the neuraln
On Nov 28, 2011, at 5:38 AM, narendarreddy kalam wrote:
sir,
i am trying to install r package Bayesian quantile regression but
i am
facing with following problem which says
forPlease select a CRAN mirror for use in this session ---
Warning: unable to access index for repository
http://c
The basic problem is that read.table reads the first 5 lines to
determine the number of columns to process, so when reading 'six' it
reads up to 0.303 and then on the next read, it assumes that the '0'
at the end of line 'six' is the rownames for the next row. Same thing
happens with the rest of t
In Mon, Nov 28, 2011 at 3:39 AM, Vikram Bahure
wrote:
> Dear R users,
>
> I have 3 columns in a zoo object. I want to plot all of them in one screen
> but I want the first two to be in "lines" format and 3rd one to be
> barplot.
>
Try this:
library(zoo)
# create test data
set.seed(123)
z <- zo
sir,
i am trying to install r package Bayesian quantile regression but i am
facing with following problem which says
forPlease select a CRAN mirror for use in this session ---
Warning: unable to access index for repository
http://cran.cnr.Berkeley.edu/bin/windows/contrib/2.6
Warning: unable t
Hi,
I have a file that looks like this :
one,0
two,0.591,0
three,0.356,0.350,0
four,-0.098,0.072,0.380,0
five,0.573,0.408,0.382,0.062,0
six,0.156,0.232,0.517,0.424,0.303,0
seven,0.400,0.414,0.611,0.320,0.401,0.479,0
eight,0.282,0.375,0.512,0.346,0.308,0.463,0.605,0
nine,0.519,0.484,0.467,0.167,0.
Hi,
I have a comma separated file with element names in first column like shown
below :
Name_1,0
Name_2,0.8878,0
Name_3,0.6777,0.7643,0
Name_4,0.9844,0.1234,0.1414,0
Original data is a 1x1 symmetric matrix (600 MB). To reduce file
size, I have minimized matrix to only lower triangle. Is
Dear members,
I'm trying to do a local polynomial estimation where the weight function is the
inverse of the kernel (using a gaussian kernel). Does anybody know how I can do
it?
When I work with a weigth function usual I use:
locfif(y~lp(x,deg=1,h=0.75),kern="gauss")
Does anybody know
Hi:
Could you supply a small reproducible example with the output that you
expect? For example, what output would you expect from the following:
a <- array(1:24, c(2, 2, 3))
?
Dennis
On Mon, Nov 28, 2011 at 12:32 AM, zloncaric
wrote:
> Thank you for your time and help.
>
> I'm quite aware that
On 11-11-27 10:24 PM, cahaya iman wrote:
Hi all,
Did R build the function that can transform the original data to the
"copula scale" by
applying a probability integral transform to obtain uniformly [0;
1]-distributed values?
Yes, the p* functions do that (pnorm, pgamma, etc.).
Duncan Murdoch
Note that fitting to the ECDF will result in a distribution estimator that
has the same mean squared error as the ECDF. That makes it difficult to see
the value of fitting.
Frank
Lathouri, Maria wrote
>
> Dear all,
>
> I need to plot an cumulative distribution plot of a variable and then to
> f
How can i replicate this in Linux:
source(file.choose())
I've tried source(tkgetOpenFile()) but with no luck
__
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/pos
Try to read the pls package article available here:
http://www.jstatsoft.org/v18/i02/
--
Cheers,
Bjørn-Helge Mevik
__
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
This is an indication of the amount of CPU resources that you are
using. Elapsed time is just the number of seconds that the R process
(e.g., RGUI) has been running. "user" time is the amount of CPU that
any commands/scripts have used that you are running; this is the one
that you are typically i
For the example of the function you gave, it is already 'vectorized':
> myfunc <- function(x1, x2) {
+ x1 + x2
+ }
> myfunc(1:10, 1:10)
[1] 2 4 6 8 10 12 14 16 18 20
> outer(1:10, 1:10, myfunc)
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,]2345678
Thanks a lot for your anwser.
I'm going to use a more recent software like Mark or Capwire.
--
View this message in context:
http://r.789695.n4.nabble.com/rarefaction-curves-unable-to-run-the-R-script-from-Gimlet-tp4106847p4114545.html
Sent from the R help mailing list archive at Nabble.com.
__
On Mon, Nov 28, 2011 at 3:54 AM, Matteo Richiardi
wrote:
> Hello,
> I'm a newby in R. I have created a data.frame holding panel data, with
>
Take a look at the 'plm' package and its vignette.
Regards
Liviu
> the following columns: "id","time","y", say:
>
> periods = 100
> numcases = 100
> df =
On 11/28/2011 04:06 PM, Katrina Bennett wrote:
Sorry for not being more clear.
I'll try to explain again.
I have a rather large DEM and I need to scale daily temperature values for
10 years.
I am using the sapply function to adjust temperatures (t.mean.1.c) based on
lapse rates across DEM poin
Thank you for your time and help.
I'm quite aware that this problem seems as basic stuff, and of course I've
read several R and matlab manuals, and also consulted the D. Hiebeler,
Matlab / R Reference and several others, but none of the suggested solutions
seems to give me the right result.
I've
Dear R users,
I have 3 columns in a zoo object. I want to plot all of them in one screen
but I want the first two to be in "lines" format and 3rd one to be
barplot.
Regards
Vikram
[[alternative HTML version deleted]]
__
R-help@r-project.org m
Hi,
Try the AIC and BIC function. ?AIC for help
Regrads
ML
Le 28/11/11 08:28, arunkumar a écrit :
> Hi
> how to get AIC BIC information using funtion lm ?
>
> Please help me
>
> Data<- read.csv("C:/FE and RE.csv")
> Formula="Y~X2+X3+X4
> lm(formula=Formula,data=Data)
>
> My sample Data
>
>
Hi
how to get AIC BIC information using funtion lm ?
Please help me
Data<- read.csv("C:/FE and RE.csv")
Formula="Y~X2+X3+X4
lm(formula=Formula,data=Data)
My sample Data
State Year Y X2 X3 X4 X5 X6
S2 1960 27.8 397.5 42.2 50.7 78.3 65.8
S1 1960 29.9 413.3 38.1 52 79.2 66.9
S2 1961 29.8 439.2 40
Hello,
I am a novice to program R and have been trying to perform a repeated
measures ANCOVA with Temperature as the dependent variable, Site as the
independent variable, Date as the covariate and Year as the repeated
measures.
My dataset consists of temperatures from 4 sites, over 20 days, duri
Sorry for not being more clear.
I'll try to explain again.
I have a rather large DEM and I need to scale daily temperature values for
10 years.
I am using the sapply function to adjust temperatures (t.mean.1.c) based on
lapse rates across DEM points (cdem) which meet the condition of elevation
b
80 matches
Mail list logo