An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20120906/e805f00c/attachment.pl>
Why the error is coming, can anyone help?
8 messages · Sri krishna Devarayalu Balanagu, jim holtman, Berend Hasselman +3 more
What did you expect 'print(i).Arms' to do? This is causing part of
the problem since the syntax is not correct.
Also what does 'paste(i)[, c("Reference_ID", "Arm_ID")]' do? Does not
seem correct since 'paste' does not return a matrix.
On Thu, Sep 6, 2012 at 2:54 AM, Sri krishna Devarayalu Balanagu
<balanagudevarayulu at gvkbio.com> wrote:
Hi everyone
Can anyone help?
x = c("Treatment", "Planned", "Actual", "Demographics", "Outcomes")
for (i in x) {
df <- paste(i)[, c("Reference_ID", "Arm_ID")]
unique(df) -> uniq
as.data.frame(table(uniq$Reference_ID)) -> y
i.Arms<- paste(y$Var1, y$Freq, sep="_")
Print_Message("Check for the Total No of Arms in Trial_level_info and print(i) sheet", Trial.Arms, print(i).Arms, "Trial level sheet", "print(i) sheet")
}
Error: unexpected symbol in:
"i.Arms<- paste(y$Var1, y$Freq, sep="_")
Print_Message("Check for the Total No of Arms in Trial_level_info and print(i) sheet", Trial.Arms, print(i).Arms"
Visit us at Booth No. 5 at 2012 ChemOutsourcing Conference, 10-13 Sept 2012, Ocean Place Resort - Long Branch, NJ, United States
Visit us at Booth No. 4 at World Conference on Pharmacometrics, 5-7 Sept 2012, Grand Hilton Hotel, Seoul, Korea
________________________________
Notice: The information contained in this electronic mail message is intended only for the use of the designated recipient. This message is privileged and confidential. and the property of GVK BIO or its affiliates and subsidiaries. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this message in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by telephone +91-40-66929999<tel:%2B91-40-66929999> and destroy any and all copies of this message in your possession (whether hard copies or electronically stored copies).
[[alternative HTML version deleted]]
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
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 06-09-2012, at 08:54, Sri krishna Devarayalu Balanagu wrote:
Hi everyone
Can anyone help?
x = c("Treatment", "Planned", "Actual", "Demographics", "Outcomes")
for (i in x) {
df <- paste(i)[, c("Reference_ID", "Arm_ID")]
unique(df) -> uniq
as.data.frame(table(uniq$Reference_ID)) -> y
i.Arms<- paste(y$Var1, y$Freq, sep="_")
Print_Message("Check for the Total No of Arms in Trial_level_info and print(i) sheet", Trial.Arms, print(i).Arms, "Trial level sheet", "print(i) sheet")
}
Error: unexpected symbol in:
"i.Arms<- paste(y$Var1, y$Freq, sep="_")
Print_Message("Check for the Total No of Arms in Trial_level_info and print(i) sheet", Trial.Arms, print(i).Arms"
print(i).Arms is the culprit. It probably should be print(i.Arms)
Visit us at Booth No. 5 at 2012 ChemOutsourcing Conference, 10-13 Sept 2012, Ocean Place Resort - Long Branch, NJ, United States Visit us at Booth No. 4 at World Conference on Pharmacometrics, 5-7 Sept 2012, Grand Hilton Hotel, Seoul, Korea
Please leave out the commercials. Berend
Hi
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-
project.org] On Behalf Of Sri krishna Devarayalu Balanagu
Sent: Thursday, September 06, 2012 8:54 AM
To: r-help at r-project.org
Subject: [R] Why the error is coming, can anyone help?
Hi everyone
Can anyone help?
x = c("Treatment", "Planned", "Actual", "Demographics", "Outcomes")
for
(i in x) { df <- paste(i)[, c("Reference_ID", "Arm_ID")]
What do you think the above paste is doing? Did you try it outsider loop?
unique(df) -> uniq
as.data.frame(table(uniq$Reference_ID)) -> y
i.Arms<- paste(y$Var1, y$Freq, sep="_")
Print_Message("Check for the Total No of Arms in Trial_level_info and
Where is Print_Message from?
print(i) sheet", Trial.Arms, print(i).Arms, "Trial level sheet",
"print(i) sheet") }
Error: unexpected symbol in:
"i.Arms<- paste(y$Var1, y$Freq, sep="_") Print_Message("Check for the
Total No of Arms in Trial_level_info and print(i) sheet", Trial.Arms,
print(i).Arms"
The message comes usually from syntacticaly invalid commands. Missing commas or something like that. What do you want actually to achieve? Regards Petr
Visit us at Booth No. 5 at 2012 ChemOutsourcing Conference, 10-13 Sept 2012, Ocean Place Resort - Long Branch, NJ, United States Visit us at Booth No. 4 at World Conference on Pharmacometrics, 5-7 Sept 2012, Grand Hilton Hotel, Seoul, Korea
________________________________ Notice: The information contained in this electronic mail message is intended only for the use of the designated recipient. This message is privileged and confidential. and the property of GVK BIO or its affiliates and subsidiaries. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this message in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by telephone +91-40-66929999<tel:%2B91-40-66929999> and destroy any and all copies of this message in your possession (whether hard copies or electronically stored copies). [[alternative HTML version deleted]] ______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting- guide.html and provide commented, minimal, self-contained, reproducible code.
print(i).Arms is not valid R syntax. Did you mean print(i.Arms) ? Bill Dunlap Spotfire, TIBCO Software wdunlap tibco.com
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf
Of Sri krishna Devarayalu Balanagu
Sent: Wednesday, September 05, 2012 11:54 PM
To: r-help at r-project.org
Subject: [R] Why the error is coming, can anyone help?
Hi everyone
Can anyone help?
x = c("Treatment", "Planned", "Actual", "Demographics", "Outcomes")
for (i in x) {
df <- paste(i)[, c("Reference_ID", "Arm_ID")]
unique(df) -> uniq
as.data.frame(table(uniq$Reference_ID)) -> y
i.Arms<- paste(y$Var1, y$Freq, sep="_")
Print_Message("Check for the Total No of Arms in Trial_level_info and print(i) sheet",
Trial.Arms, print(i).Arms, "Trial level sheet", "print(i) sheet")
}
Error: unexpected symbol in:
"i.Arms<- paste(y$Var1, y$Freq, sep="_")
Print_Message("Check for the Total No of Arms in Trial_level_info and print(i) sheet",
Trial.Arms, print(i).Arms"
Visit us at Booth No. 5 at 2012 ChemOutsourcing Conference, 10-13 Sept 2012, Ocean
Place Resort - Long Branch, NJ, United States
Visit us at Booth No. 4 at World Conference on Pharmacometrics, 5-7 Sept 2012, Grand
Hilton Hotel, Seoul, Korea
________________________________ Notice: The information contained in this electronic mail message is intended only for the use of the designated recipient. This message is privileged and confidential. and the property of GVK BIO or its affiliates and subsidiaries. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this message in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by telephone +91-40- 66929999<tel:%2B91-40-66929999> and destroy any and all copies of this message in your possession (whether hard copies or electronically stored copies). [[alternative HTML version deleted]] ______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Thank you for the answer. It's working.
But the error occurring here also
df <- paste(i)[, c("Reference_ID", "Arm_ID")]
How to get rid of that.
-----Original Message-----
From: William Dunlap [mailto:wdunlap at tibco.com]
Sent: Thursday, September 06, 2012 10:15 PM
To: Sri krishna Devarayalu Balanagu; r-help at r-project.org
Subject: RE: Why the error is coming, can anyone help?
print(i).Arms
is not valid R syntax. Did you mean
print(i.Arms)
?
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf
Of Sri krishna Devarayalu Balanagu
Sent: Wednesday, September 05, 2012 11:54 PM
To: r-help at r-project.org
Subject: [R] Why the error is coming, can anyone help?
Hi everyone
Can anyone help?
x = c("Treatment", "Planned", "Actual", "Demographics", "Outcomes")
for (i in x) {
df <- paste(i)[, c("Reference_ID", "Arm_ID")]
unique(df) -> uniq
as.data.frame(table(uniq$Reference_ID)) -> y
i.Arms<- paste(y$Var1, y$Freq, sep="_")
Print_Message("Check for the Total No of Arms in Trial_level_info and print(i) sheet",
Trial.Arms, print(i).Arms, "Trial level sheet", "print(i) sheet")
}
Error: unexpected symbol in:
"i.Arms<- paste(y$Var1, y$Freq, sep="_")
Print_Message("Check for the Total No of Arms in Trial_level_info and print(i) sheet",
Trial.Arms, print(i).Arms"
Visit us at Booth No. 5 at 2012 ChemOutsourcing Conference, 10-13 Sept 2012, Ocean
Place Resort - Long Branch, NJ, United States
Visit us at Booth No. 4 at World Conference on Pharmacometrics, 5-7 Sept 2012, Grand
Hilton Hotel, Seoul, Korea
________________________________
Notice: The information contained in this electronic mail message is intended only for
the use of the designated recipient. This message is privileged and confidential. and the
property of GVK BIO or its affiliates and subsidiaries. If the reader of this message is not
the intended recipient or an agent responsible for delivering it to the intended recipient,
you are hereby notified that you have received this message in error and that any review,
dissemination, distribution, or copying of this message is strictly prohibited. If you have
received this communication in error, please notify us immediately by telephone +91-40-
66929999<tel:%2B91-40-66929999> and destroy any and all copies of this message in
your possession (whether hard copies or electronically stored copies).
[[alternative HTML version deleted]]
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Visit us at Booth No. 5 at 2012 ChemOutsourcing Conference, 10-13 Sept 2012, Ocean Place Resort - Long Branch, NJ, United States Visit us at Booth No. 4 at World Conference on Pharmacometrics, 5-7 Sept 2012, Grand Hilton Hotel, Seoul, Korea ________________________________ Notice: The information contained in this electronic mail message is intended only for the use of the designated recipient. This message is privileged and confidential. and the property of GVK BIO or its affiliates and subsidiaries. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this message in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by telephone +91-40-66929999<tel:%2B91-40-66929999> and destroy any and all copies of this message in your possession (whether hard copies or electronically stored copies).
'paste' does not return a matrix, so trying to extract with the '[' is incorrect. what did you expect from that expression? Sent from my iPad
On Sep 7, 2012, at 2:41, Sri krishna Devarayalu Balanagu <balanagudevarayulu at gvkbio.com> wrote:
Thank you for the answer. It's working.
But the error occurring here also
df <- paste(i)[, c("Reference_ID", "Arm_ID")]
How to get rid of that.
-----Original Message-----
From: William Dunlap [mailto:wdunlap at tibco.com]
Sent: Thursday, September 06, 2012 10:15 PM
To: Sri krishna Devarayalu Balanagu; r-help at r-project.org
Subject: RE: Why the error is coming, can anyone help?
print(i).Arms
is not valid R syntax. Did you mean
print(i.Arms)
?
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
-----Original Message-----
From: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org] On Behalf
Of Sri krishna Devarayalu Balanagu
Sent: Wednesday, September 05, 2012 11:54 PM
To: r-help at r-project.org
Subject: [R] Why the error is coming, can anyone help?
Hi everyone
Can anyone help?
x = c("Treatment", "Planned", "Actual", "Demographics", "Outcomes")
for (i in x) {
df <- paste(i)[, c("Reference_ID", "Arm_ID")]
unique(df) -> uniq
as.data.frame(table(uniq$Reference_ID)) -> y
i.Arms<- paste(y$Var1, y$Freq, sep="_")
Print_Message("Check for the Total No of Arms in Trial_level_info and print(i) sheet",
Trial.Arms, print(i).Arms, "Trial level sheet", "print(i) sheet")
}
Error: unexpected symbol in:
"i.Arms<- paste(y$Var1, y$Freq, sep="_")
Print_Message("Check for the Total No of Arms in Trial_level_info and print(i) sheet",
Trial.Arms, print(i).Arms"
Visit us at Booth No. 5 at 2012 ChemOutsourcing Conference, 10-13 Sept 2012, Ocean
Place Resort - Long Branch, NJ, United States
Visit us at Booth No. 4 at World Conference on Pharmacometrics, 5-7 Sept 2012, Grand
Hilton Hotel, Seoul, Korea
________________________________
Notice: The information contained in this electronic mail message is intended only for
the use of the designated recipient. This message is privileged and confidential. and the
property of GVK BIO or its affiliates and subsidiaries. If the reader of this message is not
the intended recipient or an agent responsible for delivering it to the intended recipient,
you are hereby notified that you have received this message in error and that any review,
dissemination, distribution, or copying of this message is strictly prohibited. If you have
received this communication in error, please notify us immediately by telephone +91-40-
66929999<tel:%2B91-40-66929999> and destroy any and all copies of this message in
your possession (whether hard copies or electronically stored copies).
[[alternative HTML version deleted]]
______________________________________________
R-help at r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.
Visit us at Booth No. 5 at 2012 ChemOutsourcing Conference, 10-13 Sept 2012, Ocean Place Resort - Long Branch, NJ, United States Visit us at Booth No. 4 at World Conference on Pharmacometrics, 5-7 Sept 2012, Grand Hilton Hotel, Seoul, Korea
________________________________ Notice: The information contained in this electronic mail message is intended only for the use of the designated recipient. This message is privileged and confidential. and the property of GVK BIO or its affiliates and subsidiaries. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this message in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by telephone +91-40-66929999<tel:%2B91-40-66929999> and destroy any and all copies of this message in your possession (whether hard copies or electronically stored copies). ______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.
Learn to use the str() function so you can answer these questions yourself. If you type str(paste(i)) you can learn about the structure of the return value from the paste function, which is not a matrix or a data frame, so two-dimensional subscripting is not going to work on it. You may also benefit from (re)reading the Introduction to R document. Without a reproducible example or an idea of what you want to accomplish, I don't know what _is_ going to work.
---------------------------------------------------------------------------
Jeff Newmiller The ..... ..... Go Live...
DCN:<jdnewmil at dcn.davis.ca.us> Basics: ##.#. ##.#. Live Go...
Live: OO#.. Dead: OO#.. Playing
Research Engineer (Solar/Batteries O.O#. #.O#. with
/Software/Embedded Controllers) .OO#. .OO#. rocks...1k
---------------------------------------------------------------------------
Sent from my phone. Please excuse my brevity.
Sri krishna Devarayalu Balanagu <balanagudevarayulu at gvkbio.com> wrote:
Thank you for the answer. It's working.
But the error occurring here also
df <- paste(i)[, c("Reference_ID", "Arm_ID")]
How to get rid of that.
-----Original Message-----
From: William Dunlap [mailto:wdunlap at tibco.com]
Sent: Thursday, September 06, 2012 10:15 PM
To: Sri krishna Devarayalu Balanagu; r-help at r-project.org
Subject: RE: Why the error is coming, can anyone help?
print(i).Arms
is not valid R syntax. Did you mean
print(i.Arms)
?
Bill Dunlap
Spotfire, TIBCO Software
wdunlap tibco.com
-----Original Message----- From: r-help-bounces at r-project.org
[mailto:r-help-bounces at r-project.org] On Behalf
Of Sri krishna Devarayalu Balanagu
Sent: Wednesday, September 05, 2012 11:54 PM
To: r-help at r-project.org
Subject: [R] Why the error is coming, can anyone help?
Hi everyone
Can anyone help?
x = c("Treatment", "Planned", "Actual", "Demographics", "Outcomes")
for (i in x) {
df <- paste(i)[, c("Reference_ID", "Arm_ID")]
unique(df) -> uniq
as.data.frame(table(uniq$Reference_ID)) -> y
i.Arms<- paste(y$Var1, y$Freq, sep="_")
Print_Message("Check for the Total No of Arms in Trial_level_info and
print(i) sheet",
Trial.Arms, print(i).Arms, "Trial level sheet", "print(i) sheet")
}
Error: unexpected symbol in:
"i.Arms<- paste(y$Var1, y$Freq, sep="_")
Print_Message("Check for the Total No of Arms in Trial_level_info and
print(i) sheet",
Trial.Arms, print(i).Arms" Visit us at Booth No. 5 at 2012 ChemOutsourcing Conference, 10-13
Sept 2012, Ocean
Place Resort - Long Branch, NJ, United States Visit us at Booth No. 4 at World Conference on Pharmacometrics, 5-7
Sept 2012, Grand
Hilton Hotel, Seoul, Korea
________________________________ Notice: The information contained in this electronic mail message is
intended only for
the use of the designated recipient. This message is privileged and
confidential. and the
property of GVK BIO or its affiliates and subsidiaries. If the reader
of this message is not
the intended recipient or an agent responsible for delivering it to
the intended recipient,
you are hereby notified that you have received this message in error
and that any review,
dissemination, distribution, or copying of this message is strictly
prohibited. If you have
received this communication in error, please notify us immediately by
telephone +91-40-
66929999<tel:%2B91-40-66929999> and destroy any and all copies of
this message in
your possession (whether hard copies or electronically stored
copies).
[[alternative HTML version deleted]]
______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide
http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Visit us at Booth No. 5 at 2012 ChemOutsourcing Conference, 10-13 Sept 2012, Ocean Place Resort - Long Branch, NJ, United States Visit us at Booth No. 4 at World Conference on Pharmacometrics, 5-7 Sept 2012, Grand Hilton Hotel, Seoul, Korea ________________________________ Notice: The information contained in this electronic mail message is intended only for the use of the designated recipient. This message is privileged and confidential. and the property of GVK BIO or its affiliates and subsidiaries. If the reader of this message is not the intended recipient or an agent responsible for delivering it to the intended recipient, you are hereby notified that you have received this message in error and that any review, dissemination, distribution, or copying of this message is strictly prohibited. If you have received this communication in error, please notify us immediately by telephone +91-40-66929999<tel:%2B91-40-66929999> and destroy any and all copies of this message in your possession (whether hard copies or electronically stored copies). ______________________________________________ R-help at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.