nction transposes the data for the "y" and "x"
variables in the long form of the data without any warning.
So to avoid the error I was running into, it is necessary to either make
sure the arguments to varying and v.names are sorted correctly, or to use a
list argument as Dennis h
Hello again,
I have found that if I use sapply, I do not get a warning, i.e.,
lbl1 = sapply(d[,var1],label)
works correctly and gives no warning.
I'm sorry this did not occur to me earlier, my apologies!
--Krishna
On Thu, Dec 2, 2010 at 11:36 AM, Krishna Tateneni wrote:
> Hello,
Hello,
I'm attempting to create a data frame with correlations between every pair
of variables in a data frame, so that I can then sort by the value of the
correlation coefficient and see which pairs of variables are most strongly
correlated.
The sm2vec function in the corpcor library works very
Hello,
This is a question motivated by curiosity, not a pressing problem. Any
responses are much appreciated! In the following code, function reg1 calls
glm with a formula object while reg2 uses a string. In both cases, glm
works; however, in the second case, the add1 function fails with the
fo
1.11 1 5 1
> 2.11 2 6 2
> 1.22 3 7 1
> 2.22 4 8 2
>
> HTH,
> Dennis
>
> On Fri, Aug 6, 2010 at 10:28 AM, Krishna Tateneni wrote:
>
>> Hello,
>>
>> A quick question for my edification. When I run the following (R 2.8.1 on
>> Micros
Hello,
A quick question for my edification. When I run the following (R 2.8.1 on
Microsoft Windows):
> d = data.frame(x1=c(1,2),x2=c(3,4),y1=c(5,6),y2=c(7,8))
> reshape(d,varying=c("y1","x1","y2","x2"),v.names=c("y","x"),dir="long")
I found myself surprised by the results--the column labeled "y
Greetings,
I have a vector of values that are a word followed by a number, e.g., x =
c("Apple12","HP42","Dell91"). The goal is to split this vector into two
vectors such that the first vector contains just the words and the second
contains just the numbers. I cannot use strsplit (or at least I d
Perfect, thanks very much!
On Wed, Jan 6, 2010 at 10:44 AM, Gabor Grothendieck wrote:
> Try this:
>
> cat("\n", file = "tables.csv", append = TRUE)
>
>
> On Wed, Jan 6, 2010 at 11:36 AM, Krishna Tateneni
> wrote:
> > Greetings and happy new ye
Greetings and happy new year!
I'm attempting to write a series of tables to a CSV file, and would like to
insert a blank line after each table. To do this, I use:
> write.csv(NULL,"tables.csv",append=T)
which appears to work, except that this warning is thrown:
> Warning message:
> In write.table(
Many thanks to all who responded, and especially for the promptness of your
answers. The common thread in your solutions is the use of rle, a very
useful function of which I was ignorant.
--Krishna
[[alternative HTML version deleted]]
__
R-hel
Greetings, I have a vector of the form:
[10,8,1,3,0,8,NA,NA,NA,NA,2,1,6,NA,NA,NA,0,5,1,9...] That is, a combination
of sequences of non-missing values and missing values, with each sequence
possibly of a different length.
I'd like to create another vector which will help me pick out the sequences
11 matches
Mail list logo