Displaying 20 results from an estimated 200 matches similar to: "loading data frames and rbind them"
2011 Jan 14
2
selecting elements in vector
Hi everybody,
I have the following problem. I have a vector containing character elements,
such as:
list = c("aa","bb","cc","dd","ee")
I want to create an index which identifies the elements that are different
from, e.g. "aa" and "bb".
When I do the following:
jj = list!="aa" & list!="bb"
> jj
2011 Mar 03
1
Applying function to multiple data
Dear R helpers,
I know R language at a preliminary level. This is my first post to this R
forum. I have recently learned the use of function and have been successful
in writing few on my own. However I am not able to figure out how to apply
the function to multiple sets of data.
# MY QUERY
Suppose I am having following data.frame
df = data.frame(k = c(1:8), ratings = c("A",
2007 Nov 15
2
counting strings of identical values in a matrix
Hello
I have this problem. I have a large matrix of this sort:
> prova
[,1] [,2] [,3] [,4]
[1,] 3 3 3 3
[2,] 3 3 3 1
[3,] 1 3 3 3
[4,] 1 1 1 3
[5,] 3 1 1 3
[6,] 3 1 1 3
[7,] 1 3 1 3
[8,] 1 3 3 3
What I want to do is to count the number of
sequences of ones and stack the results in a
2008 Oct 27
3
counting run lengths
Hello,
I have the following problem.
I am running simulations on possible states of a set of agents
(1=employed, 0=unemployed).
I store these simulated time series in a matrix like the following,
where rows indicates time periods, columns the number of agents (4
agents and 8 periods in this case):
Atr=[
1 1 1 1
1 1 0 1
1 1 0 1
1 1 0 1
0 1 0 1
0
2012 Jul 25
2
old weird error message
Dear users,
I have a weird questions. A friend of mine, some years ago, supposedly
trying to access help files without Internet connection, got something
like this error message:
"The Pythia is not available, please go to Delphi"
When I've heard about it, I found it very funny and I'd like to be able
to get it. Does anyone of you know how to get this error message again?
2013 Jan 23
2
importing data
Dear All,
Sorry for asking a newbie question. I want to ask how to import 1000
datasets whose file names are labelled from data1.dat to data1000.dat into
R so that they are named M[1, , ] to M[1000, , ] accordingly. Thank you
very much.
Best Regards,
Ray
[[alternative HTML version deleted]]
2012 Oct 23
6
Join data frame columns
Hi,
I have a data frame with 100 variables (numeric and non numeric types), and
I want to join them in only one column, like a vector, but i want to keep
the non numeric variables like they are.
I know that i can do something like this:
Suppose that my data is in df variable
new_df<-data.frame(c(df[,1],df[,2],df[,3],df[,4],...........)
This works but i have 100 variables!
Any way of doing
2012 Mar 22
1
Replace sub string
Given:
> filename<-paste(tempdir(),"\\","myfile.txt",sep="");
> sub("\\\\","/",filename);
[1] "C:/DOCUME~1\\AJAYAS~1\\LOCALS~1\\Temp\\Rtmp2f270T\\myfile.txt"
Note: Only the first occurence of \\ is replaced. What is the syntax for replacing every occurence?
Thanks.
[[alternative HTML version deleted]]
2012 Jun 13
1
reading xls files using read.xls and xlsReadWrite
Dear R list,
I am trying to read in .xls files. I have tried using package 'gdata', I
get the following error.
> dataset <- read.xls("June.xls")
Wide character in print at
/Library/Frameworks/R.framework/Versions/2.14/Resources/library/gdata/perl/
xls2csv.pl line 262.
Seems like this is a problem coming from Perl?
I tried to install package 'xlsReadWrite', it
2012 Jun 18
2
Installing xlsx package on Mac OS X
Hi all,
I'm using a Mac port of R on Mac 10.6. I need to install xlsx package but
it does not install. Do any of you know a way to install it? Thanks very
much.
Sincerely,
Victoria Xiao
[[alternative HTML version deleted]]
2012 Jul 12
2
How to get all list item to one string variable
Hi,
How to get all list item to one string variable.
example
a[1]="abc"
b[1]="def"
output="abc def"
Thanks
B.Purushothaman
--
View this message in context: http://r.789695.n4.nabble.com/How-to-get-all-list-item-to-one-string-variable-tp4636283.html
Sent from the R help mailing list archive at Nabble.com.
2012 Oct 23
1
doubt in command
Dear All,
I I have one doubt about use of the command when has the same name (name of command) in two packages.
For example:
package: Stats
package: Signal
Both have the filter command.
How use the command (filter) to a specific package, when I need work with both packages ?
Thanks
Julio
[[alternative HTML version deleted]]
2013 Jan 25
2
How to name the elements of list
HI,
I have the array list:
X<-vector("list", 2)
X[[1]] : data frame 1
X[[2]]: dataframe2
now i want to change index 1 and 2 into: "0-10" , "11-20" ,.
finally I want to have
X[["0-10"]]:dataframe1
X[["11-20"]]:dataframe2
how do I get them?
Thanks a lot.
Kind regards,
Tammy
[[alternative HTML version deleted]]
2012 Mar 27
1
Data indexing issue...
Dear R-help,
My dataset (which is a data frame, called 'Calender' here) includes 365
rows representing 365 days for a year. One column ('Season')contains
factor data representing seasons, e.g. spring, summer, autumn and winter.
Another column (called 'Day') contains data representing wether the day is
a working day (I use 'Wd' for short here)or weekend (I use
2012 Oct 23
2
vector indexing
Hi,
I got a small problem on how to define the vector index without manually
inspect the vector.
example:
y=c(2,3,5,2,4,6,8,3,6,2,5) #I have ten set of this kind of vectors (with
different values but same length) that I would also like to run the routine
below
#say;
v=the first index in y where the value is larger than 4, in this case index
3, value 5
#what I would like to do is take y[1:v]
2012 Jul 12
2
A simple simulation question
Hi!
I would like to post the following question:
I was trying to figure out how to do the simulation shown in Fig 10.6 of
John Verzani's book 'Using R for Intro Statistics'. It is on page 290, with
a description on the previous page. It seems like a simple thing... Just
needing to duplicate a procedure. (Perhaps I need to do it with a loop?)
This is what I was trying:
2010 Nov 23
1
is it possible to prevent many loggings on many computer from only one user?
Hi everyone
I would like to know if it's possible to prevent many loggings on many
computers from only one user?
I have user who opened 12 computers, logged on those 12 computers and
ran boinc-client on those 12 computers... I want to prevent this kind of
behaviour...
Thanks in advance.
Regards.
--
Olivier Pavilla << ????????????????>>
S.C.I.R.C. Orl?ans (Bourgogne) - I.U.F.M.
2010 Mar 02
1
how to import map data (maptools?) from a html set of 'coords'
Dear R users,
I would like to draw map and import it in maptools/spatstat packages.
The 'raw data' I have come from a web page (<map>...</map>) and are
basically a list of coordinates of a polygon.
I would like to know how to import them in R; I checked the maptools
packages, but all the examples use existing .dbf files.
I just have a (serie of) text file(s) looking like
2012 Jul 11
3
how to create the data frame
there is a data frame £¬x
weekly.returns
2010-1-4 -0.015933327
2010-1-11 -0.015042868
2010-1-18 0.005350297
2010-1-25 -0.049324703
2010-2-1 -0.052674121
when i input
colnames(data)[1] <- 'date'
it becomes
date
2010-1-4 -0.015933327
2010-1-11 -0.015042868
2010-1-18 0.005350297
2010-1-25
2012 Nov 28
3
filter data.frame with a vector
Hello together,
i have a data.frame, which i want to filter with numbers in a vector.
I have a vector (Top10) with these numbers:
[1] 205 302 156 378 235 328 183 375 296 374
and i have a data.frame with a Column (CU_NO) with all my Customer numbers.
How can i filter this data.frame, with the Numbers in my vector.
this one doens't work: