gt; Realistically, the above technique generalizes to more complex cases
> decently. But sometimes, head(0 and other things I mentioned earlier work
> quite well.
>
>
> -Original Message-----
> From: R-help On Behalf Of Upananda Pani
> Sent: Sunday, February 5, 2023 2:3
ani
Sent: Sunday, February 5, 2023 2:33 PM
To: Andrés González Carmona
Cc: r-help
Subject: Re: [R] Extracting data using subset function
Thank you. It means we can not use the subset function here.
Regards
On Mon, 6 Feb, 2023, 00:53 Andrés González Carmona, wrote:
> From ?subset:
> Warn
On Sun, 5 Feb 2023 15:13:54 -0500
Duncan Murdoch wrote:
>
> Just to build the mountain a little higher, I would use
>
>subset(p, seq_along(p) <= 20)
>
> You should generally avoid expressions like "1:length(p)", because
> they don't do what you would expect in the unusual case that p is
Às 22:14 de 05/02/2023, Rui Barradas escreveu:
Às 19:33 de 05/02/2023, Upananda Pani escreveu:
Thank you. It means we can not use the subset function here.
Regards
On Mon, 6 Feb, 2023, 00:53 Andrés González Carmona,
wrote:
From ?subset:
Warning
This is a convenience function intended fo
Às 19:33 de 05/02/2023, Upananda Pani escreveu:
Thank you. It means we can not use the subset function here.
Regards
On Mon, 6 Feb, 2023, 00:53 Andrés González Carmona, wrote:
From ?subset:
Warning
This is a convenience function intended for use interactively. For
programming it is better
a single
vector.
-Original Message-
From: R-help On Behalf Of Upananda Pani
Sent: Sunday, February 5, 2023 2:33 PM
To: Andrés González Carmona
Cc: r-help
Subject: Re: [R] Extracting data using subset function
Thank you. It means we can not use the subset function here.
Regards
On Mon, 6 Feb, 20
Hi Upananda,
As a couple of respondents noted, you only need the logical statement,
not subset().
You did "frame the logical condition" in your example, for if you use
the extraction operator "[" this will work:
subset(p,(1:length(p)) <= 20)
as Jeff already pointed out. Obviously it is easier to w
, albeit you can make a data.frame containing a single
vector.
-Original Message-
From: R-help On Behalf Of Upananda Pani
Sent: Sunday, February 5, 2023 2:33 PM
To: Andrés González Carmona
Cc: r-help
Subject: Re: [R] Extracting data using subset function
Thank you. It means we can no
I will not (re-)define the basic terms used in describing how R is used... do
read [1] for that.
[1]
https://cran.r-project.org/doc/manuals/r-release/R-intro.html#Writing-your-own-functions,
also via RShowDoc("R-intro"), in particular contrast section 1.5 vs section 10.
On February 5, 2023 12:
Hi Rolf,
Thank you so much. I was just curious to know that. I am glad that i got
the input from all of you.
I am grateful to you for clarifying.
With sincere gratitude,
Upananda
On Mon, Feb 6, 2023 at 1:29 AM Rolf Turner wrote:
> On Sun, 5 Feb 2023 19:37:03 +0530
> Upananda Pani wrote:
>
>
Hi Jeff,
Thanks for your reply. What do you exactly mean by "interactively"? Would
you please give me an example?
Upananda
On Mon, Feb 6, 2023 at 1:27 AM Jeff Newmiller
wrote:
> No, it means what it says: it is best used interactively rather than in
> functions. That is not saying you cannot u
On 05/02/2023 2:59 p.m., Rolf Turner wrote:
On Sun, 5 Feb 2023 19:37:03 +0530
Upananda Pani wrote:
Dear All,
I want to create a vector p and extract first 20 observations using
subset function based on logical condition.
My code is below
p <- 0:100
I know i can extract the first 20 observa
On Sun, 5 Feb 2023 19:37:03 +0530
Upananda Pani wrote:
> Dear All,
>
> I want to create a vector p and extract first 20 observations using
> subset function based on logical condition.
>
> My code is below
>
> p <- 0:100
>
> I know i can extract the first 20 observations using the following
>
No, it means what it says: it is best used interactively rather than in
functions. That is not saying you cannot use it... merely that you should
probably use it interactively.
The fact is, though, that integer indexing is much simpler and clearer for your
particular example than subset is.
q
Thank you. It means we can not use the subset function here.
Regards
On Mon, 6 Feb, 2023, 00:53 Andrés González Carmona, wrote:
> From ?subset:
> Warning
>
> This is a convenience function intended for use interactively. For
> programming it is better to use the standard subsetting functions li
How you have defined z1?
On Mon, 6 Feb, 2023, 00:14 粕谷英一, wrote:
> Do you mean something like the following? Here the first elements are
> selected by subset function.
>
> > x1
> [1] 9 8 7 6 5 4 3
> > z1
> [1] TRUE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE
> > subset(x1,z1)
> [1] 9 8 7
>
Do you mean something like the following? Here the first elements are
selected by subset function.
> x1
[1] 9 8 7 6 5 4 3
> z1
[1] TRUE TRUE TRUE FALSE FALSE FALSE FALSE FALSE FALSE
> subset(x1,z1)
[1] 9 8 7
2023年2月6日(月) 3:34 Upananda Pani :
>
> No i am teaching Econometrics and learning R. I
No i am teaching Econometrics and learning R. I am not a student.
Thank you
Upananda
On Sun, 5 Feb, 2023, 19:51 Chris Ryan via R-help,
wrote:
> Is this a homework problem?
>
> --Chris Ryan
> --
> Sent from my Android device with K-9 Mail. Please excuse my brevity.
>
> On February 5, 2023 9:07:0
Is this a homework problem?
--Chris Ryan
--
Sent from my Android device with K-9 Mail. Please excuse my brevity.
On February 5, 2023 9:07:03 AM EST, Upananda Pani
wrote:
>Dear All,
>
>I want to create a vector p and extract first 20 observations using subset
>function based on logical conditio
Dear All,
I want to create a vector p and extract first 20 observations using subset
function based on logical condition.
My code is below
p <- 0:100
I know i can extract the first 20 observations using the following command.
q <- p[1:20]
But I want to extract the first 20 observations using
You need to learn regular expression patterns... there are lots of languages
that use them, and tutorial websites that teach them to you. They are not the
same as filename globbing patterns, and list.files uses regex because they are
much more flexible.
Here is an example:
list.files( pattern
Hello,
First coerce the column birth to class Date, then subset.
data$birth <- as.Date(data$birth)
i <- data$birth > as.Date("1979-01-01")
subdata <- data[i, ]
To write back to Excel, use write.csv or a package able to write Excel
files directly.
Hope this helps,
Rui Barradas
Às 12:23 d
Hi all,
I have a dataframe call "data", and have lots of rows. One of them
is data$`birth`
my data has been imported from an excel file in RSTUDIO
I want to obtain in a function all rows (with the names) where
data$`birth` is bigger than 1979/01/01 and extract in a excel file as an
output (a sub
?reproducible example (see posting guide below)
or
https://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example
However, I would suggest that you spend some time with an R tutorial or two
rather than flailing about with such queries here. R has basic tools --
indexing by
I am a newcomer to R and have been struggling with the following problem:
I have a list1(1:N) containing a list2(1:2) each containing dataframes with the
same column names but different number of rows. Both lists are named and the
rows and the columns in the dataframe are named. I then would lik
My bet is that the zip file is corrupt.
Also, carefully read the documentation for the unzip function... your attempt 1
was not going to work as posed even with a valid file.
On February 25, 2019 2:22:10 AM PST, "Montgomery, Nigel"
wrote:
>Hi there, I've tried several different ways to do the
Hi there, I've tried several different ways to do the above (see attempts
below) and none have been successful. From my internet searches this would
appear to be a common problem.
Any pointers would be appreciated.
Attempt 1:
zip_file_loc <- "xx/yy/zipfile.zip"
data <- read_csv(unzip(zip_file_loc)
2, 2015 3:49 AM
Subject: Re: [R] Extracting data from a file containing data
Here is a way to do case I. It uses the 'tidyr' package and produces results
like:
> case1[[1]] YR JF-R_NINO1.2 MAM-R_NINO1.2 JJA-R_NINO1.2 OND-R_NINO1.21
> 1982 ML ML
Here is a way to do case I. It uses the 'tidyr' package and produces
results like:
> case1[[1]]
YR JF-R_NINO1.2 MAM-R_NINO1.2 JJA-R_NINO1.2 OND-R_NINO1.2
1 1982 MLMLMESE
2 1983 SESESEME
3 1984
|
|
|
|
|
|
|
2.To use the Yearly anomalies for each column in nino regions toclassify the
events as;(i). IfANOM Mean>1, then I assign itto “SE” (Being as Strong
El-nino)(ii). If0
To: Peter Tuju
Cc: "r-help@r-project.org"
Sent: Thursday, June 25
try this:
> input <- read.table("C:\\Users\\jh52822\\Downloads\\Nino_indices.txt"
+ , header = TRUE
+ , as.is = TRUE
+ )
> # create factors
> input$season <- factor(c(rep("JF", 2), rep("MAM", 3), rep("JJA", 3)
+ , NA, rep("OND", 3
What happened to September? Just disregard?
Jim Holtman
Data Munger Guru
What is the problem that you are trying to solve?
Tell me what you want to do, not how you want to do it.
On Thu, Jun 25, 2015 at 11:40 AM, Peter Tuju wrote:
> I have the data as attached. For each nino region, I want t
4352
-Original Message-
From: R-help [mailto:r-help-boun...@r-project.org] On Behalf Of Peter Tuju
Sent: Thursday, June 25, 2015 10:40 AM
To: r-help@r-project.org
Subject: Re: [R] Extracting data from a file containing data
I have the data as attached. For each nino region, I want to get the mea
I have the data as attached. For each nino region, I want to get the mean of
the seasons January and February (JF), March, April and may (MAM), June, July
and August (JJA), and October, November and December (OND) as columns of each
nino regions. and have my result as;For example;
For NINO1.2Yea
I don't know if you can get the information from the plot, but you can
certainly get it from the density() function directly. For example,
# fake data
TestVar <- rnorm(60)
type <- rep(c("Bottom", "Other", "Top"), 20)
# density of TestVar for each type, estimated at 100 points along range of
Test
I have a dataframe
âdf â
with 3 columns. Details
âof df are â
as follows
> summary(df)
DateTestVartype
Min. :2002-05-10 00:00:00 Min. :-3.8531 Bottom: 313
1st Qu.:2005-05-09 12:00:00 1st Qu.:-0.7773 Other :2501
Median :2008-05-07 00:
On Aug 15, 2013, at 11:45 AM, BoonFei Tan wrote:
> Say I have a dataframe for plotting scatterplot. The dataframe would be
> organized in the following fashion (in CSV format):
>
> name ABC EFG132 45256 67
> to, say 200 000 entries
>
> I am going to first do a scatterplot, after which
Say I have a dataframe for plotting scatterplot. The dataframe would be
organized in the following fashion (in CSV format):
name ABC EFG132 45256 67
to, say 200 000 entries
I am going to first do a scatterplot, after which I am going to subset a
portion of the dataset into A using alpha
Hi,
May be this helps:
###Added more lines of fake data
fn_hp<- read.table(text="
id date wl_m wet cuml_day
585 fn 2012-03-03 0.1527048 1 1
586 fn 2012-03-04 0.2121408 1 2
587 fn 2012-03-05 0.1877568 1 3
are
wdunlap tibco.com
> -Original Message-
> From: Peter Ehlers [mailto:ehl...@ucalgary.ca]
> Sent: Friday, August 24, 2012 10:51 AM
> To: William Dunlap
> Cc: Peter Alspach; rjb; r-help@r-project.org
> Subject: Re: [R] Extracting data from dataframe with tied rows
>
>
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf
Of Peter Alspach
Sent: Thursday, August 23, 2012 4:37 PM
To: rjb; r-help@r-project.org
Subject: Re: [R] Extracting data from dataframe with tied rows
Tena koe John
One way:
johnData <
t.org [mailto:r-help-boun...@r-project.org] On
> Behalf
> Of Peter Alspach
> Sent: Thursday, August 23, 2012 4:37 PM
> To: rjb; r-help@r-project.org
> Subject: Re: [R] Extracting data from dataframe with tied rows
>
> Tena koe John
>
> One way:
>
> johnData <-
ames(johnAgg)[3] <- 'distance'
merge(johnAgg, johnData)
HTH
Peter Alspach
-Original Message-
From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-project.org] On
Behalf Of rjb
Sent: Friday, 24 August 2012 9:19 a.m.
To: r-help@r-project.org
Subject: [R] Extracting da
Hi R help,
I'm a fairly experienced R user but this manipulation has me stumped, please
help:
DATA
id<-rep(LETTERS[1:5],20)
distance<-rnorm(1:100, mean = 100)
bearing<-sample(1:360,100,replace=T)
month<-sample(1:12,100,replace=T)
I have a dataset with records of individuals (id) , each with a di
On Sun, Mar 11, 2012 at 9:21 PM, frauke wrote:
> Wow Jim, this is much more than I expected. Thank you!!
>
> It took me a while to figure out what exactly you are doing in that code.
> But I think I understand and it definitely runs. May I ask you two follow up
> questions?
>
> First, some of my f
Wow Jim, this is much more than I expected. Thank you!!
It took me a while to figure out what exactly you are doing in that code.
But I think I understand and it definitely runs. May I ask you two follow up
questions?
First, some of my files have data from two or more cities in them. So I have
tr
Here is one way assuming the data start after QPF FORECAST:
> setwd('/temp') # where the data is
> files <- c('sample1.htm', 'sample2.htm') # files to read
> # assumes 4 columns of data
> fields <- list(c(19, 24), c(30, 35), c(41, 46), c(52, 57)) #columns of data
> results <- lapply(files, func
Thank you for the quick reply! I have attached two files.
http://r.789695.n4.nabble.com/file/n4464511/sample1.1339z sample1.1339z
http://r.789695.n4.nabble.com/file/n4464511/sample2.1949z sample2.1949z
--
View this message in context:
http://r.789695.n4.nabble.com/extracting-data-from-unstruct
Hi Frauke,
Try unix commands with R's system() function.
Example:
Let's say you have a matrix like this in the file (note: the first element
is missing) called hello.txt
10 100
2 20 200
3 30 300
4 40 400
5 50 500
You can try something like:
hello = system("cut -f1 hello.txt", intern=T)
VP.
On
Can you at least provide a subset of 2 files so we can see how the
data is really stored in the file and what the separators are between
the 'columns' of data. Also how do you determine where the data
actually starts for the rows that you want to pull off. This will aid
in determining how to pars
Dear R community,
I have the following problem I hoped you could help me with.
My data is save in thousand of files with a weird extension containing for
numbers and a z. For example *.1405z. With list.files I managed to load this
data into R. It looks like this (the row numbers are not in the
On Tue, Mar 6, 2012 at 3:06 PM, Mago84 wrote:
> Dear all,
>
> I know that it is a silly question, but I have a zoo object like this:
>
> valor1 valor2
> 01/02/08 36.7381 17.0097
> 01/03/08 36.9296 16.8331
> 01/04/08 35.6934 16.3539
> 01/07/08 35.3539 16.3791
> 01/08/08 36.3811
Dear all,
I know that it is a silly question, but I have a zoo object like this:
valor1 valor2
01/02/08 36.7381 17.0097
01/03/08 36.9296 16.8331
01/04/08 35.6934 16.3539
01/07/08 35.3539 16.3791
01/08/08 36.3811 16.9340
01/09/08 37.9220 17.6655
The na
tsippel wrote on 01/25/2012 01:23:05 PM:
> Simple question (I hope?). How does one extract the data from a trellis
> object? I need to get the data from a call to histogram().
>
> A simple example below...
>
> dat<-data.frame(year=as.factor(round(runif(500, 1990, 2010))),
x=rnorm(500,
> 75, 35
Simple question (I hope?). How does one extract the data from a trellis
object? I need to get the data from a call to histogram().
A simple example below...
dat<-data.frame(year=as.factor(round(runif(500, 1990, 2010))), x=rnorm(500,
75, 35),
y=rep(seq(1,50,by=1), times=10))
histogram(d
Without write access to the SQL database, you cannot merge data from both
sources within the SQL query. You can use paste to build a list of literal
strings that you can refer to in the SQL where clause with IN, pull the results
into R, then use the merge function to combine the data frames in R
Hi,
Can you extract data from a SQL server table based on parameters already in
R? For example I have a list of unique patient IDs with latest
hospitalisation date which I've processed in R. I need to join this data to
other tables in SQL server. The tables in SQL server are too large to import
wi
a.diag03 = b.[ICD-10 Codes]
I am not sure why your table name CVD_ICD10 has a suffix $.
From: Jeff Newmiller <[hidden
email]>
To: dthomas <[hidden email]>;
[hidden email]
Sent: Tuesday, 10 January 2012, 8:00
Subject: Re: [R] Extracting Data from SQL Ser
Newmiller
To: dthomas ; r-help@r-project.org
Sent: Tuesday, 10 January 2012, 8:00
Subject: Re: [R] Extracting Data from SQL Server
This is OT here. However, you might want to investigate the UNIQUE keyword in
the SQL Server documentation for SELECT
This is OT here. However, you might want to investigate the UNIQUE keyword in
the SQL Server documentation for SELECT.
---
Jeff NewmillerThe . . Go Live...
DCN:Basics: ##.#.
Hi,
I am new to R (and rusty on SQL!) and I'm trying to extract records from a
SQL server database. I have a table of patient records (LoadPUS) which have
three code columns which i want to evaluate against a list of particular
codes (CVD_ICD$ table). Given the size of the patient table I want to
un...@r-project.org [mailto:r-help-boun...@r-project.org] On
> Behalf Of Vinny Moriarty
> Sent: Friday, October 28, 2011 6:05 PM
> To: r-help@r-project.org
> Subject: [R] Extracting data by row
>
> Thanks everyone for you help with my last question, and now I have one las
On Friday 28 October 2011 18:04:59 Vinny Moriarty wrote:
> Thanks everyone for you help with my last question, and now I have one
> last one...
Here is what I would do, based on my understanding of your question:
# your data snippet as data frame
> x
site time_localtime_utc
Thanks everyone for you help with my last question, and now I have one last
one...
Here is a sample of my data in .csv format
site,time_local,time_utc,reef_type_code,sensor_type,sensor_depth_m,temperature_c
06,2006-04-09 10:20:00,2006-04-09 20:20:00,BAK,sb39, 2, 29.63
06,2006-04-09 10:40:00,2006
Thanks! That works well.
Best,
Ana
>
>From: Peter Ehlers
>To: Ana Kolar
>Cc: Sarah Goslee ; R
>Sent: Tuesday, 28 June 2011, 19:37
>Subject: Re: [R] extracting data
>
>On 2011-06-28 09:54, Ana Kolar wrote:
>> Hi Sarah,
>>
: Sarah Goslee
To: Ana Kolar
Cc: R
Sent: Tuesday, 28 June 2011, 18:44
Subject: Re: [R] extracting data
Hi Ana,
On Tue, Jun 28, 2011 at 12:28 PM, Ana Kolar wrote:
Let's say I have an original data set which is called A and data extracted from
this original data set, called B. Based on t
la=f, data=A, method=m)
B <- match.data(m.out.base)
An <- nrow(A)
Bn <- nrow(B)
Cn <- An - Bn
C <- ??
>
>From: Sarah Goslee
>To: Ana Kolar
>Cc: R
>Sent: Tuesday, 28 June 2011, 18:44
>Subject: Re: [R] extracting data
>
>
Hi Ana,
On Tue, Jun 28, 2011 at 12:28 PM, Ana Kolar wrote:
> Let's say I have an original data set which is called A and data extracted
> from this original data set, called B. Based on these A and B data set I
> would like to get data set C which includes all the remaining data from the
> dat
Let's say I have an original data set which is called A and data extracted from
this original data set, called B. Based on these A and B data set I would like
to get data set C which includes all the remaining data from the data set A
after we exclude data of the data set B.
Any idea how to do
On Fri, Nov 5, 2010 at 11:54 AM, Santosh Srinivas
wrote:
> Thanks Gabor for pointing in the right direction.
> Looked up cycle and the doc is tough to understand " cycle gives the
> positions in the cycle of each observation." ... how is cycle defined.
>
> I just extended your idea to make it read
index(mRet),"%m")==11]
-Original Message-
From: Gabor Grothendieck [mailto:ggrothendi...@gmail.com]
Sent: 05 November 2010 20:59
To: Santosh Srinivas
Cc: r-help@r-project.org
Subject: Re: [R] Extracting data only for particular index values from a zoo
structure
On Fri, Nov
On Fri, Nov 5, 2010 at 11:21 AM, Santosh Srinivas
wrote:
> Hello All,
>
> I have a zoo structure as follows:
>> dput(tMRet)
> structure(c(0.00138742474397713, -0.0309023681475112, 0.0390276302410908,
> 0.0832282874685357, -0.00315002033871414, -0.0158548785709138,
> -0.0410876001496389, -0.0503189
Hello All,
I have a zoo structure as follows:
> dput(tMRet)
structure(c(0.00138742474397713, -0.0309023681475112, 0.0390276302410908,
0.0832282874685357, -0.00315002033871414, -0.0158548785709138,
-0.0410876001496389, -0.0503189291168807, 0.00229628598547049,
0.112348434473647, 0.07600046962546
nal Message-
> From: r-help-boun...@r-project.org [mailto:r-help-boun...@r-
> project.org] On Behalf Of elaine kuo
> Sent: Monday, October 11, 2010 9:45 PM
> To: r-help@r-project.org
> Subject: [R] Extracting data subset for plot
>
> Dear list,
>
>
>
> I want t
On Tue, 2010-10-12 at 11:44 +0800, elaine kuo wrote:
> Dear list,
> I want to make a plot based on the following information, using the command
> plot.
>
> variable A for x axis : temperature (range: -20 degrees to 40 degree)
>
> variable B for y axis : altitude (range: 50 m to 2500 m )
Use the
Dear list,
I want to make a plot based on the following information, using the command
plot.
variable A for x axis : temperature (range: -20 degrees to 40 degree)
variable B for y axis : altitude (range: 50 m to 2500 m )
The data below 0 degree of X variable wants to be erased tentatively.
Excellent! That did the trick. Thank you very much.
On Thu, Jan 14, 2010 at 5:27 PM, Henrique Dallazuanna wrote:
> Try this:
>
> lapply(l, '[', 1, 1)
>
>
> On Thu, Jan 14, 2010 at 2:22 PM, Hubert Colt
> wrote:
> > Hi,
> >
> > Apologies in advance for the basic nature of my question. I am still v
Try this:
lapply(l, '[', 1, 1)
On Thu, Jan 14, 2010 at 2:22 PM, Hubert Colt wrote:
> Hi,
>
> Apologies in advance for the basic nature of my question. I am still very
> much a rookie when it comes to R. Having googled it, checked Nabble and
> trial/error to the best of my ability, I have yet to
Hi,
Apologies in advance for the basic nature of my question. I am still very
much a rookie when it comes to R. Having googled it, checked Nabble and
trial/error to the best of my ability, I have yet to find an easy solution.
I am currently working with a list of 5x5 matrices, and want to extract
lt;[EMAIL PROTECTED]>
Cc: r-help@r-project.org
Sent: Thursday, 20 November, 2008 14:35:10
Subject: Re: [R] extracting data from a list of unformatted text files
Here is a way to process the file. You will have to add the loop,
error checking, piecing multiple files together, and determination of
th
Here is a way to process the file. You will have to add the loop,
error checking, piecing multiple files together, and determination of
the end of the data:
> x <- "I give below a sample of the kind of the information in the text file :
+
+ #(a lot of preceding text)
+ 2008-10-01 06
Hi,
I want to extract information from a number of text files in a folder. The
files are named as : 82534.txt, 82555.txt, 8282787.txt etc.
I give below a sample of the kind of the information in the text file :
#(a lot of preceding text)
2008-10-01 06:30:12 2 of 3
pag
Use
mat <- eig[["vectors"]]
If x is a list, ``x[i]'' gives you a (sub-) list of length 1,
whereas ``x[[i]]'' gives you the single element of that list.
A possibly subtle but important distinction.
cheers,
Rolf Turner
On 4/03/2008, at 12:42 PM, SS-R wrote:
>
> H
Hi
I need to extract the data returned by Eigen to plot the eigenvectors.
However, when I try and eigv = eigen(covariance); it returns an object with
the matrices containing eigenvalues and vectors.. how can I extract the
eigenvector matrix from this??
When I try mat = eig["vectors"] it returns a
All great ideas. I tried strsplit first and it worked, but thanks everyone!
Best-
LB
On 9/25/07, Gabor Grothendieck <[EMAIL PROTECTED]> wrote:
> Perhaps you could clarify what the general rule is but assuming
> that what you want is any word after a colon it can be done with
> strapply in the gsu
Perhaps you could clarify what the general rule is but assuming
that what you want is any word after a colon it can be done with
strapply in the gsubfn package like this:
Lines <- c("Year Built: 1873 Gross Building Area: 578 sq ft",
"Total Rooms: 6 Living Area: 578 sq ft")
library(gsubfn)
str
On 25-Sep-07 20:39:11, lucy b wrote:
> Dear List,
>
> I have an ascii text file with data I'd like to extract. Example:
>
> Year Built: 1873 Gross Building Area: 578 sq ft
> Total Rooms: 6 Living Area: 578 sq ft
>
> There is a lot of data I'd like to ignore in each record, so I'm
> hoping th
Here is one way. You can setup a list of the patterns to match
against and then apply it to the string. I am not sure what the rest
of the text file look like, but this will return all the values that
match.
> x <- readLines(textConnection("Year Built: 1873 Gross Building Area: 578 sq
> ft
+
On Tue, 2007-09-25 at 16:39 -0400, lucy b wrote:
> Dear List,
>
> I have an ascii text file with data I'd like to extract. Example:
>
> Year Built: 1873 Gross Building Area: 578 sq ft
> Total Rooms: 6 Living Area: 578 sq ft
>
> There is a lot of data I'd like to ignore in each record, so I'm
have you seen help(strsplit)?
On Tue, 25 Sep 2007, lucy b wrote:
> Dear List,
>
> I have an ascii text file with data I'd like to extract. Example:
>
> Year Built: 1873 Gross Building Area: 578 sq ft
> Total Rooms: 6 Living Area: 578 sq ft
>
> There is a lot of data I'd like to ignore in each
Dear List,
I have an ascii text file with data I'd like to extract. Example:
Year Built: 1873 Gross Building Area: 578 sq ft
Total Rooms: 6 Living Area: 578 sq ft
There is a lot of data I'd like to ignore in each record, so I'm
hoping there is a way to use strings as delimiters to get the da
91 matches
Mail list logo