Hi there,
I have a vector and would like to create a data frame, which contains
all unique combination of two elements, regardless of order.
myVec - c(1,2,3)
what expand.grid does:
1,1
1,2
1,3
2,1
2,2
2,3
3,1
3,2
3,3
what I would like to have
1,1
1,2
1,3
2,2
2,3
3,3
Can anybody help?
With a matrix such as C I do not have any problem:
library(gmp)
C
V1 V2 V3 V4 V5 V6 V7
[1,] 1 0 0 0 1 0 0
[2,] 0 1 0 0 0 1 0
[3,] 0 0 1 0 0 0 1
[4,] 0 0 0 1 0 0 0
[5,] 0 0 0 0 1 0 0
[6,] 0 0 0 0 0 1 0
[7,] 0 0 0 0 0 0 1
solve.bigz(C)
Do you actually know what contingency table means?
The tables in your example make no sense at all as contingency
tables *especially if obs means observed and exp means
expected.
You can, however, extra the tables in the manner which you seem
to desire, as follows: Let your data object be
I am trying to estimate a latent class multinomial logit regression with
flexmix.
I am not sure if I should do it as follows:
m4-flexmix(cbind(y,1-y)~x1+x2|id,model=FLXMRglm(family=binomial),data=NPreg,k=2)
,
where id links each row with the corresponding respondent.
Each respondent has 4
Thanks for the heads up. I don't have a #. My data is as you suggest.
I tried to generalize my example because I'm open to reformatting for
the solution to my problem.
Thanks,
kbrownk
On Dec 20, 6:14 pm, Sarah Goslee sarah.gos...@gmail.com wrote:
bindata - 1:5
nobs - c(2, 3, 1, 4, 3)
Douglas Bates ba...@stat.wisc.edu writes:
On Tue, Dec 20, 2011 at 8:20 AM, Jean V Adams jvad...@usgs.gov wrote:
Hi Jean,
khai wrote on 12/19/2011 11:26:55 PM:
Hi,
I'm very new to working with sparse matrices and would like to know how
I
can column permute a sparse matrix. Here is a
I ended up just using a vba macro for Excel. Hopefully I can start
transitioning to R for some of these tasks soon.
Thanks,
kbrownk
On Dec 20, 6:14 pm, Sarah Goslee sarah.gos...@gmail.com wrote:
bindata - 1:5
nobs - c(2, 3, 1, 4, 3)
rep(bindata, times=nobs)
[1] 1 1 2 2 2 3 4 4 4 4 5 5 5
Dear Jari Oksanen,
Thank you very much for your reply and your information. I was looking for
this analysis in R, but I was not able to find it and it was a bit strange
to me. It must be a great task to implement DCCA with the decorana code in
vegan.
I will explore other kind of analysis and if
Lets say I have a linear model and I want to find the average expented
value of the dependent variable. So let's assume that I'm studying the
price I pay for coffee.
Price = B0 + B1(weather) + B2(gender) + ...
What I'm trying to find is the predicted price for every possible
combination of
Hi All,
We are using the following dataset which contains UTF-8 characters and is
stored in a MySQL database. When we use
RODBC and read the data, the characters are read correctly.But when we read
using RJDBC ,the characters are read like カタカナ1
Can you please let me
combind
?predict
and:
expand.grid(weather=1:2,gender=c(male,female))
Contact
Details:---
Contact me: tal.gal...@gmail.com | 972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il (Hebrew) |
Dear all,
I have a string and I want to search for its existance inside a data.frame (or
in a column of the data.frame).
One way is for me to do this manually: Make a for loop for the number of
elements and compare one by one element. Is there though any more improved way
to do that?
B.R
Hi
Dear all,
I have a string and I want to search for its existance inside a
data.frame
(or in a column of the data.frame).
One way is for me to do this manually: Make a for loop for the number of
elements and compare one by one element. Is there though any more
improved
way to do
On Dec 21, 2011, at 08:59 , Antje Niederlein wrote:
Hi there,
I have a vector and would like to create a data frame, which contains
all unique combination of two elements, regardless of order.
myVec - c(1,2,3)
what expand.grid does:
1,1
1,2
1,3
2,1
2,2
2,3
3,1
3,2
3,3
Hi Abraham,
Isn't this what you wanted:
data.frame(all.x, y.hat.new)
p.s: it might be safer to use:
myData
mod1 = lm(sold ~ age + gender, data = myData)
Contact
Details:---
Contact me: tal.gal...@gmail.com |
You could read the help for expand.grid very carefully for the answer to this
question.
---
Jeff NewmillerThe . . Go Live...
DCN:jdnew...@dcn.davis.ca.usBasics: ##.#.
Hi Abraham,
Please let us take a step back - what is your end goal from this analysis?
Contact
Details:---
Contact me: tal.gal...@gmail.com | 972-52-7275845
Read me: www.talgalili.com (Hebrew) | www.biostatistics.co.il
Hello List
I am trying to create and assign variable names in loop, but not able to get
expected variable names.
Here is the sample code
n = 10
set.seed(1)
x1 = rnorm(n,0)
x2 = rnorm(n,0)
samp_data - data.frame(x1,x2)
for( i in 1:3) {
label - paste(score, i, sep=_)
assign(label,
Hi,
can anyone please explain why the vif should have more than 2 terms.
*vif.lm(lmobj) : model contains fewer than 2 terms*
why it is throwng error if it is one variable.
-
Thanks in Advance
Arun
--
View this message in context:
I looked into what you suggested and got the following results.
y.hat.new 1234567
89 10
1144.675 1190.714 1236.753 1157.829 1210.445 1203.868 1128.232
1282.792 1246.619 1154.540
11 12 13 14
Yes and no.
Thanks for that code, it was really useful, though not exactly what i was
getting at.
So I'm predicting sold on a number of independent variables.I'm trying to
find an estimated sold
price for each combination of the variables. So what is the expected sold
price for each possible
Hi everyone,
I have:
s= smooth.spline (cbind(1,2,3,4,3,3),cbind (4,2,4,6,5,6))
how may I obtain s hat (s^)?
Thanks a lot.
--
View this message in context:
http://r.789695.n4.nabble.com/Estimate-of-smooth-spline-tp4221253p4221253.html
Sent from the R help mailing list archive at Nabble.com.
Given the following, how to I get x[i+1] to not return an NA result when it
gets to the end of list x by looping back to the start of the list
i.e should return: 0 0 2 2 2 2?
x-c(2,0,0,2,2,2)
i-1:length(x)
x[i]
[1] 2 0 0 2 2 2
x[i+1]
[1] 0 0 2 2 2 NA
can i be described using a loop
On 21.12.2011 09:49, Alaios wrote:
Dear all,
I have a string and I want to search for its existance inside a data.frame (or
in a column of the data.frame).
One way is for me to do this manually: Make a for loop for the number of
elements and compare one by one element. Is there though any
See FAQ How can I save the result of each iteration in a loop into a
separate file?
you will certainly find the the principle given therein can be applied
the other way round or reading as well.
Uwe Ligges
On 21.12.2011 02:32, Debs Majumdar wrote:
Hi,
I have a list of files in one of my
Hi. You assign two times different values to variable label. Try this
and i hope you will notice a mistake:
i=1
label - paste(score, i, sep=_)
label
assign(label, x1+(x2*i) )
label
Instead of this you can do something like:
rm(list=ls())
n = 10
set.seed(1)
x1 = rnorm(n,0)
x2 = rnorm(n,0)
Is this what you want? You will have to adjust the indices appropriately:
x-c(2,0,0,2,2,2)
i - seq_along(x)
x[i]
[1] 2 0 0 2 2 2
# to loop around, change how you index
x[(i - 1) %% length(x) + 1]
[1] 2 0 0 2 2 2
i - i + 1
x[(i - 1) %% length(x) + 1]
[1] 0 0 2 2 2 2
i - i + 1
x[(i - 1)
To R Support Team,
ONS would like a restricted number of its IT staff to view the source code
for the latest version of your software, to check it against our source
code security guidelines.The source code will be securely stored with
access limited.
ONS is quite happy to agree that we would
All right, so my dependent variable is sold price, it is theoretically a
continuous variable, though most of the values are between 0 and 25
Sold Price = B0 + B1(age) + B2(gender) + B3(marital) + B4(educ) + B5(cars)
+ B6(license) + B7(credit) + B8(type) + B9(home) + B10(id)
age is a numeric
Hi Wuming,
it has been a while. I was not able to fix this problem these day.
Also I could not get in contact with the developer, so I switched to
SHOGUN, which has an interface for R.
With the SHOGUN interface to libsvm, everything worked fine. Also, its
a cool package and worth that you check
There are no restrictions needed. Any of your staff can view the
(open) source code just as any other member of the human race with
access to to an Interenet connection may do so.
The released version:
http://cran.r-project.org/src/base/R-2/R-2.14.0.tar.gz
The development version:
Hi.
On Wed, Dec 21, 2011 at 4:20 AM, beetonn nicholas.bee...@utas.edu.au wrote:
Thanks, Henrik! That's given me some food for thought, and evalWithTimeout
certainly seems to be a nicer way of doing this than setTimeLimit.
I should probably explain a little more clearly: I want to stop
On Dec 21, 2011, at 7:06 AM, David Samuel wrote:
To R Support Team,
ONS would like a restricted number of its IT staff to view the source code
for the latest version of your software, to check it against our source
code security guidelines.The source code will be securely stored with
OK, someone point it out to me; my wife tells me I can't see what's in front
of me :-}
I read ?expand.grid carefully, went to ?combn and ?choose but still couldn't
see an easy way to get what the OP asked for. The neatest I can get (which
isn't very neat!) is:
myVec - c(1,2,3)
eg -
Dear all, I have the following written example
coords - 51°30'48.58\N
as.integer(strsplit(coords, °)[[1]][1])
[1] 51
as.integer(strsplit(strsplit(coords, °)[[1]][2], ')[[1]][1])
[1] 30
as.numeric(strsplit(strsplit(strsplit(coords, °)[[1]][2], ')[[1]][2],
\)[[1]][1])
[1] 48.58
Hi,
Are there any special statistical tests, or functions in R I could use
to measure cone-like distributions?
I have several data-sets, which I've been plotting parts of as 2D
plots, where I get a cone-like distribution of the data points.
That is, the data appears to be bounded by two
On 21.12.2011 14:25, David Winsemius wrote:
There are no restrictions needed. Any of your staff can view the (open)
source code just as any other member of the human race
I do not think the GPL excludes other species ...
with access to to
an Interenet connection may do so.
Oh, you may
ali_protocol wrote on 12/21/2011 05:39:19 AM:
Hi everyone,
I have:
s= smooth.spline (cbind(1,2,3,4,3,3),cbind (4,2,4,6,5,6))
how may I obtain s hat (s^)?
Thanks a lot.
Read the help file on the smooth.spline() function,
?smooth.spline
The section titled Value tells you what the
On 21.12.2011 14:39, Keith Jewell wrote:
OK, someone point it out to me; my wife tells me I can't see what's in front
of me :-}
I read ?expand.grid carefully, went to ?combn and ?choose but still couldn't
see an easy way to get what the OP asked for. The neatest I can get (which
isn't very
Thanks Uwe,
I was happy that my 2 lines gave what the OP asked for, albeit in a
different order.
My puzzlement arose from Jeff Newmillers comment:
You could read the help for expand.grid very carefully for the answer to
this question.
... which I reas as saying that ?expand.grid would lead to
I need to generate 6 x-y scatter plots (lattice xyplot) for each of 11
data frames. I'm sure the tedium of doing these one at a time can be avoided
by writing a script that uses nested for loops or the apply() function. My
Web search has not provided me with a tutorial on R programming that
On Wed, Dec 21, 2011 at 6:57 AM, Rich Shepard rshep...@appl-ecosys.com wrote:
I need to generate 6 x-y scatter plots (lattice xyplot) for each of 11
data frames. I'm sure the tedium of doing these one at a time can be avoided
by writing a script that uses nested for loops or the apply()
http://zenproje.com/bestsite.php?pid=85ygo=52qat=448nj=23
__
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-guide.html
and provide commented, minimal,
On Wed, 21 Dec 2011, Bert Gunter wrote:
Well, you may have to invest in a book or two to get what you want.
Bert,
I've more than a dozen books I've bought and read over the past few
months, but haven't found what I need in them. (May be there and I missed
it.)
You can start with R's own
Mr Sankaran,
It may be your character set that's wrong or check your MySQL
configuration.
On Dec 21, 2011 12:31 AM, Raji raji.sanka...@gmail.com wrote:
Hi All,
We are using the following dataset which contains UTF-8 characters and is
stored in a MySQL database. When we use
RODBC and read
Dear All,
It is not very difficult, in R, to perform a linear fit
y=Ax+B on a single set of data.
However, imagine that you have several datasets labelled by a number
(real or integer does not matter) K. For each individual dataset, it
would make sense to resort to a linear fit, but now A and B
Dear all
I would like to ask from dir function in R (?dir)
to give me only the files that end with .txt or .doc.
The dir functions supports the use of patterns (is not that regular
expressions) for doing that.
print(dir(i,full.names=TRUE,pattern=.))
Could you please help me compose such
The following (untested) should get you close:
deg-as.integer(strsplit(coords, ?)[[1]][1])
min-as.integer(strsplit(strsplit(coords, ?)[[1]][2],
')[[1]][1])
sec-as.numeric(strsplit(strsplit(strsplit(coords, ?)[[1]][2],
')[[1]][2], \)[[1]][1])
nswe-strsplit(strsplit(strsplit(coords, ?)[[1]][2],
From the help for dir:
File naming conventions are platform dependent. The pattern
matching works with the case of file names as returned by the OS
On my linux system, this works:
dir(pattern=*.txt)
[1] a.txt b.txt
dir(pattern=*.doc)
[1] c.doc
dir(pattern=*.doc|*.txt)
[1] a.txt
Do you wish to include .docx files as well or just .doc?
Michael
On Wed, Dec 21, 2011 at 10:04 AM, Alaios ala...@yahoo.com wrote:
Dear all
I would like to ask from dir function in R (?dir)
to give me only the files that end with .txt or .doc.
The dir functions supports the use of patterns
To be correct for the regular expression, it should be:
dir(pattern = \\.(txt|doc)$)
The form
dir(pattern=*.txt)
will match 'txt' appearing anywhere in the name; this looks like the
argument you would have used to Sys.glob which is a UNIX style file
name match and not a regular expression. .
Hi
I have a data frame with values in following format.
param case1
1 a
2 b
2 c
2 d
3 e
4 f
how to use aggregate so that it I only one row for each 'param' value.
the output for the above input should be
Here is an example using 'data.table'
x - read.table(text = param case1
+ 1 a
+ 2 b
+ 2 c
+ 2 d
+ 3 e
+ 4 f, header = TRUE, as.is = TRUE)
require(data.table)
x - data.table(x)
x[
+ , list( case1 =
On Dec 21, 2011, at 11:31 AM, jim holtman wrote:
Here is an example using 'data.table'
x - read.table(text = param case1
+ 1 a
+ 2 b
+ 2 c
+ 2 d
+ 3 e
+ 4 f, header = TRUE, as.is = TRUE)
And the
Dear List,
I have the code below, where I am using the constrained optimisation
package, 'constrOptim.nl' to find the values of two values, b0 and b1.
I have no problems when I enter further variable information DIRECTLY into
the functions, fn, and heq. In this instance I require fn to have
I see my pre-coffee fingering hit an incorrect key in the final
line--E is positive, W is negative.
--
Clint BowmanINTERNET: cl...@ecy.wa.gov
Air Quality Modeler INTERNET: cl...@math.utah.edu
Department of Ecology VOICE: (360)
You were using the wrong syntax; it should be:
x[
, list(case1 = paste(case1, collapse = ','))
, by = param
]
Notice that you do not use the x$ on the names within the data.table
statement.
On Wed, Dec 21, 2011 at 12:22 PM, Mary Kindall mary.kind...@gmail.com wrote:
Hi Jim
Hi All,
I am trying to use the wdTable() function within R2wd package to send a
dataframe to MS-word. However, there is a problem with the tables that are
generated by R. For some reason the header row of the table also contains all
the data. You can see it by dragging the bottom border of
Alguém sabe onde encontro os comandos para utilizar em
daisy() no pacote cluster o método de Gower
para dados moleculares codominantes, quantitativos e multicategóricos
conjuntamente?
Agradeço.
OBS.: confirmar por favor o recebimento da mensagem.
Adésio
I wish to make a stacked area chart of a time series with three variables.
The observations are very irregular, covering 500 years, with a few
historical observations in the range 1500-1850, and then more regular
observations since 1880 or so. If I plot this in Excell it truncates the
time
Hi,
I am trying to implement an algorithm in C which will be called via the
.Call() interface.
While reading the 'Writing R Extension' manual, I stumbled upon the
R_alloc() function for allocating storage for C objects. The manual says
it should be used to allocate storage if an C object is
Hi
I am doing mlogit and forward selection at the moment. I have categorical and
continuous variables. Categorical variables are each coded with more than two
dummies. There is a problem when you add categorical variables into the model
you can't tell from the significance of the individual
First of all, the order specified is the maximum required order so in your
case the logical arima call would be:
arima(zt,order=c(2,0,1))
This still includes the AR(1) term, which can be excluded using the fixed
command.
Assuming you have 4 parameters (AR1 AR2 MA1 Intercept) this is the solution:
Dear R users,
I am currently attempting to fit logistic regression models in R, where
the slopes should be restricted to positive values. Although I am aware
of the package nnls (which does the trick for linear regression models),
I did not find any solution for logistic regression. If there is
Hi All,
I am trying to use the wdTable() function within R2wd package to send a
dataframe to MS-word. However, there is a problem with the tables that are
generated by R. For some reason the header row of the table also contains
all the data. You can see it by dragging the bottom border of the
Hi Jim
Thanks for reply but this is not working. I think I am missing something
over here.
1 x - cbind(c(1,2,2,2,3,4), c('a','b', 'c','d','e','f'))
1 colnames(x) = c('param', 'case1')
1 x = as.data.frame(x)
1 x
param case1
1 1 a
2 2 b
3 2 c
4 2 d
5 3 e
6
First, the posting guide asked for questions about compiled code to be
asked on R-devel. So I will be brief.
You use R_alloc or Calloc in place of malloc/calloc. Use R_alloc where
code might be interrupted.
There are many examples in R's own packages and the recommended packages.
On
I do not know how to use dput, i am attaching the txt file for the data
http://r.789695.n4.nabble.com/file/n4222616/foo.txt foo.txt
c1-read.dlim('foo.txt')
c2-c1
any_comp-NULL
for( i in 1:dim(c1)[1])
{
num_comp-0
for (j in 1:dim(c1)[2])
if (c1[i,j]==2) num_comp=num_comp+1 #Y=2
Dear R users,
I am currently attempting to fit logistic regression models in R, where
the slopes should be restricted to positive values. Although I am aware
of the package nnls (which does the trick for linear regression models),
I did not find any solution for logistic regression. If there is
With the arima function I found some nice results, however now i have trouble
interpreting them for use outside R.
I am currently struggeling with the MA terms, here is a short example:
ser=c(1, 14, 3, 9)#Example series
mod=arima(ser,c(0,0,1)) #From {stats} library
mod
#Series: ser
On 21/12/2011 18:26, t...@netstorm.be wrote:
Dear R users,
I am currently attempting to fit logistic regression models in R, where
the slopes should be restricted to positive values. Although I am aware
I guess non-negative, as in the subject line, so there actually is a
solution.
of the
To make it so others can produce
your dataset on their own computers (so
they can easily reproduce the problem you are
having) do, in R,
dump(c1, file=stdout())
and copy the text output by that that into your message.
E.g., suppose I made a data.frame with
junk -
Have you tried plotting log(y) vs log(x)?
albyn
On Wed, Dec 21, 2011 at 02:18:56PM +, Matthew Gwynne wrote:
Hi,
Are there any special statistical tests, or functions in R I could use
to measure cone-like distributions?
I have several data-sets, which I've been plotting parts of as 2D
[This question is hopefully straight-forward, but difficult to provide
reproducible code.]
I'm doing a multivariate bootstrap, using boot::boot(),
where the output of the basic computation is a k x p matrix of coefficients,
representing a tuning constant x variable, as shown in the $t0
On Wed, 21 Dec 2011, Bert Gunter wrote:
You can start with R's own An Introduction to R, but if that won't do,
...
I should have looked more carefully at what I have available here. The
R-lang.pdf will take me a long way; perhaps all the way to writing what I
need.
Thanks, Bert,
Rich
This looks like a hierarchical Bayes type problem. There are a few packages
that do Bayes estimation or link to external tools (like openbugs) to do this.
You would just set up each of the relationships like you define below, y is a
function of a(k), b(k), x and e where e comes from a normal
Hi Michael,
There may be a cleverer way to do this without a loop, but I think that the
following does what you want:
t - matrix(1:(800*18), 800, 18, byrow=TRUE) # for a reproducible example
head(t)
[,1] [,2] [,3] [,4] [,5] [,6] [,7] [,8] [,9] [,10]
[1,]123456
On Dec 21, 2011, at 18:22 , Mary Kindall wrote:
Hi Jim
Thanks for reply but this is not working. I think I am missing something
over here.
Yes, the data.table() bit. It's not going to work with data frames.
1 x - cbind(c(1,2,2,2,3,4), c('a','b', 'c','d','e','f'))
1 colnames(x) =
Hi,
When qqnorm on a vector of length 10M+ I get a huge pdf file which
cannot be loaded by acroread or evince.
Any suggestions? (apart from sampling the data).
Thanks.
--
Sam Steingold (http://sds.podval.org/) on Ubuntu 11.10 (oneiric) X 11.0.11004000
http://mideasttruth.com
On Dec 21, 2011, at 4:10 PM, Sam Steingold wrote:
Hi,
When qqnorm on a vector of length 10M+ I get a huge pdf file which
cannot be loaded by acroread or evince.
Any suggestions? (apart from sampling the data).
Thanks.
Depending upon what your end product needs to be, generate a png file
Hi Joann,
I am not sure if it will help, but there is a post I wrote some time ago:
http://www.r-statistics.com/2010/05/exporting-r-output-to-ms-word-with-r2wd-an-example-session/
Please give it a look and see if that might help you figure out the problem.
Best,
Tal
Contact
Matthew Gwynne mathew.gwynne at gmail.com writes:
Hi,
Are there any special statistical tests, or functions in R I could use
to measure cone-like distributions?
I have several data-sets, which I've been plotting parts of as 2D
plots, where I get a cone-like distribution of the data
On Dec 21, 2011, at 23:10 , Sam Steingold wrote:
Hi,
When qqnorm on a vector of length 10M+ I get a huge pdf file which
cannot be loaded by acroread or evince.
Any suggestions? (apart from sampling the data).
Sample intelligently? Things like
qq - seq(-4,4,,10001)
For example, if I call library(spam), I would get messages like this
Package 'spam' is loaded. Spam version 0.27-0 (2011-08-17).
Type demo( spam) for some demos, help( Spam) for an overview
of this package.
Help for individual functions is optained by adding the
suffix '.spam' to the function
You should be able to suppress them with
suppressPackageStartupMessages() but not all packages produce startup
messages in the approved manner.
Hadley
On Wed, Dec 21, 2011 at 5:36 PM, Saiwing Yeung saiw...@berkeley.edu wrote:
For example, if I call library(spam), I would get messages like this
suppressPackageStartupMessages(library(spam))
takes care of that, thanks!!
On Dec 21, 2011, at 3:39 PM, Hadley Wickham wrote:
You should be able to suppress them with
suppressPackageStartupMessages() but not all packages produce startup
messages in the approved manner.
Hadley
On Wed,
I'd second Peter's suggestion, but if you need every data point for
whatever reason, you might also try passing the pch = . option to
qqnorm. On a test with 1e7 data points, it more than halved the
resulting file size and with that many points, there's no loss in
clarity with the different marker.
I try to overlay a plot inside a gtkDrawingArea with a button (or any other
widget).
I tried to put both into a gtkFixed container.
But this does not work, no printing occurs.
Does someone know a solution?
What I tried:
w - gtkWindow()
w$setSizeRequest(400,400)
fx - gtkFixed()
da -
Hi,
I'm trying to get a list of addresses from
http://tatts.com/racing/outletsearch based on a list of postcodes (zip
codes) and states. For example, I'm looking for State = 'Northern
Territory' and Postcode = '0800'. The list I'm working off is about 500
long so I was hoping to find a way to
Sent from my iPod
__
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-guide.html
and provide commented, minimal, self-contained, reproducible code.
Hi
You probably want this cycle for some reason but if you know how many
labels you want you just can
label - paste(score, 1:3, sep=_)
label
[1] score_1 score_2 score_3
Then instead of assigning names in a cycle
you can
label-c(names(samp_data), label)
for( i in 1:3) {
samp_data -
Hi
I do not know how to use dput, i am attaching the txt file for the data
dput(any.object)
puts a structure of this object to console. You can copy it to your email
and anybody can copy it back to R.
Or you can transfer the structure to file see
?dput, ?dget
92 matches
Mail list logo