No, read.table() *isn't* about printing.
If you have data stored as text in a tabular format,
you use read.data, read.csv, read.csv2, read.delim, or read.delim2
to read it. This returns a new data frame. Example:
> x <- read.table(textConnection(c(
+ "A B",
+ "1 2",
+ "3 4")), TRUE)
> x
A B
1
I'm having a little trouble believing what I'm seeing.
To the best of my knowledge,
sample.info <- data.frame( + spl=paste('A', 1:8, sep=''), +
stat=rep(c('cancer' , 'healthy'), each=4))
is not legal R syntax, and R 3.6.1 agrees with me
Error: unexpected '=' in "x <- data.frame(+ spl="
Then I see
On 7/20/19 5:17 PM, Jackson Rodrigues wrote:
Dear all,
My name is Jackson and I need a help in applying functions to a list of
tables.
Could anyone help me to use loop/array on a list of tables ?
I need to apply a group of functions (listed below) to a list of tables
I am not that good wi
?lapply
See also the"Intro to R" tutorial that ships with R. We(or at least I)
expect you to do your own homework learning basic R before posting here.
This is not a substitute for such efforts, but we are willing to help when
you get stuck. See the posting guide linked below and show us your own
If "Fardadj was expecting R to recognise the comma as the decimal"
then it might be worth mentioning the 'dec = "."' argument of
read.table and its friends.
On Sun, 21 Jul 2019 at 12:48, Jeff Newmiller
wrote:
> It is possible that part of the original problem was that Fardadj was
> expecting R
It is possible that part of the original problem was that Fardadj was expecting
R to recognise the comma as the decimal and he read in that column as a factor
without realizing it. Factors are discrete, not continuous.
He should use the str() function to identify the column types in his data fra
Dear all,
My name is Jackson and I need a help in applying functions to a list of
tables.
Could anyone help me to use loop/array on a list of tables ?
I need to apply a group of functions (listed below) to a list of tables
I am not that good with loops or arrays or multiple functions.
So, co
Hi Faradj,
Rui's advice is correct, here's a way to do it. Note that I have
replaced the comma decimal points with full stops for my convenience:
fkdf<-read.csv(text="Year,Country,X1,X2
1990,United States,0,0.22
1991,United States,0,0.22
1992,United States,0,0.22
1993,United States,0,0.22
1994,Uni
Hello,
Please don't post in HTML, the data is unreadable.
Two ideas:
1) Why c(FALSE, diff()) if diff returns numeric values? Use c(0, diff)
instead, and you won't need the coercion to numeric with the plus sign.
2) There are many ways to group by a variable, in this case 'Country'.
See in base
Dear R-users,
I have a country-year data for 180 countries from 1970 to 2010. I’m interested
in capturing positive and negative changes in some of the variables. Some of
these variables are continuous (0,25, 0,33, 1, 1,5 etc) others are ordered
(0,1, 2).
To do this, I use this code data$X1_c
Hi,
1) Given .Random.seed, how can one compute *the* integer 'seed' such
that set.seed(seed) generates .Random.seed?
2) If 1) is not possible, how can one compute *an* integer 'seed' from
a given .Random.seed such that different .Random.seed's are guaranteed
to give different integers 'seed' (or a
Hi Spencer,
While Sarah has already given you very good advice, there is a rough
method of checking whether one data set can be substituted for
another:
str(anno)
str(Dilution)
If you're lucky and the objects are not too complicated, this will
give you a start on whether one can be substituted fo
12 matches
Mail list logo