Dear Glenn,
Suppose this function
test - function(df){
ggplot(df, aes(x = gp, y = y)) + geom_point()
}
Then R CMD check will consider gp and y as global variables since they are
undefined. Because R CMD check cannot detect that gp and y will be
extracted from df by ggplot2.
Possible
HI Jim,
Thanks for the help however R throws an error when i create a var
tot_mon_wt-
tot_mon_wt-by(mwlc$MFST_WT,mwlc$Month,sum). It gives me an error =
Error in Summary.factor(c(1L, 1L), na.rm = FALSE) :
‘sum’ not meaningful for factors
Not sure what this error refers to. Thank you, Shivi
Hello All,
I need help on creating a histogram for one of my data. The data is as below
(sample):
MFST_WT Hours PROCESS Month Weekday Day of the Month
6,828 13 INBOUND Mar Fri13
2,504 16 INBOUND Mar Fri27
20
Hi David, thanks, but the function has to work from an R shell, I have
no graphical server in my remote machines.
On Wed, May 27, 2015 at 9:45 AM, David Winsemius dwinsem...@comcast.net wrote:
On May 27, 2015, at 12:29 AM, Luca Cerone wrote:
Hi everybody,
in one of my packages I store
On 27/05/2015 09:17, Luca Cerone wrote:
Hi David, thanks, but the function has to work from an R shell, I have
no graphical server in my remote machines.
My suggestion was going to be to use readline() to read the passwords.
Ideally one would use a custom reader from stdin which did not echo,
On 26/05/2015 9:56 PM, Ista Zahn wrote:
Escape the backslash with another backslash, i.e.,
gsub(\\,/,X:\\Classes\\TT\\Automation, fixed = TRUE)
... and note that if you want to use a regular expression (i.e. fixed =
FALSE), you would need another level of escaping, i.e.
Since the character looks like a Windows file path, you could use
normalizePath() instead of gsub().
normalizePath(X:\\Classes\\TT\\Automation, winslash = /, mustWork =
FALSE)
ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature and
Forest
team Biometrie
Hi Daisy,
You face a problem similar to one with which I have grappled in
different fields. The year is designed for the northern hemisphere,
beginning and ending in less productive biologic states in those
regions. I have previously argued that since the calendar year is an
arbitrary progression,
To answer your question on filtering the command-line history: You can
use savehistory()/loadhistory() to rewrite the history, but like all
other solutions/suggestions, it's not guaranteed to work everywhere.
Example:
filterhistory - function(filter) {
stopifnot(is.function(filter))
hf -
Hi Shivi82,
My suggestion is that the error concerned a mismatch between the
number of labels and the number of bars.
More seriously, you seem to want to sum the values of weight (MFST_WT)
within each month. So:
tot_mon_wt-by(mwlc$MFST_WT,mwlc$Month,sum)
barplot(tot_mon_wt, names.arg =
y has unequal n's . There are 6 states and 7 loci.
It is safer to submit data in the dput() form. See ?dput for information.
John Kane
Kingston ON Canada
-Original Message-
From: burbrink...@gmail.com
Sent: Tue, 26 May 2015 20:12:55 -0400
To: r-help@r-project.org
Subject: [R]
You were not completely clear, but it appears that you have data where each subject has
results from 8 trials, as a pair of variables is changed. If that is correct, then you
want to have a variance that corrects for the repeated measures. In R the glm command
handles the simple case but not
I doubt if there is enough information in your email to let anyone really
comment.
Have a look at Reproducibility :
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
and http://adv-r.had.co.nz/Reproducibility.html
for some suggestions on how to frame a
On 27/05/2015 11:56, Shivi82 wrote:
HI Jim,
Thanks for the help however R throws an error when i create a var
tot_mon_wt-
tot_mon_wt-by(mwlc$MFST_WT,mwlc$Month,sum). It gives me an error =
Error in Summary.factor(c(1L, 1L), na.rm = FALSE) :
‘sum’ not meaningful for factors
Not sure what
Hi Mohammad,
I went back and reread your original statement of the problem about and I think
I kinda grasp it. It is actually quite clear and I misunderstood it completely.
At the moment I have no idea how to approach it. As Jim Lemon said, it looks
easy but may not be. I'll go back and
Hello Team.
I have one doubts on Forecasting
I have the 2 years of data by month wise i need to find 3rd year Value
based on the past 2 years value if we using forecasting trend value coming
i want to find the exact value please help
Thanks and Regards
Venkatesan
[[alternative HTML
On 27/05/2015 8:55 AM, Dan Abner wrote:
Hi Ista,
Is there no way to not escape the backslash in the pathway?
You don't need to escape it if you read it from a file, get it from
list.files(), etc. You only need to escape it if you are writing a
literal string in R code.
Duncan Murdoch
The
I am not totally clear on the header question but would something like ?head
help here? It will show a certain number of rows of data with headers included
. I think the default is 6 rows but if all you want to do is check names and a
bit of data something like head(xx, 2) works nicely.
RE
HI Team,
A quick question.
When I used the print option in R to see the output of my syntax I do not
see the headers or column names. Is there a way to see the headers in the
print.
Also as most of the datasets we work today have huge number of observations
but when I print it only shows a
Hi Ista,
Is there no way to not escape the backslash in the pathway? The
pathway is going to change and will become very long and I need to do
this programmatically. Beside, escaping the backslash defeats the
purpose of using gsub. If I could do this manually each and every
time, I would change
I am attempting to use mixOmics' pls() on a problem with 16 rows
and 27 columns. When I run pls I get the message No variable selection.
I have included a small problem below that produces this message.
What am I doing wrong? Any help is appreciated.
#= Begin small reproducible sample
Hi Barry,
I looked at the source code for pls quickly and couldn't find where/why
this message is being printed. Maybe an undocumented behavior? I would ask
the package maintainer. It doesn't look like a warning - just that there
was no variable selection.
HTH,
Stephen
On Wed, May 27, 2015 at
On May 27, 2015, at 8:00 AM, Suman wrote:
Hi there,
Now that R has grown up with a vibrant community. It's no 1 statistical
package used by scientists. It's graphics capabilities are amazing.
Now it's time to provide native support in R core for distributed and
parallel computing for
Hi there,
Now that R has grown up with a vibrant community. It's no 1 statistical package
used by scientists. It's graphics capabilities are amazing.
Now it's time to provide native support in R core for distributed and
parallel computing for high performance in massive datasets.
And may be
Hi All:
Is there a routine in R that allows me to simulate a time series that has a
given spectrum? I have looked at the R Time Series Task view, and have done a
web search also, including an article to appear in the handbook of statistics
on time series in R, but I don’t see anything
Dear All,
I am trying to plot several things in a multiplot using par(mfrow...) AND add a
pre-existing png file to that plot.
I have found 2 options of doing this in the web:
writePNG() and another fix using rasterImage().
writePNG(): the option using writePNG() does not add the
You can use package circular for this. You have to convert 1-366 to 1-360 by
dividing the days by 366 and multiplying by 360 and converting the results back
to days by adding 360 if the value is 0 and dividing by 360 and multiplying by
366:
library(circular)
degrees - obsDay/366*360 #
Thanks John,
I really hope it can be answered. Yes all 3 data sets have the same items.
On Wed, May 27, 2015 at 9:32 AM, John Kane jrkrid...@inbox.com wrote:
Thanks Mohammad.
The data appear to have come through just fine. This probably means you
can ignore some of the questions I just sent
Did you consider the amount of code your suggestions would break?
-- Bert
Bert Gunter
Genentech Nonclinical Biostatistics
(650) 467-7374
Data is not information. Information is not knowledge. And knowledge
is certainly not wisdom.
Clifford Stoll
On Wed, May 27, 2015 at 8:00 AM, Suman
On 27/05/2015 16:54, Roy Mendelssohn - NOAA Federal wrote:
Hi All:
Is there a routine in R that allows me to simulate a time series that has a
given spectrum? I have looked at the R Time Series Task view, and have done a
web search also, including an article to appear in the handbook of
Hi Mohammad,
My mantra for the day is Plain Text, Plain Text. A bas HTML.
And I really need to get out of here.
I have not found a solution but is this a bit more like what you want?
#===
dat1 - structure(list(class.1 = c(0L, 0L, 0L, 0L, 0L, 0L,
I have figured out a cheesy work around since these problems have to do
with not having unique identifiers for the States:
1) Append a unique identifier to each state such that both AR becomes ARa
and ARb
2) run the normal merge(x,y,by=1, all=T)
3) Use subst to cut the appended identifiers.
Interesting solutions. Thanks guys!
On Wed, May 27, 2015 at 9:27 AM, William Michels w...@caa.columbia.edu
wrote:
Hi Frank!
Ok, bind columns together in a state-wise fashion, allowing for state
duplicates. Below (maybe cheesy) uses the state abbreviations
state.abb in the datasets package.
Thanks Mohammad.
The data appear to have come through just fine. This probably means you can
ignore some of the questions I just sent you -- our emails are crossing.
I probably will not get a chance to look at this til this afternoon (10:25
here now). We can hope someone with more skill than
When I integrate the variable kernel density estimation of a sample from
-inf to inf, I should get 1. But it is not what I get with my code below. I
find a value higher than 2. How can I fix this?
n-1000
df - data.frame(x=unlist(lapply(1, function(i) rnorm(n, 0,sd=1
Thanks Bill,
However, unique(merge(x, y, by = 1, all=T)) is giving me:
state locus.x locus.y
1 AR 5 2
2 AR 5 3
3 AR 6 2
4 AR 6 3
5 IL 1 1
9 LA 2 NA
11MS 3 NA
12MS 4 NA
I was wondering about the layout of each of your data sets. I cobbled together
what I think is the most likely scenarios. My bet is the data sets most
closely resemble my data set 4 in structure. Am I correct? I dropped the other
two columns in your data layout as likely to be immaterial to
Hi Frank!
Ok, bind columns together in a state-wise fashion, allowing for state
duplicates. Below (maybe cheesy) uses the state abbreviations
state.abb in the datasets package. Also uses two functions
rbind.na and cbind.na, available from Andrej-Nikolai Spiess'
website at:
Hello all!
I am trying to estimate four parameters of a model (mu, sigma, theta and
lambda) for a subset of data (snapshot given below). I have tried to do this
using the nls package in R but I kept getting error messages (Error in
numericDeriv(form[[3L]], names(ind), env) : --AND-- Missing
Thanks for the advice Jim. I did actually play around with this idea, but
for some bird species (emu) the beginning of the breeding season is
actually January while for others it is in July or at other times. Breeding
seasons can be driven by dry season or temperatures, so although there are
Hi John,
I created the original data set with dput . This time I only loaded 50
values for each data set (dat1, dat2, dat3).
About your question, all 0,1 and 2 are indicator of a specific class. The
task is to compare 3 independent classification of a certain term and and
determine the actual
Thanks, I will look at that.
-Roy
On May 27, 2015, at 9:15 AM, Prof Brian Ripley rip...@stats.ox.ac.uk wrote:
On 27/05/2015 16:54, Roy Mendelssohn - NOAA Federal wrote:
Hi All:
Is there a routine in R that allows me to simulate a time series that has a
given spectrum? I have looked
On May 27, 2015, at 2:28 AM, Shivi82 wrote:
Hello All,
I need help on creating a histogram for one of my data. The data is as below
(sample):
MFST_WT Hours PROCESS Month Weekday Day of the Month
6,828 13 INBOUND Mar Fri13
2,504 16
a) Base R already includes the parallel package. Deciding to use more than
one processor for a particular computation is a very high level decision that
can require knowledge of computing time cost, importance of other tasks on the
system, and interdependence of computation results. It is not a
Notes:
1. You can get output for all states (alphabetically) by pre-merging
data with states.abb:
a1 - merge(state.abb, x, by= 1, all.x=T)
b1 - merge(state.abb, y, by= 1, all.x=T)
colnames(a1) - c(state, locus)
colnames(b1) - c(state, locus)
by.states1(a1,b1)
2. In my previous post (based on
I am trying to run a nonlinear model looking at seasonal abundance of
plants with the following limitations:
fit.nls.s-nls(S_a~beta+m*time+alpha*sin(w*time+phi),
data= xy,
start=list(beta=2.1, m=0, alpha=2, phi = 1, w = 1),
upper=list(beta=inf, m=inf,
I am currently working on a health care related project using R. I am
learning R while working on data analysis.
Below is the part of the data in which i am encountering a problem.
Case#Sex Therapy1 Therapy2 Outcome
1 male no
no
I am new modeling and I am trying to analyse my data using the package Double
Hierarchical Generalized Linear Models. However, I always get the same sort of
error:
Error in z %*% v_h : non-conformable arguments.
I think that this error indicates that the matrices are created with
Good Morning,
I'm an italian student of Statistics.
I'd like to know how to obtain the source code
of summary() function, because I'm building a new
model in R, and I would like to implement a summary function
similar to that used for linear models.
How can I obtain the source code?
Thank you in
Ok. so I read about the (modeest) package that gives the results that I
am looking for (most repeated value).
I modified the data frame a little and moved the text to the first column.
This is the data frame with all 3 possible classes for each term.
=
On 27/05/2015 11:00 AM, Suman wrote:
Hi there,
Now that R has grown up with a vibrant community. It's no 1 statistical package
used by scientists. It's graphics capabilities are amazing.
Now it's time to provide native support in R core for distributed and
parallel computing for high
Start R and then type:
summary.lm
David L. Carlson
Department of Anthropology
Texas AM University
-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Carmine Apice
Sent: Wednesday, May 27, 2015 11:24 AM
To: r-help@r-project.org
Subject: [R]
On May 27, 2015, at 10:10 AM, Kengo Inagaki wrote:
I am currently working on a health care related project using R. I am
learning R while working on data analysis.
Below is the part of the data in which i am encountering a problem.
Case#Sex Therapy1 Therapy2
Save the result of the apply() function:
Out - apply(df[ ,2:length(df)], 1, mfv)
Then there are several options:
Approximately what you asked for
data.frame(Out)
t(t(Out))
More typing but exactly what you asked for
cat(paste0([, 1:length(Out), ] , Out), sep=\n)
David L. Carlson
Department of
Thanks David it worked !
One more thing. I hope it's not complicated. Is it also possible to display
the terms for each row next to it?
for example:
[1] #dac2
[2] #dac0
[3] #dac1
...
On Wed, May 27, 2015 at 2:18 PM, David L Carlson dcarl...@tamu.edu wrote:
Save the result of
On 27/05/2015 4:08 PM, Jennifer Sweatman wrote:
I am trying to run a nonlinear model looking at seasonal abundance of
plants with the following limitations:
fit.nls.s-nls(S_a~beta+m*time+alpha*sin(w*time+phi),
data= xy,
start=list(beta=2.1, m=0, alpha=2,
Hi R-users,
Can anybody kindly inform me which package I need to install in RStudio to
run *Multivariate Kernel Regressions* (preferably,Gasser-Muller or
Nadaraya-Watson) ?
I am getting only univariate set-ups in the online resources, I need
multivariate (i.e. multiple regressors).
Thanks and
Thank you very much for your rapid response. I sincerely appreciate your input.
I am sorry for sending the previous email in HTML format.
with(a, table(Sex, Therapy1) ) shows the following.
Therapy1
Sex no yes
female 6 7
male7 5
with(a, table(Sex, Outcome) ) and
I did not understand complete separation quite well..
Thank you very much for clarification.
Kengo
2015-05-27 17:03 GMT-05:00 David Winsemius dwinsem...@comcast.net:
On May 27, 2015, at 3:00 PM, Kengo Inagaki wrote:
Here is the result-
with(a, table(Sex, Therapy1, Outcome) )
, , Outcome
cat(paste0([, 1:length(Out), ] #dac , Out), sep=\n)
David
From: Mohammad Alimohammadi [mailto:mxalimoha...@ualr.edu]
Sent: Wednesday, May 27, 2015 2:29 PM
To: David L Carlson; r-help@r-project.org
Subject: Re: [R] Problem with comparing multiple data sets
Thanks David it worked !
One more
On Thu, May 28, 2015 at 12:54 AM, Roy Mendelssohn - NOAA Federal
roy.mendelss...@noaa.gov wrote:
Hi All:
Is there a routine in R that allows me to simulate a time series that has a
given spectrum? I have looked at the R Time Series Task view, and have done
a web search also, including an
Greetings,
I'm trying to use the nls function in my statistics project but I'm really
finding lot of difficulties.
I have a function called apinene_modele_prediction that calculates the
estimations:
library(expm); #exp of a matrixapinene_modele_prediction - function(t,theta)
Here is the result-
with(a, table(Sex, Therapy1, Outcome) )
, , Outcome = Alive
Therapy1
Sex no yes
female 0 4
male4 5
, , Outcome = Death
Therapy1
Sex no yes
female 6 3
male3 0
2015-05-27 16:57 GMT-05:00 David Winsemius
Hi all,
Let's say I have a vector:
vv-c(1,2,3)
And suppose I have a function f(a,b), which is a function of 2 scalar inputs. I
would like to evaluate this function separately for each element of the vv
vector while the second input to f( ) will be the previous output from f( ).
So, the
On May 27, 2015, at 10:00 AM, Mariana Velasque wrote:
I am new modeling and I am trying to analyse my data using the package Double
Hierarchical Generalized Linear Models.
However, I always get the same sort of error:
Error in z %*% v_h : non-conformable arguments.
It means the either
I have been attempting to install the R devtools package at work. The
version of R is 3.1.2 (Pumpkin Helmet). However, the installation of
devtools fails because devtools depends on rversions which in turn depends
upon the XML package (XML_3.98-1.1.tar.gz), and the XML package is not
importing
On 5/27/2015 2:43 AM, Lionel Delmas wrote:
When I integrate the variable kernel density estimation of a sample from
-inf to inf, I should get 1. But it is not what I get with my code below. I
find a value higher than 2. How can I fix this?
n-1000
df - data.frame(x=unlist(lapply(1, function(i)
On May 27, 2015, at 2:49 PM, Kengo Inagaki wrote:
Thank you very much for your rapid response. I sincerely appreciate your
input.
I am sorry for sending the previous email in HTML format.
with(a, table(Sex, Therapy1) ) shows the following.
Therapy1
Sex no yes
female
On May 27, 2015, at 3:00 PM, Kengo Inagaki wrote:
Here is the result-
with(a, table(Sex, Therapy1, Outcome) )
, , Outcome = Alive
Therapy1
Sex no yes
female 0 4
male4 5
, , Outcome = Death
Therapy1
Sex no yes
female 6 3
male3 0
Hi everybody,
in one of my packages I store encrypted password.
If the user has to change the password in use she can run:
update_password(old_password, new_password)
The problem is that the commands ends up in the .Rhistory file.
Is there any way I can avoid this? Any suggestion about it?
On May 26, 2015, at 3:59 PM, blue honour via R-help wrote:
Dear R users,
I have a question regarding retrieving data from nested lists. To illustrate,
here is an example input:
d1-data.table(v1=c(3,4),v2=c(2,5))
On 27/05/2015 02:12, Renato Rivera wrote:
Hi I have this problem and do not know how to solve it, I'm new to R
R version 2.15.0 (2012-03-30)
That is a very old version of R: the posting guide asked you to update
before posting.
Copyright (C) 2012 The R Foundation for Statistical Computing
On May 27, 2015, at 12:29 AM, Luca Cerone wrote:
Hi everybody,
in one of my packages I store encrypted password.
If the user has to change the password in use she can run:
update_password(old_password, new_password)
The problem is that the commands ends up in the .Rhistory file.
Hi Frank,
It looks like you're very close. I think you want:
unique(merge(x, y, by = 1, all=T))
Gabor Grothendieck's sqldf package is very useful if you're more
comfortable with SQL-type syntax, see:
https://github.com/ggrothendieck/sqldf
Best Regards,
William (Bill) Michels, Ph.D.
On
Greetings,
I am trying to identify at which point during the year 80% of bird breeding
observations are. typically I would answer a question like this by finding
the median or quartiles but how do I deal with situations where the 80% of
the is from day 285 through day 366 (leap year) and extends
75 matches
Mail list logo