Hi Areti,
Maybe this will help:
scrounging<-data.frame(
behav=sample(c("inactive","active","foraging","snoozing"),50,TRUE),
substr=sample(c("tree","ground","vine","air"),50,TRUE))
scrounge.tab<-table(scrounging)
barplot(scrounge.tab)
legend(3.8,14,c("inactive","active","foraging","snoozing"),
f
Hello,
Please read the posting guide at the end of this and every R-Help mail.
You should post the output of
dput(data)
or, if the data set 'data' is too big, the output of
dput(head(data, 20))
for us to be able to help you.
Rui Barradas
Às 18:29 de 10/03/21, Areti Panopoulou escreveu:
Hel
ase?
>>
>> -Rabby Sarpong
>>
>> ____
>> From: Jim Lemon
>> Sent: Sunday, June 25, 2017 3:22:54 AM
>> To: Sarpong, Rabby
>> Cc: r-help@R-project.org
>> Subject: Re: [R] Help please
>>
>> Hi Rabby,
>>
way to resolve it please?
>
> -Rabby Sarpong
>
>
> From: Jim Lemon
> Sent: Sunday, June 25, 2017 3:22:54 AM
> To: Sarpong, Rabby
> Cc: r-help@R-project.org
> Subject: Re: [R] Help please
>
> Hi Rabby,
> It looks to me as though your variable Final
Hi Rabby,
It looks to me as though your variable Final$Cor is being treated as a
factor rather than a numeric value. This may be due to one or more
non-numeric values occurring in the data that is read in. Also you do
not have to use the Final$* notation in the formula as you have
specified the dat
> On Jun 26, 2016, at 1:03 PM, Lars Bishop wrote:
>
> Thanks, David. Sorry, do you mean this?
>
> library(nnet)
> set.seed(1)
> ysim <- gl(3, 100)
> y <- model.matrix(~ysim -1)
> X <- matrix( 3 * runif(length(ysim)), nrow = 300, ncol = 3)
> X_new <- matrix( 3 * runif(length(ysim)), nrow = 200,
Thanks, David. Sorry, do you mean this?
library(nnet)
set.seed(1)
ysim <- gl(3, 100)
y <- model.matrix(~ysim -1)
X <- matrix( 3 * runif(length(ysim)), nrow = 300, ncol = 3)
X_new <- matrix( 3 * runif(length(ysim)), nrow = 200, ncol = 3)
fit <- multinom(y ~ X, trace = FALSE)
pred <- predict(fit, se
> On Jun 26, 2016, at 12:39 PM, Lars Bishop wrote:
>
> Many thanks David. That works. Looks then this error will always occur in
> predict.multinom whenever the data argument is missing in the mutlinom fit,
> but the data argument is optional as per documentation.
I don't agree with that ana
Many thanks David. That works. Looks then this error will always occur in
predict.multinom whenever the data argument is missing in the mutlinom fit,
but the data argument is optional as per documentation.
Best,
Lars.
On Sun, Jun 26, 2016 at 3:14 PM, David Winsemius
wrote:
>
> > On Jun 26, 2016
Thanks, David.
That is very interesting, because ?multinom says that the value is:
"A nnet object with additional components: ..."
Of course I could have checked methods(predict), but I just took the
Help file at its word. Should it not be revised to say explicitly:
"An object of class 'multino
> On Jun 26, 2016, at 11:32 AM, Lars Bishop wrote:
>
> Thanks Bert.
>
> But I it doesn't complain when predict is used on X instead of X_new
> (using nnet_7.3-12), which is even more puzzling to me:
>
> pred <- predict(fit, X, type = "probs")
Indeed: There is a predict.multinom function and i
Thanks Bert.
But I it doesn't complain when predict is used on X instead of X_new
(using nnet_7.3-12), which is even more puzzling to me:
pred <- predict(fit, X, type = "probs")
head(pred)
ysim1 ysim2 ysim3
1 0.3059421 0.3063284 0.3877295
2 0.3200219 0.3202551 0.3597230
3 0.3452414 0.3451
Well, for one thing, there is no "probs" method for predict.nnet, at
least in my version: nnet_7.3-12
Cheers,
Bert
Bert Gunter
"The trouble with having an open mind is that people keep coming along
and sticking things into it."
-- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
Hi,
I have used this function before successfully. I could help you if you could
provide your code.
Thanks & Regards,Arnab
From: hms Dreams
To: "r-help@r-project.org"
Sent: Saturday, February 14, 2015 6:27 AM
Subject: [R] help please >>metro_hastings function
Hi :)anybody can h
It looks like you posted in HTML and the result are garbbled. ONly post in
plain text. Also it might help to read one or both of these
https://github.com/hadley/devtools/wiki/Reproducibility
http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
John Kane
Kingston
Your example is not reproducible [1]. We don't know what device you are writing
to, and we don't have your data or even a subset of it.
However, facet_wrap is not used for generating separate graphs. You will need
to make some kind of loop construct (for or lapply) that opens the device,
prints
Hi
> all problems solved. thank you for your help!
> for the sake of completeness, here my solution:
> #1) read in data:
> daten<-read.table('K:/Analysen/STRUCTURE/test.txt', header=TRUE,
sep="\t")
> daten<-as.data.frame(daten)
not needed, daten is already data frame
Hi
> thank you for your help.
>
> my input data looks like this (tab separated):
>
> Ind.nr. Pop.nr. scm266 rms1280 scm247 rms1107
> 1 101 305 318 222 135
> 1 101 305 318 231 135
> 2 101 305 313 999 96
> 2 101 305 321 999 130
> 3 101 305 32
all problems solved. thank you for your help!
for the sake of completeness, here my solution:
#1) read in data:
daten<-read.table('K:/Analysen/STRUCTURE/test.txt', header=TRUE, sep="\t")
daten<-as.data.frame(daten)
#2) create empty matrix:
indxind<-matrix(0,nrow=617, ncol=617)
#indxind[1:20,1:19]
SORRY it should be:
Fridolin wrote
>
> for (s in 3:6) { #walks though the matrix colum by colum, starting at
> colum 3
> for (z1 in 1:5) { #for each current colum, take one row (z1)...
> for (z2 in 1:5) { #...and compare it to another row (z2) of the
> current colum
>
error is go
thank you for your help.
my input data looks like this (tab separated):
Ind.nr. Pop.nr. scm266 rms1280 scm247 rms1107
1 101 305 318 222 135
1 101 305 318 231 135
2 101 305 313 999 96
2 101 305 321 999 130
3
Fridolin wrote
>
> hello, this is my script:
>
> #1) read in data:
> daten<-read.table('K:/Analysen/STRUCTURE/input_STRUCTURE_tab_excl_5_282_559.txt',
> header=TRUE, sep="\t")
> daten<-as.matrix(daten)
>
> #2) create empty matrix:
> indxind<-matrix(nrow=617, ncol=617)
> indxind[1:20,1:19]
>
On Wed, Aug 8, 2012 at 9:06 AM, Fridolin wrote:
> hello, this is my script:
>
> #1) read in data:
> daten<-read.table('K:/Analysen/STRUCTURE/input_STRUCTURE_tab_excl_5_282_559.txt',
> header=TRUE, sep="\t")
> daten<-as.matrix(daten)
>
> #2) create empty matrix:
> indxind<-matrix(nrow=617, ncol=617
I'm a fan of Ggobi--which works well with or without R--but I'm not sure how
it handles enormous data sets. I second the Tufte recommendation, and add:
Interactive and Dynamic Graphics for Data Analysis.
--
View this message in context:
http://r.789695.n4.nabble.com/Help-Please-recommend-good-b
One basic and very good one is
Cleveland, W. S. (1985). The Elements of Graphing Data. Wadsworth, Inc.
John Kane
Kingston ON Canada
> -Original Message-
> From: comtech@gmail.com
> Sent: Tue, 3 Jul 2012 18:12:00 -0500
> To: r-h...@stat.math.ethz.ch
> Subject: [R] Help! Please recomm
I found this [1] book interesting. About "big data" It really depends from
a number of things... if can help, I know hdf5 work pretty Well with huge
dataset .
[1] http://www.ggobi.org/book/index.html
On Jul 3, 2012 7:14 PM, "Michael" wrote:
> Hi all,
>
> Could you please help me?
>
> I am look
On Tue, 3 Jul 2012, Michael wrote:
I am looking for books/pointers/resources/tutorials on visualizing
complex/big data and on understanding multivariate relations in
complicated data.
Michael,
You need to become familiar with the works of Edward Tufte, the dean of
complex data visualization
For this case I would use a permutation test. Start by choosing some
statistic that represents your 4 students across the different grades,
some possibilities would be the sum of scores across grades and
students, or mean, or median, or ...
Compute the selected statistic for your 4 students and s
Thank you for the replies.
So what my test wants to do is this:
I have a big matrix, 30 rows (students in a class) X 50 columns (students
grades for the year).
An example of the matrix is as such:
grade1 grade2grade3 . grade 50
student 1
student 2***
st
Just what null hypothesis are you trying to test or what question are
you trying to answer by comparing 2 matrices of different size?
I think you need to figure out what your real question is before
worrying about which test might work on it.
Trying to get your data to fit a given test rather tha
> -Original Message-
> From: r-help-boun...@r-project.org
> [mailto:r-help-boun...@r-project.org] On Behalf Of aoife doherty
>
> Thank you. Can the chi-squared test compare two matrices that
> are not the same size, eg if matrix 1 is a 2 X 4 table, and
> matrix 2 is a 3 X 5 matrix?
N
You should probably read up on what the chi-squared test actually
tests: in one form, it asks whether some set of observations could
have come from a given multinomial distribution. Concretely, it asks
whether it is "reasonable" to get 3 blues, 4 reds, and 2 whites from a
uniform distribution over
Thank you. Can the chi-squared test compare two matrices that are not the
same size, eg if matrix 1 is a 2 X 4 table, and matrix 2 is a 3 X 5 matrix?
On Fri, Mar 9, 2012 at 4:37 PM, Greg Snow <538...@gmail.com> wrote:
> The chi-squared test is one option (and seems reasonable to me if it
> the t
The chi-squared test is one option (and seems reasonable to me if it
the the proportions/patterns that you want to test). One way to do
the test is to combine your 2 matrices into a 3 dimensional array (the
abind package may help here) and test using the loglin function.
On Thu, Mar 8, 2012 at 5:
On 29.02.2012 17:36, Raúl Fernández Naranjo wrote:
Hi everyone, I was using rattle. I used a database with 4 individuals and
50 variables. Reading the database was OK and that was made by rattle but when
y was trying to draw the tree, rattle shows the image attached.
And have
> From: dwinsem...@comcast.net
> To: julio.flo...@spss.com.mx
> Date: Thu, 19 May 2011 10:40:08 -0400
> CC: r-help@r-project.org
> Subject: Re: [R] Help, please
>
>
> On May 18, 2011, at 6:29 PM, Julio César Flores Castro wr
On May 18, 2011, at 6:29 PM, Julio César Flores Castro wrote:
Hi,
I am using R 2.10.1 and I have a doubt. Do you know how many cases
can R
handle?
I was able to handle (meaning do Cox proportional hazards work with
the 'rms' package which adds extra memory overhead with a datadist
obj
On Wed, 18 May 2011, Julio César Flores Castro wrote:
Hi,
I am using R 2.10.1 and I have a doubt. Do you know how many cases can R
handle?
At least millions.
I want to use the library npmc but if I have more than 4,500 cases I get an
error message. If I use less than 4500 cases I don?t ha
Hi,
On Wed, May 18, 2011 at 6:29 PM, Julio César Flores Castro
wrote:
> Hi,
>
> I am using R 2.10.1 and I have a doubt.
As a general rule of thumb, it's usually best to be using the latest
version of R (which is no R 2.13.0) -- 2.10.1 came out in December,
2009, so ... try to upgrade if you can.
I wish has simpler solution, apprently simple problem ! thanks for help.
On Fri, Mar 18, 2011 at 10:04 AM, jim holtman wrote:
> I think it was suggested that you save your output to a 'list' and
> then you will have it in a format that can accept variable numbers of
> items in each element and
The easiest thing is to use 'save' so that you write the object out as
binary. If you don't need 'text', then save/load is the way to
operate with the data.
On Fri, Mar 18, 2011 at 10:53 AM, Ram H. Sharma wrote:
> Thanks, Jim for the idea.
>
> I tried with save as list. I can not write to a tabl
On Mar 18, 2011, at 10:53 AM, Ram H. Sharma wrote:
Thanks, Jim for the idea.
I tried with save as list. I can not write to a table with
"write.table", I
could not find a function that is write.list or equivalent. Even if
it is
list I think it would be difficult to post-processing than as
Thanks, Jim for the idea.
I tried with save as list. I can not write to a table with "write.table", I
could not find a function that is write.list or equivalent. Even if it is
list I think it would be difficult to post-processing than as table.
outx<- as.list(apply(datafr1, 2, fout))
write.table
I think it was suggested that you save your output to a 'list' and
then you will have it in a format that can accept variable numbers of
items in each element and it is also in a form that you can easily
process it to create whatever other output you might need.
On Fri, Mar 18, 2011 at 7:24 AM, Ra
Hi Dennis and R-users
Thank you for more help. I am pretty close, but challenge still remain is
forcing the output with different length to output dataframe.
> x <- data.frame(apply(datafr1, 2, fout))
Error in data.frame(var1 = c(-0.70777998321315, 0.418602152926712,
2.08356737154810, :
argume
Hi:
Is this what you're after?
fout <- function(x) {
lim <- median(x) + c(-2, 2) * mad(x)
x[x < lim[1] | x > lim[2]]
}
> apply(datafr1, 2, fout)
$var1
[1] 17.5462078 18.4548214 0.7083442 1.9207578 -1.2296787 17.4948240
[7] 19.5702558 1.6181150 20.9791652 -1.3542099 1.8215087 -1
Hi:
There has to be a better way to do this, but one option is to use pmin() and
pmax().
# Function to apply to pairs of columns:
ordPair <- function(x, y) data.frame(pmin(x, y), pmax(x,y))
u <- with(odataframe, cbind(ordPair(X1, X2), ordPair(X3, X4), ordPair(X5,
X6))
u
pmin.x..y. pmax.x..y. pm
Hi Jorge and R users
Thank you so much for the responses. You input helped me alot and
potentially can help me to solve one more problem, but I got error message.
I am sorry to ask you again but if you can find my problem in quick look
that will be great. I hope this will not cost alot of your t
Dear Melissa,
If Jim's solution doesn't work then for some reason your function is
converting numerical values into either character or factor and I would
suggest you use the colClasses argument to force the right class.
For example,
mat <- read.table( file="lala.txt", sep="\t", row.names=1
Your data seems to read in just fine, so what is the problem you are
trying to solve?
> x <- read.table('clipboard', sep='\t', header=TRUE)
> str(x)
'data.frame': 5 obs. of 5 variables:
$ X : Factor w/ 5 levels "JE","JM","S",..: 5 2 4 1 3
$ None : int 4 4 25 18 10
$ Light : int 2 3 10
On 29/11/10 05:29, Melissa Waldman wrote:
Hi,
I have been working with Program R for my stats class and I keep coming upon
the same error, I have read so many sites about inputting data from a text
file into R and I'm using the data to do a correspondence analysis. I feel
like I have read every
On Sun, 28 Nov 2010 21:29:08 -0800
Melissa Waldman wrote:
> Hi,
>
> I have been working with Program R for my stats class and I keep
> coming upon
> the same error, I have read so many sites about inputting data from a
> text
> file into R and I'm using the data to do a correspondence analysis.
I'm sure there are people willing to help you, but you
will have to be a little more forthcoming with information.
I don't know how many predict functions there are in the
2000-plus packages on CRAN, but there surely are quite a
few. Perhaps you could let us know what you're using
before you get t
Please don't reply to this request. This is a student in one of
my classes.
- Phil Spector
Statistical Computing Facility
Department of Statistics
On Wed, Feb 10, 2010 at 2:47 AM, Nick Manginelli wrote:
> So I have to use this table of min, max, and mean temps for certain
> years http://www.stat.berkeley.edu/classes/s133/data/january.tab. I am
> supposed to figure out which year had the hottest January and which had the
> coldest. But I d
Hi Roberto,
The other thing you can do --- if you don't wish to step across to lmer(),
where you will be able to exactly replicate the crossed-factor error
structure --- is stay with aov(... + Error()), but fit the factor you are
interested in last. Assume it is Sex. Then fit your model as
aov.m
On Sun, 14 Sep 2008, roberto toro wrote:
Thanks for answering Mark!
I tried with the coding of the interaction you suggested:
tfac<-with(vlt,interaction(Lobe,Tissue,drop=T))
mod<-lme(Volume~Sex*Lobe*Tissue,random=~1|Subject/tfac,data=vlt)
But is it normal that the DF are 2303? DF is 2303 e
Hi Roberto,
It's difficult to comment further on specifics without access to your data
set. A general point is that the output from summary(aov.object) is not
directly comparable with summary(lme.object). The latter gives you a summary
of a fitted linear regression model, not an analysis of varia
Hi Roberto,
>> but I can't figure out the /(Lobe*Tissue) part...
This type of nesting is easier to do using lmer(). To do it using lme() you
have to generate the crossed factor yourself. Do something like this:
##
tfac <- with(vslt, interaction(Lobe, Tissue, drop=T))
str(tfac); head(tfac)
mod2<
osita k ezeh wrote:
>
> hello,
>
> please can anyone help me out. Am a new user of R
> program. Am having problem
> with this code below, not getting the expected
> results.
>
>
Did you not get my and Uwe's previous responses to your question?
Ben Bolker
--
View this message in conte
You got at least two answers on this yesterday. If you want more precise
answers, please tell us what your expected result is.
Uwe Ligges
osita k ezeh wrote:
> hello,
>
> please can anyone help me out. Am a new user of R
> program. Am having problem
> with this code below, not getting the expe
61 matches
Mail list logo