I'm beginner in R! I have a lot of problems on R.
I have three questions about GAM
1. What is the function of Gaussian distribution in GAM?(if I choose family
is Gaussian)
Is it used in the predictand value (Y)?
2. How to plot a graph the gam function?
For example:
Hi, I intend to use foreach to uitlize all the cores in my CPU. The catch
is i need to send a sql query inside the loop. The script is working fine
with normal 'for' loop, but it is giving following error when i change it to
'foreach'. The error is :
select: Interrupted system call
select:
The recently released ODB package was developped to manage HSQL
databases embedded in .odb files (the default when creating a database
with OpenOffice Base) via R.
BRIEFLY
The goal of this package is to access OpenOffice databases via R, to
process data stored in it or to automatize their
Hi
r-help-boun...@r-project.org napsal dne 19.06.2011 20:45:04:
Hi:
It's just an extra step:
y - list(list(c(1,5),c(2,3,4)), list(c(1, 3, 4), c(5, 7)))
lapply(seq_len(length(y)), function(i) lapply(y[[i]], min))
[[1]]
[[1]][[1]]
[1] 1
[[1]][[2]]
[1] 2
[[2]]
[[2]][[1]]
[1] 1
Hi,
Check also saveObject() and loadObject() from R.utils:
library(R.utils)
outfilenames- paste (./file, 1:numFiles, '.Rbin', sep=)
for ( i in 1:10) {
dataFile = read.table (filenames[i], header=TRUE, sep='\t');
saveObject (dataFile, file = outfilenames[i])
}
And then:
file1 = loadObject
I am using the following command to replace all the missing values and
assorted typos in a dataframe with NA:
mydata[mydata80]=NA
The problem is that the first column contains values which should be
more than 80, so really I want to do it just for
mydata[,2:length(mydata)]
I can't seem to
Please tell us the package you are using and the specific commands. It
is most likely you are retrieving the data into a list or some other
structure that hist() doesn't like.
On Mon, Jun 20, 2011 at 12:57 PM, amrita gs ammasamri...@gmail.com wrote:
Hi everyone,
I have certain values
at least provide a sample of the data. It sounds like you have 'factors' as
your data. Do an 'str' of your dataframe that was returned.
Sent from my iPad
On Jun 19, 2011, at 22:57, amrita gs ammasamri...@gmail.com wrote:
Hi everyone,
I have certain values retrieved from mysql
Hi
I am using the following command to replace all the missing values and
assorted typos in a dataframe with NA:
mydata[mydata80]=NA
The problem is that the first column contains values which should be
more than 80, so really I want to do it just for
mydata[,2:length(mydata)]
I
I don't know if you have factors in your data frame, but in any case,
you can try the following approach:
mydata - data.frame(id = 1:10, x = rnorm(10, 80),
z = rnorm(10, 80), w = gl(2, 5))
mydata
f - function (x) {
if (is.numeric(x))
x[x 80] - NA
x
}
mydata[-1] -
On 19.06.2011 20:40, fadia bougacha wrote:
Hello,
I found a problem to transfer my package on the site
ftp://cran.rproject.org/incoming/ .
Access is not allowed.
Write access is allowed (but you cannot read!).
Please,could you give me the settings for connecting
to your server to
Hello,
I would like to fit correlation structures with nlme, but R crashes.
My data is similar to the growth of orange trees example from Pinheiro and
Bates (2000),
but data are not equally spaced in time, as the last observation is taken
after 6 days ( and not 2 as the others).
This is the code
#Hi list,
#From the code below I get two list objects (n$values and n$vectors):
dat - matrix(1:9,3)
n-eigen(dat)
n
# How do I add another object to n that replicates n$vectors and is called
n$vectors$test?
# Thanks a lot!
--
View this message in context:
Since one is a 32-bit and the other one a 64-bit, and therefore the
compiler is also different, you can get different numerical results
easily, even with identical versions of R (and most of us do not have
outdated R installations around).
I just tried your example on 3 different systems with
How about using the available introductory material for such basic questions?
This link for example will tell you what to do:
http://cran.r-project.org/doc/manuals/R-intro.html#Constructing-and-modifying-lists
HTH
Jannis
--- mdvaan mathijsdev...@gmail.com schrieb am Mo, 20.6.2011:
Von:
On Jun 20, 2011, at 5:00 AM, mdvaan wrote:
#Hi list,
#From the code below I get two list objects (n$values and n$vectors):
One of which is a numeric vector and the other of which is a matrix.
dat - matrix(1:9,3)
n-eigen(dat)
n
# How do I add another object to n that replicates n$vectors
On Jun 20, 2011, at 5:40 AM, Mathijs de Vaan wrote:
OK, thanks. n is a list containing two list objects (a numeric
vector and a matrix). I want to replicate n$vectors within list n
and name it n$vectors$test. Thanks
Since you probably already have the mangled object:
n$vectors$test -
See R packages cubature and R2Cuba.
Uwe Ligges
On 18.06.2011 08:17, Moohwan Kim wrote:
a=[0.1,0.2,0.1,0.3,0.4]
b=[0.2,0.3,0.1,0.2,0.5]
c=[1,1,1,1,1]
log(c+a-x*b) where x=unknown scale variable.
int=$$log(c+a-x*b)dadb, where $ denotes integral sign.
Actually, how could I calculate the
OK, thanks. n is a list containing two list objects (a numeric vector and a
matrix). I want to replicate n$vectors within list n and name it
n$vectors$test. Thanks
On Mon, Jun 20, 2011 at 11:35 AM, David Winsemius dwinsem...@comcast.netwrote:
On Jun 20, 2011, at 5:00 AM, mdvaan wrote:
#Hi
statconnDCOM and RExcel have their own mailing list.
Please subscribe at rcom.univie.ac.at and post you question there.
On Jun 17, 2011, at 7:55 AM, Takatsugu Kobayashi wrote:
Hi RUsers,
I am currently tying to use RExcel via R installed in my remote server
(CentOS 5.5).
Could you please
On Jun 20, 2011, at 1:25 AM, pigpigmeow wrote:
I'm beginner in R! I have a lot of problems on R.
I have three questions about GAM
1. What is the function of Gaussian distribution in GAM?(if I choose
family
is Gaussian)
Specifies an an error distribution.
Is it used in the
Hi, I have a question about SVAR modeling with the package vars. How does it
handle the situation where the A (structural) matrix has a non-recursive
structure in the SVAR model? In other words, what kind of algorithm does
vars adopt to deal with the unidentifiable issue in a non-recursive model?
Hi,
I would like to cluster a dataset with the ward algorithm.
That works fine. But I can't find a method to plot the structure chart
to estimate the elbow crterion for the number of clusters.
Can someone tell me how I can do it?
Thanks for your help.
Dominik
If you use the mgcv package for GAMs, I found this book very helpful:
Wood, SN
Generalized additive models: An introduction with R
CRC Press, 2006
ISBN-13: 9781584884743
--Chris Ryan
SUNY Upstate Medical University
On Mon, Jun 20, 2011 at 1:25 AM, pigpigmeow gloryk...@hotmail.com wrote:
I'm
error in pre[sam[[j]], i] - predict(fit, data = dat[sam[[j]], ]) :
*
Yao Zhu*
*Department of Urology
Fudan University Shanghai Cancer Center
Shanghai, China*
2011/6/20 Jim Holtman jholt...@gmail.com
what was the error?
Sent from my iPad
On Jun 20, 2011, at 1:34, zhu yao
On Linux 2.13 by default links cairo, so png() uses it for rendering.
One of my users has performance problem, so ask if it possible to
temporary disable cairo during png() rendering so it reverts to grGraphics.
My workaround for now is to configure R without cairo, but this affects
all users
Hi--
I'm trying to teach myself R using Peter Dalgaard's Introductory Statistics
with R. Does anyone know if there are solutions available for the
exercises?
I'm really just hoping to learn by going through exercises and checking
myself, so alternatively, does anyone know of an introductory
You real error was this:
Error in pre[sam[[j]], i] - predict(fit, data = dat[sam[[j]], ]) :
number of items to replace is not a multiple of replacement length
Take a look at the statement and you will see that 'predict' is
returning 100 values and you are trying to store it into only 10 rows
Dear Patrick,
I do agree with you that it is a very simple problem. Actually, I do have the
following SAS program written to compute the asymmetrical confidence interval.
As a new user of R, I just wanted to see the corresponding codes in R if they
already exist.
Thanks,
Pradip
*SAS
Dear all,
Does anyone know how can one loop through the newick phylogenetic trees
stored in a nexus file and generate an average skyline plot with
coalescent intervals?
I have managed to generate the plot with one tree, but is it possible to
create that consensus/average plot in R?
Learn to search the Archives (or at least one of the forms of the
Archives)
http://search.r-project.org/cgi-bin/namazu.cgi?query=confidence+interval+logit+proportionmax=100result=normalsort=scoreidxname=functionsidxname=Rhelp08idxname=Rhelp10idxname=Rhelp02
(That is constructed with an URL I
Hi thanks for the help.
Here is the error message i got. I could not figure out what goes wrong here.
==
require(ggplots2)
sampledata=data.frame(c(1.002, 1.76, 0.67, 0.99), c(1.38,1.0,0.5, 0.78),
c(1.003,0.57,0.99, 0.58),c(0.76,1.23, 1.45, .78), c(1.43, 1.34, 1.0, 0.9))
I wish for help for the following issue with GNU R.
I have on my Ubuntu-Linux-10.04-LTS built R-2.13.0 from source these days.
After I launched the R interactive console, the plot() etc. graphics functions
reported the following errors:
-- could not find any X11 fonts
-- locale not supported
Date: Mon, 20 Jun 2011 11:25:54 +0200
From: lig...@statistik.tu-dortmund.de
To: p.e.b...@dunelm.org.uk
CC: r-help@r-project.org; pb...@astro.uni-bonn.de
Subject: Re: [R] different results from nls in 2.10.1 and 2.11.1
Since one is a 32-bit and the other one a 64-bit, and therefore the
Please allow me to clarify my original question. What I really need to be
able to do it is to take arbitrary functions and evaluate them for arbitrary
parameter values. I'm doing the optimization myself, so I need to be able to
take a user's function and evaluate them at the current parameter
I wish for help for the following issue with GNU R.
I have on my Ubuntu-Linux-10.04-LTS built R-2.13.0 from source these days.
After I launched the R interactive console, the plot() etc. graphics functions
reported the following errors:
-- could not find any X11 fonts
-- locale not supported
I wish for help for the following issue with GNU R.
I have on my Ubuntu-Linux-10.04-LTS built R-2.13.0 from source these days.
After I launched the R interactive console, the plot() etc. graphics functions
reported the following errors:
-- could not find any X11 fonts
-- locale not supported
See the help page!
type: character string, one of ‘Xlib’ or ‘quartz’ (some Mac OS
X builds) or ‘cairo’. The latter will only be available if
the system was compiled with support for cairo - otherwise
‘Xlib’ will be used. The default is set by
Hi:
I was curious to see how to do this. I generated two versions of the
same function - one for 10-fold predictions when the number of
observations is an exact multiple of 10, returning a matrix, and
another that lets the user define the number of folds and works with
lists. The function also
Dear Uwe,
If you think the relevant section is not sufficient, it's
your turn to provide a short and precise suggestion for a
change, preferable a diff against the R-devel sources. That
way you may be able to convince an R Core member to work on it.
I would be more than happy to rearrange
On Mon, Jun 20, 2011 at 9:08 AM, albeam beam.and...@gmail.com wrote:
Please allow me to clarify my original question. What I really need to be
able to do it is to take arbitrary functions and evaluate them for arbitrary
parameter values. I'm doing the optimization myself, so I need to be able
On Jun 20, 2011, at 15:08 , albeam wrote:
Please allow me to clarify my original question. What I really need to be
able to do it is to take arbitrary functions and evaluate them for arbitrary
parameter values. I'm doing the optimization myself, so I need to be able to
take a user's function
On Mon, 2011-06-20 at 13:38 +0200, Dominik P.H. Kalisch wrote:
Hi,
I would like to cluster a dataset with the ward algorithm.
I'm assuming that this refers to the agglomerative partitioning method
[1]. That is, the number of clusters is selected according to the data
partition that is
Chris,
This doesn't cover all possible cases, but does work for your example.
It should be enough for you to tweak for your actual data.
diffsum - function(x) {
# first identify the decreasing values
# and the difference between increasing values
xdif - x[2:length(x)] -
Frank Harrell wrote:
I know about the current.row, current.column, and panel.number functions
that are useful within panel functions written for lattice. Are there
easy ways to obtain the names of the conditioning variables (those
appearing after |) and their values for the current panel?
Hi,
Thank you for the replies.
Yes I would say it does resemble a randomized block design in that each
person completed 4 out of a possible 16 versions/conditions of the vignette.
There was approximately 20 responses in each condition.
The commands I have been using are;
modela -lmer(DV ~
Hi everyone,
I've searched the internet and lots of stats books high and low for this one,
but nothing seems to be quite what I want. I've got continuous data on four
different state activities recorded in seconds, however each continuous session
is not equally long, so the data are best
Hi:
Typically a profile plot is a plot over time for each of n subjects
(aka a 'spaghetti plot'). Here's a revision of your code to yield a
profile plot in ggplot2, although it's not clear for what the grouping
variable is meant.
sampledata= matrix(c(1.002, 1.76, 0.67, 0.99, 1.38, 1.0, 0.5,
On Mon, Jun 20, 2011 at 9:46 AM, Gabor Grothendieck
ggrothendi...@gmail.com wrote:
On Mon, Jun 20, 2011 at 9:08 AM, albeam beam.and...@gmail.com wrote:
Please allow me to clarify my original question. What I really need to be
able to do it is to take arbitrary functions and evaluate them for
This does not seem like a core R issue... at best it would be relevant on the R
Debian special interest group mailing list
(https://stat.ethz.ch/mailman/listinfo/r-sig-debian). However, using your
system software installation tools to make sure you have installed relevant
font packages for X
Hi all:
Thanks, David. This is a good example of knowledgeable R forensic
investigation. I leave it to Frank whether it meets his criteria.
However, I would argue that that this is bad practice and quite
unwise. In general, these details are implementation dependent and
could change. Yes, they
Dear list,
I am using the plot.coinertia function from the ade4 package. Can
someone tell me if it is possible to change the label size in the upper,
right plot? My RV value is so high that the arrows become shorter than
the labels.
Thank you for your help.
Oana Tomescu
--
Dipl.-Ing. Oana
Hi --
I had a pretty quick R question since unfortunately I have not been able to
find an answer on Google. It shouldn't take much more than a minute to
answer.
I'm trying to add up the major gleason grade and minor gleason grade for an
analysis of patients with prostate cancer. One column has
Thanks very much Bert and David. I was looking for an approach that would
use objects that are active while the panel function was being executed.
Perhaps which.packet is the best way to go, e.g. if using y ~ x | a*b, fetch
levels(b)[which.packet()[2]] from the environment in which b is defined.
If we assume that your data are in a data frame (which doesn't allow
spaces in column names, hence the periods in the call below):
df = data.frame(Major.Gleason = c(4,5,2,3), Minor.Gleason = c(3,2,4,3))
You can paste together the contents of the two columns with a plus
sign in between using the
On Jun 20, 2011, at 10:49 AM, Bert Gunter wrote:
Hi all:
Thanks, David. This is a good example of knowledgeable R forensic
investigation. I leave it to Frank whether it meets his criteria.
However, I would argue that that this is bad practice and quite
unwise. In general, these details are
On Jun 20, 2011, at 11:47 AM, Luke Miller wrote:
If we assume that your data are in a data frame (which doesn't allow
spaces in column names, hence the periods in the call below):
df = data.frame(Major.Gleason = c(4,5,2,3), Minor.Gleason =
c(3,2,4,3))
You can paste together the contents
Actually, I 'm using mgcv package.
But I learnt basic linear regression in my school, it is really hard for me
to handle these problem!
by the way, i need to work harder!
--
View this message in context:
http://r.789695.n4.nabble.com/About-GAM-in-R-Need-YOUR-HELP-tp3610522p3611796.html
Sent
Thanks! Very glad you pointed me to the paste function, it looks very
helpful.
I have a quick follow-up after reading through the online tutorial on the
paste function:
Why do we need quotation marks around Major Gleason and Minor Gleason
in: output = paste(df [,'Major.Gleason'], df[
The quotes around 'Major.Gleason' and 'Minor.Gleason' are required for
accessing data frame columns by name. You could alternately refer to
the columns by number if you're sure you know which column is which:
output = paste(df[ ,1], df[ ,2], sep = '+')
It's just a requirement for accessing
Ben:
1. One doesn't ask questions like this. Syntax is syntax.
2. This has nothing to do with paste; it's the syntax of [ ,
subscripting/extraction
3. But it does make sense:
a - b
z - data.frame(a=1:3, b=4:6)
z[ ,a] # the a column of z
z[ ,a] # the column of z with the value of the object
Sorry, I was unclear. The comment after the second should be:
z[ ,a] # the column of z whose name is the value of the object a
-- Bert
On Mon, Jun 20, 2011 at 9:38 AM, Bert Gunter bgun...@gene.com wrote:
Ben:
1. One doesn't ask questions like this. Syntax is syntax.
2. This has nothing
Interesting!
I get nice convergence in both 32 and 64 bit systems on 2.13.0. I agree the
older versions
are a bit of a distraction. The inconsistent behaviour on current R is a
concern.
Maybe Philip, Uwe, and I (and others who might be interested) should take this
off line
and see what is
Hi all, I need to know two quick things regarding RPut function from RExcel.
1/ How to assign colnames and rownames in the command, i.e., something like
'=RPut(example; A10:F50; rownames=TRUE; colnames=TRUE)'.
2/ When I use RPut and I have NAs in Excel selection, the entire matrix is
coerced
Thanks for the clarifications.
On Mon, Jun 20, 2011 at 12:40 PM, Bert Gunter gunter.ber...@gene.comwrote:
Sorry, I was unclear. The comment after the second should be:
z[ ,a] # the column of z whose name is the value of the object a
-- Bert
On Mon, Jun 20, 2011 at 9:38 AM, Bert Gunter
Hi Dennis,
It looks like something is wrong about configuration of ggplot dependency with
plyr.Since i saw some threads about this particular error message.
I tried several times by installing different versions of plyr but it did not
work.
sampledata= matrix(c(1.002, 1.76, 0.67,
On Mon, Jun 20, 2011 at 9:22 PM, David Winsemius dwinsem...@comcast.net wrote:
On Jun 20, 2011, at 10:49 AM, Bert Gunter wrote:
Hi all:
Thanks, David. This is a good example of knowledgeable R forensic
investigation. I leave it to Frank whether it meets his criteria.
However, I would
As a follow up to my own question, the problem was with my version of vim. I
needed vim 7.3, was using 7.2.
I updated and it works as expected. Just make sure your version of python
matches the version of pywin you install if on windows.
On Fri, Jun 17, 2011 at 6:51 PM, Idris Raja
I have R library's installed in several places on my windows machine.
They are in:
1) C:\Program Files\R\R-2.12.2\library
2) C:\Users\MyUser\Documents\R\win-library\2.12
I can access a library from either location with RStudio, but I can't access
a library from 2) when using R from the command
Hi everyone,
Thank you for the help, I apologize for not providing commented, minimal,
self-contained, reproducible code. I was looking for some pointers about
how to do this in general, but it would have been helpful for me to post a
specific example. Anyway, after the feedback this is the
Dear All,
I'm trying to use dynlm to fit a time series.
I have 3 seasonal terms. Here is an example of the problem.
This is my time variable, hourly data:
timeSeries - seq(as.POSIXct(2011-01-01 00:00:00), as.POSIXct(2011-12-31
23:00:00), by=hour)
My response
is:
y - rnorm(length(t),
On Jun 20, 2011, at 2:38 PM, Idris Raja wrote:
I have R library's installed in several places on my windows machine.
They are in:
1) C:\Program Files\R\R-2.12.2\library
2) C:\Users\MyUser\Documents\R\win-library\2.12
I can access a library from either location with RStudio, but I
can't
On Mon, Jun 20, 2011 at 1:31 PM, albeam beam.and...@gmail.com wrote:
Hi everyone,
Thank you for the help, I apologize for not providing commented, minimal,
self-contained, reproducible code. I was looking for some pointers about
how to do this in general, but it would have been helpful for me
Hi,
I have two datasets, x and y. Simplified x and y denote:
X
Y
A B C A B C . . . . . . . . . . . . . . . . . .
I want to implement all possible models such as lm(X$A~Y$A), lm(X$B~Y$B),
lm(X$C~Y$C)... I have tried the following:
fun- function(x,y){
for(i in
On 6/20/2011 11:25 AM, Vickie S wrote:
Hi Dennis,
It looks like something is wrong about configuration of ggplot dependency with
plyr.Since i saw some threads about this particular error message.
I tried several times by installing different versions of plyr but it did not
work.
Hi,
can you put return(models) within the inner braces and report what it
does. That might do the trick, since it should return the 'models' for every
combination of i and j.
HTH,
Daniel
hazzard wrote:
Hi,
I have two datasets, x and y. Simplified x and y denote:
X
Y
A B C A B
To be more accurate and helpful, try this:
fun- function(x,y){
for(i in 1:length(colnames(x))){
for(j in 1:length(colnames(y))){
if(colnames(x)[i]==colnames(y)[j]){
models=list(lm(ts(x[i])~ts(y[j])))
return(models)
You probably want to use the merge() function.
imaginary example for data frames named KS and US, where the common
identifier variable is named ID
merged.data-merge(KS,US,by.x=ID,by.y=ID,all.x=F,all.y=F)
Note that this will retain only observations for which there is a common ID
in both KS and
Your suggestion would have it return after fitting
the first model, which is not what the OP wants.
The basic problem is that
models - list(lm(...))
replaces the old value of models with a new length-1
list. You want to add the new fitted model to the
list of fitted models. E.g.,
models
On 6/20/2011 12:23 PM, ivan wrote:
Hi,
I have two datasets, x and y. Simplified x and y denote:
X
Y
A B C A B C . . . . . . . . . . . . . . . . . .
I want to implement all possible models such as lm(X$A~Y$A), lm(X$B~Y$B),
lm(X$C~Y$C)... I have tried the following:
fun- function(x,y){
Hi,
When I am editing a command using default R console in Linux, sometimes it
is going into vi mode...not too sure how/why this happening. It then
requires me to use vi commands to edit the line, which is very frustrating
when I just want to use the delete key instead of x to delete a
I am rather new to R and struggling with the syntax. I am trying to do simple
plots and I can't get anything but errors. Specifically, I would like to
know how to plot 3D scatterplots and using polar coordinates.
So far I've tried installing the scatterplot3D package and have copied and
pasted
Hi everyone,
I am writing help files for some R functions in an R package. I am wondering
if we can use the Latex mathematical formula when editing those *.Rd files
and then obtain a pdf manual with beautiful mathematical formula. I tried it
with the default R CMD check command but could not
I am trying to perform a backwards stepwise variable selection with an mlogit
model. The usual functions, step(), drop1(), and dropterm() do not work for
mlogit models.
Update() works but I am only able to use it manually, i.e. I have to type in
each variable I wish to remove by hand on a
Hallo everyone! I have a problem about creating a matrix...
Suppose we have a vector y-c(1,1,1,3,2)
and a zero matrix, m ,with nrows=length(y) and ncol=4.
The matrix would look like this:
0 0 0 0
0 0 0 0
0 0 0 0
0 0 0 0
0
---BeginMessage---
Ivan, try this
d1 - matrix(rnorm(10),50,50)
d2 - matrix(rnorm(10),50,50)
regs - lapply(1:ncol(d1), function(i) lm(d1[,i] ~ d2[,i])
HTH, Filipe
-Mensagem original-
De: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org]
Em nome de ivan
Enviada em:
On Jun 20, 2011, at 4:52 PM, Deepfish wrote:
I am rather new to R and struggling with the syntax. I am trying to
do simple
plots and I can't get anything but errors. Specifically, I would
like to
know how to plot 3D scatterplots and using polar coordinates.
So far I've tried installing
Hi, I have a dataset (see attached) with 2 variables Y is binary, x is a
continuous variable. I want to calculate area under the curve (AUC) for the ROC
curve, but I got different AUC values using ROC() from Epi package vs.
rcorr.cens() from rms package:
I haven't used R in a couple of years, and now am trying something as
simple as importing a csv file and am running into problems right away.
*
mydata - read.csv (Wordata1.csv, sep=)
Error in read.table(file = file, header = header, sep = sep, quote = quote,
:
object 'Wordata1.csv' not found
How about:
y - c(1,1,1,3,2)
m - matrix(0, nrow=length(y), ncol=4)
m[y==1, ] - matrix(1:4, nrow=sum(y == 1), ncol=4, byrow=TRUE)
or, depending on your actual problem
y - c(1,1,1,3,2)
m - matrix(0, nrow=length(y), ncol=4)
m[y == 1,] - col(m[y == 1,])
Sarah
On Mon, Jun 20, 2011 at 3:54 PM,
You probably left off the quotes for the file name
mydata - read.csv (Wordata1.csv, sep=)
it is looking for an R variable named Wordata1.csv which contains the name
of the file.
Since you are giving it the name of the file, it must be in a
character-valued constant.
On Mon, Jun 20, 2011 at 5:16
R is looking for an R object named Wordata1.csv that contains your file name.
Instead you want:
mydata - read.csv (Wordata1.csv, sep=)
Sarah
On Mon, Jun 20, 2011 at 5:16 PM, Alina Sheyman alina...@gmail.com wrote:
I haven't used R in a couple of years, and now am trying something as
simple
that was it, thank you!!!
On Mon, Jun 20, 2011 at 5:23 PM, Sarah Goslee sarah.gos...@gmail.comwrote:
R is looking for an R object named Wordata1.csv that contains your file
name.
Instead you want:
mydata - read.csv (Wordata1.csv, sep=)
Sarah
On Mon, Jun 20, 2011 at 5:16 PM, Alina
On Jun 20, 2011, at 3:54 PM, Costis Ghionnis wrote:
Hallo everyone! I have a problem about creating a matrix...
Suppose we have a vector y-c(1,1,1,3,2)
and a zero matrix, m ,with nrows=length(y) and ncol=4.
The matrix would look like this:
0 0 0 0
0 0 0 0
-Original Message-
From: r-help-boun...@r-project.org
[mailto:r-help-boun...@r-project.org] On Behalf Of David Winsemius
Sent: Monday, June 20, 2011 2:07 PM
To: Deepfish
Cc: r-help@r-project.org
Subject: Re: [R] General Plotting Commands Help
... much elided ...
Most of the
On Jun 20, 2011, at 5:16 PM, Alina Sheyman wrote:
I haven't used R in a couple of years, and now am trying something as
simple as importing a csv file and am running into problems right
away.
*
mydata - read.csv (Wordata1.csv, sep=)
Error in read.table(file = file, header = header, sep =
On 21/06/11 06:52, Runlong Tang wrote:
Hi everyone,
I am writing help files for some R functions in an R package. I am wondering
if we can use the Latex mathematical formula when editing those *.Rd files
and then obtain a pdf manual with beautiful mathematical formula. I tried it
with the
Hi Ungku, it's really difficult for us to take a huge block of code and
understand where an error happened. There's several things that can help us
help you:
1) First and foremost, what is the error message or undesired behavior
you're experiencing?
2) Second, please pare down the code to the
Hi:
(a) What Brian said...
(b) Here's one way to generate a list of model objects from which you
can extract the pieces you may want.
# Generate a fairly minimal, reproducible data set
set.seed(345) # makes results below reproducible
dd - data.frame(X = rnorm(100), Y = rnorm(100),
Hi Dennis and all friends,
After upgrading to R 2.11.1, I managed to work this out perfectly. I also added
group information here, since I wanted to color code the profiles according to
the groups they were assigned to.
library(reshape)
library(ggplot2)
sampledata - matrix(c(1.002, 1.76,
1 - 100 of 126 matches
Mail list logo