Hi,
Actually, you don't need to create the column first, nor to use which:
DF[DF$month==1, "product1_1"] = DF[DF$month==1, "product1"] * 3.1
The "[" is a great tool that you need to learn. In this case, you don't
need to combine "[" and $: within the square brackets, the vector before
the comm
Hi Lily,
You're on the right track, but you should define a new column first
(filled with NA values), then specify the precise rows and columns on
both the left and right hand sides of the assignment operator that
will be altered. Luckily, this is pretty easy...just remember to use
which() on the
Hi R users,
I have a question about manipulating the dataframe. I want to create a new
dataframe, and to multiply rows with different seasons for different
constants.
DF
year month day product1 product2 product3
1981 1 1 18 5620
1981 1
Did not look to me like Windows was a factor here... OP referred to
/home/paumarc/Bam. I think the issue was trying to access his own data using an
inappropriate function.
--
Sent from my phone. Please excuse my brevity.
On May 22, 2017 3:22:06 PM PDT, Jim Lemon wrote:
>Windows. A funny name f
Windows. A funny name for a operating system that doesn't let you see anything.
Jim
On Mon, May 22, 2017 at 11:59 PM, Pau Marc Muñoz Torres
wrote:
> i could make it worl, thanks for your help, it was usefull
>
> Pau Marc Muñoz Torres
> skype: pau_marc
> http://www.linkedin.com/in/paumarc
> http:
Start with the Posting Guide mentioned at the bottom of this email. Note that
only a very few types of attachments are permitted on this list... yours
apparently were not. We generally find that providing a reproducible example
that includes the data in the R code and the statements that cause
Do not compute the log likelihood as the log of the product of
probabilities. Instead compute it as the sum of logs of probabilities.
The latter is less likely to underflow (go below c. 0^-309).
Most (all?) of the built-in probability density functions have a 'log'
argument; when log=TRUE you get
Hello list,
I' trying to estimate a log likelihood function from my data.
I apply the mean to all my simulations, and I get something like this:
apply(likelihood, c(2, 3, 4), mean,na.rm=TRUE)
, , 1
[,1] [,2] [,3] [,4] [,5][,6]
[,7]
[1,] 0.73162327 0.
Hi
I read a book where was shown an example how to create a probability model with
mlogit. I tried to do like the instruction said but i get error message that
"duplicate row names are not allowed". What could i do to fix it?
I had the data in excel and imported it to R using R commander. I atta
Evaluation of the NOT, AND, OR logical statements below in MySQL
5.5.30-log Community Server (GPL) replicate R's truth tables for NOT,
AND, OR. See MySQL queries (below), which are in agreement with R
truth table code posted in this thread:
bash-3.2$ mysql
Welcome to the MySQL monitor. Commands
i could make it worl, thanks for your help, it was usefull
Pau Marc Muñoz Torres
skype: pau_marc
http://www.linkedin.com/in/paumarc
http://www.researchgate.net/profile/Pau_Marc_Torres3/info/
2017-05-22 15:38 GMT+02:00 Pau Marc Muñoz Torres :
> hi to you both
>
> You are right peter, I probably
hi to you both
You are right peter, I probably miss understood the system.file function.
I was trying to use it with a package from bioconductor and when i saw that
it didn't work for me, I tested with readxl and still do not working, so I
am doing something wrong with system.file
the original s
As Ismail notes, you did not give us your code, only a few disconnected bits of
your code. Assuming that by "top 1 group" you mean the largest group, here is a
reproducible example:
# First create a reproducible set of data
set.seed(42)
mydata <- matrix(rnorm(300, 50, 10), 100, 3)
# A matrix wit
You haven't said whether your "table" is a matrix or data frame.
Presumably the latter.
Nor have you answered my question about whether order of your meal
code pairs matters.
Another question: can meals be replicated for an ID or are they all different?
Finally, is this a homework assignment or
What is your version of readxl?
In my version 1.0, there is no directory called estdata, but there is one
called extdata. However, in that directory there is no file called
"results.xlsx"
Either it was there once and has now gone missing or "results.xlsx" your
own file? It looks like the latter -
> On 22 May 2017, at 14:43 , Pau Marc Muñoz Torres wrote:
>
> Hello everybody
>
> I am trying to use system.file but it returns not file found
>
> what I have done is
>
>> sample <- system.file("results.xlsx","estdata", package =
> "readxl",mustWork = TRUE)
> Error in system.file("results.xls
Hello everybody
I am trying to use system.file but it returns not file found
what I have done is
> sample <- system.file("results.xlsx","estdata", package =
"readxl",mustWork = TRUE)
Error in system.file("results.xlsx", "estdata", package = "readxl",
mustWork = TRUE) :
no file found
i have c
Hello everybody
I am trying to use system.file but it returns not file found
what I have done is
> sample <- system.file("results.xlsx","estdata", package =
"readxl",mustWork = TRUE)
Error in system.file("results.xlsx", "estdata", package = "readxl",
mustWork = TRUE) :
no file found
i have c
I'm trying to format datatable in R using DT package. I have code like this:
library(data.table)
library(DT)
data<-data.table(rbind(c(1,2,3),c(4,5,6)))
colnames(data)<- c('A','B','c')
datatable(data, rownames=F,
colnames=c('A','B','C'),
class='stripe cell-border hover',
options=
Hi Jon,
sorry for the inconvenience. I have done it in plain text now.
I am building a VAR model to forecast of bivariate time series. But it
shows flat forecast and i am in need of correcting it. Is there any way to
correct this flat forecast? or Do i have to go with other models?
Code:
> da
Dear R list
I wonder please if anyone has experience they can share of the JMdesign package
that performs sample sized for (surviival/longitudinal) joint models and is
based on the paper "Sample size and power determination in joint modeling of
longitudinal and survival data " by Chen et al (
Hi Again..,
All of my 2 tables are data.frames and the order of meals does not matter. Meal
A =2 and Meal B= 15 is the same as Meal A=15 and Meal B= 2.
From: Bert Gunter
Sent: 22 May 2017 03:19:57
To: Allaisone 1
Cc: r-help@r-project.org
Subject: Re: [R] Identy
Hi,
The last line should give me the value of 'amount'. Is the syntax wrong ?
Measurement <- setRefClass("Measurement",
fields = list(subject = Subject,
quantity = Quantity))
s <- Subject$new(id = 100)
u <- CompoundUnit$new( micrograms = 100,
On 05/22/2017 05:10 AM, Patrick Connolly wrote:
On Fri, 28-Apr-2017 at 07:04PM +0200, peter dalgaard wrote:
|>
|> > On 28 Apr 2017, at 12:08 , Duncan Murdoch wrote:
|> >
|> > On 28/04/2017 4:45 AM, Thierry Onkelinx wrote:
|> >> Dear Peter,
|> >>
|> >> It actually breaks install.packages(). So i
On Fri, 28-Apr-2017 at 07:04PM +0200, peter dalgaard wrote:
|>
|> > On 28 Apr 2017, at 12:08 , Duncan Murdoch wrote:
|> >
|> > On 28/04/2017 4:45 AM, Thierry Onkelinx wrote:
|> >> Dear Peter,
|> >>
|> >> It actually breaks install.packages(). So it is not that innocent.
|> >
|> > I don't thin
25 matches
Mail list logo